A difficult question actually. Both philosophically and legally. Basically the question is whether it should be possible to punish people even though all they were doing was to follow the law of their own country. Basically Nuremberg answered this question with a "yes, under certain circumstances".
It is very easy to come up with absurd consequences of that reasoning though. Be that as it may, it is still the law, so to answer your question: Yes, the soldiers are responsible even if they did not do anything unlawful in their own country.