it will take a bit to sort out, but as i understand it now, it was not within the powers of the president to do anything about changing the constitution. that was what the supreme court ruling was about. IF their military takes an oath, as we do, to protect and defend their constitution, they were doing their job. if their supreme court is supposed to rule on constitutional issues, as our is (yes, really) they were doing their job.
we don't take an oath to the president, or even the country. we agree to follow orders, but they must be lawful orders. that sends us back to the constitution and/or our officers, who do not swear to follow orders, only to protect the constitution :-). i don't know the wording of their oath, but ours is:
I, (NAME), do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign and domestic; that I will bear true faith and allegiance to the same; and that I will obey the orders of the President of the United States and the orders of the officers appointed over me, according to regulations and the Uniform Code of Military Justice. So help me God. .
officers: I, _____ (SSAN), having been appointed an officer in the ______ of the United States, as indicated above in the grade of _____ do solemnly swear (or affirm) that I will support and defend the Constitution of the United States against all enemies, foreign or domestic, that I will bear true faith and allegiance to the same; that I take this obligation freely, without any mental reservations or purpose of evasion; and that I will well and faithfully discharge the duties of the office upon which I am about to enter; So help me God.”
it's written that way for a reason. i leaves us free to protect from those within, and without, who would destroy our foundation.