A lawyer representing one of 27 men swept up in a downtown Sydney prostitution sting last year dubbed John Be Gone says police violated his client's charter rights.

T.J. McKeough argues the Cape Breton Regional Police operation, where two female officers posed as sex workers, lured his client into committing a crime. He also said the public naming of the men charged amounts to shaming.

"Part of our application is that there was actually a public shaming component that went on," McKeough said. "By listing off these people's names, ages and location of their residence so they are easily identifiable to all their peers. In essence, in a lot of people's minds, they were found guilty."

The lawyer will make his arguments before a provincial court judge on May 30.

In September, Cape Breton Regional Police announced more than two dozen men had been charged with communicating for the purposes of obtaining sexual services.

Police Chief Peter McIsaac called a news conference, said the prostitution problem in the area had grown by "monumental proportions," and released the names, ages and communities of those charged.

Operation was not fair

McKeough said the operation involved two female officers. One would make eye contact with a prospective John, there would be communication, a price negotiated and then an arrest team would close in.

He said the operation violated his client's rights under the Charter of Rights and Freedoms.

"It's akin, basically, to charging someone who is buying drugs instead of selling drugs now," McKeough said. "We're saying that the police have misused this ability in order to charge people who communicate for it.

"In this case, if you take the police out of the equation, you couldn't really have charged these people with anything."

Not entrapment, expert says

After the Supreme Court of Canada struck down the country's prostitution laws in 2013, new legislation was passed in 2014. The new law makes it legal to sell sexual services, but illegal to purchase them.

"We now have a very clear law in Canada that obtaining or offering to obtain sexual services for consideration is a criminal offence," said University of British Columbia law professor Janine Benedet, who was one of the lawyers involved in the Supreme Court hearing. 

"And so, if that's what it is that these men are looking for, then they are breaking the law."

Benedet said research shows the fear of publicity is one of the main deterrents to men hiring prostitutes. She said the type of sting operation set up by the Cape Breton Regional Police is not unique.

"They are simply substituting for the women in prostitution. That really doesn't meet the legal definition of entrapment," she said.

"Entrapment really involves a situation in which the police orchestrate and convince otherwise law-abiding citizens to commit a crime."