The ends do not justify the means
The ends do justify the means when considered holistically.
The prosecution will undoubtedly preface everything by saying that protecting secrets while maintaining an orderly process of declassification is important to the functioning of government and to national security. That is an end which they are seeking through the punishment of Bradley Manning.
To the contrary and an equally valid an argument is that the outcome has been on balance positive in that once it was revealed how US diplomats evaluated foreign leaders it showed to the people of these countries that their governments not only were not respected but were rather the laughing stock of the world.
But it is also fair to say that people have died because of these leaks. Perhaps fighting for a good cause, but still dying. In which case the outcome very much matters. Dying (and killing) for a good cause is better than dying for a failed one.
Also consider the morality of betraying a confidence placed in you. That is an outcome also.
So perhaps one particular end does not justify the act, but a more perfect justice would consider all the ripples from this act and judge and punish accordingly. If I had to call it based on an admittedly incomplete set of information. He is probably guilty of mishandling classified information and should receive some minimal punishment.
I do believe that law and order and national security are important enough to justify some secrets and that people must weigh some serious consequence when deciding to leak. 6 months or 1 year in jail (including time served) and dishonorable discharge would cover it in my mind. And it would wisely balance both the actual and potential harm and the benefits of his alleged act.