I generally have two response modes: Verbal harassment gets the harasser reclassified as a legitimate target for honing my repartee skills. Slice 'em and dice 'em. Touching my body without warning or invitation, in an overly familiar way, tends to activate the defense/offense reflexes, which can get the harasser smacked or dumped on the floor. But in a public situation, I tend toward enough body and spatial awareness that it's not actually all that easy for someone to put an unwanted touch on me. There have been far more attempts than contacts.
The most important thing I've learned is this: Get off the script immediately. Do not respond as the harasser expects. This gives you the upper hand. You can be smart, cold, aggressive, whatever -- but try to avoid showing embarrassment or just ignoring the attack, which is what they want. Once you're off the script, the harasser doesn't know how to handle the situation. Make it count.