Yes, as far as I know, all European militaries operated with the support of some sort of legal framework within which discipline, infractions, and the basic rules were formally laid down, key procedures established, and authorities identified or defined.
For Britian, the key documents are the Articles of War: the "known rules and regulations for the better government of the army in the kingdoms of Great Britain and Ireland, dominions beyond the seas, and foreign parts dependent upon Great Britain. THey may be altered and elarged at the pleasure of the king; but they must be annual confirmed by parliament under the military act. And in certain cases extend to civilians--as when by proclamation any place may be put under martial law; or, when people follow a camp or army for the sale of merchandize, or to serve in any menial capacity. It is ordained, that the articles of war shall be read in the circle of each regiment belonging to the British army every month, or oftener if the commanding officer thinks proper. A recruit or soldier is not liable to be tried by a military tribunal, unless it can be proved that the articles have been duly read to him."
~Charles James, "Military Dictionary" (1810)
The opening echoes the definition in Smith's "Universal Military Dictionary" (1779).
The other legal source for Britain is the Mutiny Act: "an act which passes every year in the House of Commons, to answer some specific military purposes; and by which teh army is continued on a peace or war establishment." James, again.
Hope that helps open the way to developing a sound basis for legal evaluation of what binds troops in wartime :o)
Cheers - Howie