I am trying to use a SOAP service I don't control. The service does not like the SOAP Header attribute: soapenv:mustUnderstand="0" My client input data does not contain the mustUnderstand attribute, Axis2 is adding it! (see debug excerpt below)
How can I make the unwanted mustUnderstand="0" attribute in the SOAP Header go away? I generated Axis2 client databindings using wsdl2java.sh and the "-d" option wsdl2java.sh -uri simple.wsdl -p ... -s -d none I wrote an Axis2 client ;-) I set options: stub._getServiceClient().getOptions().setSoapVersionURI( Constants.URI_SOAP11_ENV); stub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED , "false"); stub._getServiceClient().getOptions().setProperty( AddressingConstants.DISABLE_ADDRESSING_FOR_OUT_MESSAGES, "true"); The Axis2 client code generates and sends a beautiful SOAP request: [DEBUG] >> "POST /SOAP HTTP/1.1[\r][\n]" [DEBUG] >> "Content-Type: text/xml; charset=UTF-8[\r][\n]" [DEBUG] >> "SOAPAction: "Sync"[\r][\n]" [DEBUG] >> "User-Agent: Axis2[\r][\n]" [DEBUG] >> "Host: somewhere.com:7443[\r][\n]" [DEBUG] >> "Content-Length: 2734[\r][\n]" [DEBUG] >> "[\r][\n]" [DEBUG] >> "<?xml version=' 1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header><ns:HdrElement xmlns:ns="..." soapenv:mustUnderstand="0"> ... The SOAP response has: [DEBUG] << "<faultcode>SOAP-ENV:Client</faultcode> [DEBUG] << "<faultstring>Request not conforming to schema</faultstring> [DEBUG] << "<description> error parsing 'XML document':: Error at line 1: /soapenv:Envelope/soapenv:Header/ns:HdrElement: undeclared attribute: "mustUnderstand": /soapenv:Envelope/soapenv:Header/ns:HdrElement: undeclared attribute: "mustUnderstand" </description> dana j hess