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 a 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 = new org.dom4j.io.DOMReader(); org.dom4j.Document d4doc = d4Reader.read(doc); Using Saaj1.4 What would be a fix for this? I faced the same problem. In my case, fix the problem on server side was not an option. I fixed it on client side forcing Xalan to version 2.7.0. See