In my SOAP application i am 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.
while sending the request.
How to fix this issue. I tried using the
SOAPEnvelope envelope = soapPart.getEnvelope();
envelope.addNamespaceDeclaration("xml","http://www.w3.org/XML/1998/namespace");
But it do not help me. Please tell me details.
Thanks
Don’t do that – the SOAP framework will manage the infrastructural namespaces for you; you can’t, and shouldn’t try to, change that behaviour, or you’ll get that error.
Why are you trying to do this?