Running, like Snowden did is really your best bet there I think. He's pretty much the textbook example of how to do this in the most correct way possible and still keep some degree of freedom for yourself. If you're willing to be a martyr, then you can stand up for that. Some people insist you must.
But I'm more than willing to accept both that someone finds something egregiously offensive that needs to be publicized, but also wants to keep their freedom.
I don't like what Snowden did, but I would respect the hell out of him if he had decided to stand up for his convictions and face the music. He'd have had a far better case, and would have had incredible EFF and ACLU lawyers on his side, and a ton of public sympathy. Instead, he turned an act of patriotism into an act of espionage and treason.
As to where it got him-- he actually accomplished his goal, to start a conversation about privacy, government outreach, and secret courts.
Also he's living in Moscow with his girlfriend while Manning rotted in solitary for seven years and attempted suicide several times.
Snowden leaked to people who were more selective than Manning, at least. And we don't actually know where it would have gotten him with the legal syste, since as well as learning "how to leak" from Manning's negative example, he also seems to have learned "where to be when the leaks become public" by the same method.
Am I saying I think it's outright justified? No, because I'm honestly not sure. I am however sure that it's not as black and white as 'legal' vs 'illegal' when it comes to whistleblowing because the extra infromation helps us establish a context and understand a sense of scale of the wrongdoing, for example.
edit: Here's an example: It's probably not illegal that the 'official' estimates of civilian deaths in the Iraq war were likely far lower than the reality. Assume for the sake of discussion that this was intentional. Having a better understanding the more realistic magnitude of civilian deaths helps the public understand the realities of such wars and helps them make more informed decisions on whether they're comfortable with the actions of their government. It changes the context of the Iraq war and may go from 'we were justified in doing it' to 'it wasn't worth it' for some of the voting public.
Manning also went for a bulk dump strategy rather than being selective. Ultimately when you're dealing with a lot of data, that might be the only reasonable way to get it, but leaking unnecessary data where no incriminating evidence is present certainly detracts from the legitimacy of whistleblowing claims. If you can afford the time to be selective in your dumping or at least in your releasing, take it.
Unfortunately some of Manning's stuff got leaked in full, I believe not due to anything of Manning or Wikileaks' fault, but because an uninformed or careless journalist published an insurance key he shouldn't have.