* @param soapObject the SOAP object to add the attribute to
* @param mustUnderstand whether mustUnderstand is true or false
*/
public static void addSOAP11MustUnderstandAttribute(XMLObject soapObject, boolean mustUnderstand) {
if (soapObject instanceof MustUnderstandBearing) {
((MustUnderstandBearing) soapObject).setSOAP11MustUnderstand(new XSBooleanValue(mustUnderstand, true));
} else if (soapObject instanceof AttributeExtensibleXMLObject) {
((AttributeExtensibleXMLObject) soapObject).getUnknownAttributes().put(
MustUnderstandBearing.SOAP11_MUST_UNDERSTAND_ATTR_NAME,
new XSBooleanValue(mustUnderstand, true).toString());
} else {
throw new IllegalArgumentException("Specified object was neither MustUnderBearing nor AttributeExtensible");
}
}