saaj

Add child elements to custom SOAP header in Spring-WS

I am calling a SOAP webservice with Spring-WS. The webservice in question requires me to pass some information in the SOAP header as shown here: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt; <soapenv:Header> <CustomHeaderElement> <clientID>xyz</clientID> <wsdlVersion>1.0</wsd...

NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces

Trying to retrieve the SOAP body from an SOAP response, but getting this error "NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces." Document doc = soapResMsg.getSOAPBody().extractContentAsDocument(); -- Exception is thrown here org.dom4j.io.DOMReader d4Reader =...