Personally, I don't think killing in war is justified because unless your drafted (and have no choice but to defend yourself), you choose to go to war and you choose to kill someone. Someone that you do not even know and may be there because THEY were drafted (*ahem* what I said above) and must defend themself from you! Which brings me to this;
Not all enemy soldiers "deserve it".
They're just trying to do the same thing you are, fight for their country. And if both sides were to decide that violence wasn't necessary (it's been done before!), then killing wouldn't HAVE to be justified in the way you described it. And I include this quote:
"Let not a man glory in this, that he loves his country;
let him rather glory in this, that he loves his kind."
-Baha'u'llah (current leader of the Bahai faith)