It's legal, though its legality has its boundaries (e.g., no soliciting prostitution in public places).
From what I understand (strictly based on what I've heard from few ladies), ladies need a license for it. One of the ladies told me that she was caught by cops once, and she got fined for not having a license, and they just asked dude few things (e.g., name, age, etc), and as far as she knows, no consequences for the dude. His info is likely on the report, and if someone wanted to find it, his name would come up, but it wouldn't come up on criminal record check.
Much like other illegal activities that cops look the other way (e.g., selling dime bags of weed), they know who's doing what, but they won't bother them unless they have a reason to (e.g., if they suspect the lady's running a brothel, which can be potentially harmful for those involved in it).