They have taken an oath of allegence when they enlisted.
The oath is to the constitution not the man in the white house
He is commander and chief thus they will follow orders but if the order is unlawful then that can be a defense for disobeying the order.
Pleging alligance to Trump , can be an unlawful order in which case they can refuse.
Trump making them swear allegence to him is something that will be headed to the courts.
He cannot do it as they have taken an oath of allegence
I see this as that line in the sand and he crossed it.
unlawful orders
Amid rising concerns over leadership disputes at the Pentagon, shifting policies, and operational uncertainty, service members are facing a growing question: What happens when an order from the top doesn't feel right—or even legal?
www.militarydefense.com