Two one-way valves and a spring. The ball lets soap in from below. The piston, sliding on the stem, lets it out through the stem.