Whether the order is unconstitutional or not is up to the courts.  The politicians can overrule the President by passing a law but it will take a 2/3 majority to make that stick.  In the mean time, the military has to obey the Commander in Chief (i.e. the President).