Error 400: Bad Request
The WS request from the normal app (with a few URLS removed):
<?xml version="1.0" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="(URL Removed)" xmlns:ns2="(URL Removed)" xmlns:ns3="http://www.w3.org/XML/1998/namespace">
<soapenv:Body>
<ns1:QueryRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"></ns1:QueryRequest>
</soapenv:Body>
</soapenv:Envelope>
The WS from the servlet (with the same URLs removed):
<?xml version="1.0" ?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="(URL Removed)" xmlns:ns2="(URL Removed)">
<soapenv:Body>
<ns1:QueryRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
</soapenv:Body>
</soapenv:Envelope>
Edit:
The problem appears to be the following text:
xmlns:ns3="http://www.w3.org/XML/1998/namespace"
I'm sure I can remove it with a handler, but I would like to know why it's there to begin with (and if I can remove it without the handler).
Message was edited by:
cahastings
# 1
Actually, I don't seem to be able to remove it with a handler. Any attempts at using a SOAPHandler cause exceptions when I attempt to actually access the object.
ERROR: 'The prefix "xml" cannot be bound to any namespace other than its usual namespace; neither can the namespace for "xml" be bound to any prefix other than "xml".'
Apr 18, 2007 11:14:17 AM com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
SEVERE: SAAJ0511: Unable to create envelope from given source
ERROR: 'NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.'
Apr 18, 2007 11:14:18 AM com.sun.xml.messaging.saaj.soap.EnvelopeFactory createEnvelope
SEVERE: SAAJ0511: Unable to create envelope from given source
javax.xml.ws.WebServiceException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.callHandlersOnResponse(SOAPMessageDispatcher.java:689)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.receive(SOAPMessageDispatcher.java:524)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.doSend(SOAPMessageDispatcher.java:258)
at com.sun.xml.ws.protocol.soap.client.SOAPMessageDispatcher.send(SOAPMessageDispatcher.java:137)
at com.sun.xml.ws.encoding.soap.internal.DelegateBase.send(DelegateBase.java:84)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.implementSEIMethod(EndpointIFInvocationHandler.java:172)
at com.sun.xml.ws.client.EndpointIFInvocationHandler.invoke(EndpointIFInvocationHandler.java:106)
Anyone have any idea why I'm seeing this in the first place?