Alan Hay, 49, of The Meadows, Dalbeattie, is alleged to have made sexually suggestive comments to the woman last September and pressed his body against her.
He is also accused of intentionally obstructing police officers acting under the Misuse of Drugs Act at Burns Street in Dalbeattie and refusing to open his mouth.
The case at Dumfries Sheriff Court was this week continued without plea to June 21.