I don't believe Julian Assange's approach to Wikileaks-related issues has put him on the wrong side of the law. He is charged with rape, not with publishing what people sent him, AFAIK.
"Assange has not yet been formally charged with any offence.[62] The prosecutor said that, in accordance with the Swedish legal system, formal charges will be laid only after extradition and a second round of questioning. Observers note however that Assange has not yet been interviewed about several of the allegations,[63] including the most serious, and that Swedish law allows interviews to be conducted abroad under Mutual Legal Assistance provisions.[64]"
Perhaps not quite as extreme as Kafka's vision, but some parts of the case does seem about as ridiculous. (anyone who haven't read The Trial should, Kafka is fairly accessible)
When fighting the institutions that write these charges, you are implicitly a target. Wouldn't be the first time someone was put in jail for the wrong crime. (I'm not convinced he's innocent but I have no problem believing the charges are made up)
Which is why "not being in accordance with the law" makes little sense in such cases, as the laws can be abused if the government really wants someone (i.e. Aaron Swartz & CFAA).