Exception = org.xml.sax.SAXException
Source = com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope
probeid = 709
Stack Dump = java.io.UnsupportedEncodingException: "UTF-8"
at com.ibm.ws.webservices.engine.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:268)
at com.ibm.ws.webservices.engine.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:698)
at com.ibm.ws.webservices.engine.Message.getSOAPEnvelope(Message.java:440)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.checkSOAPSemantics(JAXRPCSOAPHandler.java:218)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCSOAPHandler.invokeServerRequestHandler(JAXRPCSOAPHandler.java:188)
at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler$1.invoke(JAXRPCHandler.java:232)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:203)
at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:61)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:217)
at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:217)
at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:258)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:835)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:341)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
This web service works fine when called from any of the following clients:
* The Websphere Web Services Explorer
* The generated Web Services Test Client from the Web Service wizard
* A VB.NET application.
Using tcpmon, I noticed that the Microsoft SOAP toolkit sends Content-Type: text/xml; charset="UTF-8" (with quotes).
Every other client (above) sends Content-Type: text/xml; charset=utf-8 (without quotes)
A sample call from MS Soap Toolkit:
POST /myapp/services/myservice HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset="UTF-8"
User-Agent: SOAP Toolkit 3.0
Host: localhost
Content-Length: 615
Connection: Keep-Alive
Cache-Control: no-cache
Pragma: no-cache
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<getVersionList xmlns="http://myapp.com">
<repositoryId xmlns:SOAPSDK4="http://myapp.com"></repositoryId>
<objectId xmlns:SOAPSDK5="http://myapp.com">090005788000a4aa</objectId>
</getVersionList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
A sample call from the Web Services Explorer:
POST /myapp/services/myservice HTTP/1.0
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: 447
SOAPAction: ""
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope xmlns:q0="http://myapp.com" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<q0:getVersionList><q0:repositoryId></q0:repositoryId><q0:objectId>090005788000a4aa</q0:objectId></q0:getVersionList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
To debug the problem, I created a simple HTTP client to send the same SOAP request with and without
quotes around the UTF-8 on the Content-Type header. I received the exception only when I send quotes.
I believe the quotes are valid based on IETF XML Media Type RFC's (RFC2376 and RFC3023), and the examples
shown in the WSAD v5.1 help (e.g., "Example: Caching Web Services"). I've seen some javadoc that suggests it is an error to put quotes around
the charset but it's all throughout the documentation and seems to have been supported at some point in time.
Unfortunately, the Microsoft SOAP toolkit doesn't allow you to change the Content-Type header.
To make my life simple, I'd like to use the high-level API from the Microsoft SOAP toolkit without
having to write any custom code to reduce complexity.
I've tried the following:
* Backing out Interim Fix 001
* set the JVM client.encoding.override property in the test environment to UTF-8
* Turning on Automatic Response/Request Encoding
* Document Literal and RPC encoded Web Service
Is this a bug in Websphere Studio or is there something I can change or add to get around this problem?
Any suggestions anyone has would be greatly appreciated. I've nearly run out of ideas on how to address this problem short of writing a custom client that does simple HTTP POSTs.
Thanks.
...and so on
I use NetTool from capescience.com for tuneling; it also includes an HTTP tool so I can try stuff with the same program: If I repost the VB6 client generated soap envelop with all the proper headers and without the above mentioned encoding="UTF-8" standalone="no" xml header like:
<?xml version="1.0"?>
It goes trough with no problem, I get a valid response to the VB client from the WAS web service.
NOW All I have to do is to tell to the MSSOAP API not to include them. Unfortunately I cannot do that.
Even when I use the low level API.
I am at the same point where you are now. Let's keep each other posted if something comes up. I have no clue how to proceed.
cheers
I don't know if this would solve your problem. To pinpoint my problem I only tried removing the quotes from the Content-Type header and not from the XML declaration like you did.