Forty minutes in, without warning, the man spat on the woman's genitalia.
The victim immediately ordered him out of the room before informing police.
The defendant, the court heard, had a shower then waited in a reception area until officers arrived.
"In explanation the defendant stated that he had a build-up of saliva in his mouth and needed to spit," court documents revealed.
Judge Robinson said he did not accept that as legitimate.
The victim found the incident "very distressing", he said.
The sex worker outlined the impact of the ordeal, which included not working for three weeks while waiting to find out if she had contracted any diseases.
"And it seems she's not entirely out of the woods," the judge said.
Some illnesses might only be apparent after six months, the victim said.
New Zealand Prostitutes Collective national coordinator Dame Catherine Healy paid tribute to the victim for involving police when there were "huge barriers to coming forward".
Women in such situations were understandably concerned abusers could find out where they lived and other personal details if they made a formal complaint, she said.
Dame Catherine was impressed police took the matter seriously.
"A person in [the victim's] circumstances is particularly vulnerable to attacks of this nature so a sentence to deter others is appropriate," Judge Robinson said.
The defendant was sentenced to 80 hours' community work and ordered to pay the victim $3000 by the end of the week.
The judge declined the Otago Daily Times' application to photograph the defendant because of the unresolved Auckland court case and he suggested the interest "appears to be solely because of the occupation of the complainant".
SEXUAL HARM - DO YOU NEED HELP?
If it's an emergency and you feel that you or someone else is at risk, call 111.
If you've ever experienced sexual assault or abuse and need to talk to someone contact Safe to Talk confidentially:
• Call 0800 044 334
• Text 4334
• Email support@safetotalk.nz
• For more info or to web chat visit www.safetotalk.nz
Alternatively contact your local police station -
click here for a list.