You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Peter Go <pe...@bea.com> on 2001/01/09 20:52:22 UTC

Getting Unsupported Content Type error

I keep getting the following SOAP exception now, when everything used to
work. I get it when running the JVM client requesting a service (method), or
running org.apache.soap.server.ServiceManagerClient on a deploy.

Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Protocol;
msg=Unsupported content type "text/html", must be: "text/xml" or
"multipart/related"]

Any leads would be appreciated! Output from the tunneling program follows.
Note that the client *is* setting content type to "text/html"! Is it the
string ";charset=utf-8" that's throwing it off?

SERVER RESPONDS:
---------------------------------

HTTP/1.1 400 Bad Request
Server: WebLogic 5.1.0 04/03/2000 17:13:23 #66825
Content-Length: 33
Content-Type: text/html
Set-Cookie: WebLogicSession=...
Connection: Close

Content type must be: 'text/xml'.

CLIENT SENDS:
------------------------

POST /soap/servlet/rpcrouter HTTP/1.0
Host: localhost:7005
Content-Type: text/xml;charset=utf-8
Content-Length: 461 SOAPAction: ""
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body> <ns1:getRate xmlns:ns1="urn:demo1:exchange"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<country1 xsi:type="xsd:string">USA</country1>
<country2 xsi:type="xsd:string">japan</country2>
</ns1:getRate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>