Lots of history suggests both will do as ordered in most cases and are unlikely to form their own personal legal positions as a basis for ignoring a direct order. Katrina, Ruby Ridge, Waco, etc are just small examples.
And that is a good thing. I can't imagine democracy surviving if the military got to ignore SCOTUS - we would be just another banana dictatorship. Can you imagine the mess if the national guard had refused to honor Eisenhower's orders over school desegregation? Some in the south thought that would happen. Thankfully they were wrong.
[edit: adding a great and powerful quote of the day - from Eisenhower's orders, "Our mission is to enforce the orders of the federal courts with respect to the attendance at the public schools of Little Rock of all those who are properly enrolled, and to maintain law and order while doing so ... Our individual feelings towards those court orders should have no influence on our execution of the mission."]
We are either a nation of laws or a nation of men. Washington showed he was a man of law when he broke the "freedom-loving" whisky rebellion, Lincoln when he put down the traitors of the confederacy and Eisenhower when he stood against the ghosts of the confederacy.
And now more recently, a significant part of our nation appears to have learned a very odd spin on our history. As a conservative and a 2A backer, it concerns me that people in the rural midwest - the people I grew up with - where I easily found common ground with just 20 years ago - have taken such a hard turn. I wonder if this is how traditional but moderate muslims felt when Wahhabism began to take hold of the muslim world 50 years ago? I hope we stop well short of that, but if we fail, we won't be the first culture to spin itself a self-directed disaster by following overblown fears of the modern world.