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 drioux <dr...@pictorius.com> on 2001/03/05 23:58:24 UTC

text/html vs. text/xml?

Hi:

I was wondering what the causes/workarounds for a recently-found symptom involving a mix of Apache SOAP 2.0 and 2.1 clients and servers were.  The error I've been seeing is:

SOAPException= SOAP-ENV:Protocol, Unsupported response content type 
            "text/html", 
            must be: "text/xml". 
            Response was: 
            <head><title>Error: 400</title></head> 
            <h1>Error: 400</h1> 
            <h2>Location: /soap/servlet/rpcrouter</h2><b>Content type must be: 
            'text/xml'.</ 
            b><br></body> 

I am just wondering where the SOAP client or server is getting confused here?  Thanks for any input.

// David Rioux
// drioux@pictorius.com

Re: text/html vs. text/xml?

Posted by Wouter Cloetens <wo...@mind.be>.
David,

SOAP 2.0 checked rigorously for a content-type of "text/xml", not allowing any
character set specification. The SOAP 2.1 client by default makes the content-type
of its request "text/xml; charset=utf-8". The 2.0 server interprets this as an
invalid request and the servlet engine consequently barfs up a non-XML/SOAP
servlet exception. The client interprets that text/html response in its turn
as an invalid response.

Dizzy yet? :-)

Some of the 2.1 samples I wrote have an elaborate hack to send requests with
content-type "text/xml" anyway (xmethods and lemurlabs I believe). A clean way
to get better control over the content type is on my wishlist for 2.2.

bfn, Wouter

On Mon, Mar 05, 2001 at 06:58:24PM -0400, drioux  wrote:
> 
> Hi:
> 
> I was wondering what the causes/workarounds for a recently-found symptom involving a mix of Apache SOAP 2.0 and 2.1 clients and servers were.  The error I've been seeing is:
> 
> SOAPException= SOAP-ENV:Protocol, Unsupported response content type 
>             "text/html", 
>             must be: "text/xml". 
>             Response was: 
>             <head><title>Error: 400</title></head> 
>             <h1>Error: 400</h1> 
>             <h2>Location: /soap/servlet/rpcrouter</h2><b>Content type must be: 
>             'text/xml'.</ 
>             b><br></body> 
> 
> I am just wondering where the SOAP client or server is getting confused here?  Thanks for any input.
> 
> // David Rioux
> // drioux@pictorius.com
---end quoted text---

Re: text/html vs. text/xml?

Posted by Wouter Cloetens <wo...@mind.be>.
David,

SOAP 2.0 checked rigorously for a content-type of "text/xml", not allowing any
character set specification. The SOAP 2.1 client by default makes the content-type
of its request "text/xml; charset=utf-8". The 2.0 server interprets this as an
invalid request and the servlet engine consequently barfs up a non-XML/SOAP
servlet exception. The client interprets that text/html response in its turn
as an invalid response.

Dizzy yet? :-)

Some of the 2.1 samples I wrote have an elaborate hack to send requests with
content-type "text/xml" anyway (xmethods and lemurlabs I believe). A clean way
to get better control over the content type is on my wishlist for 2.2.

bfn, Wouter

On Mon, Mar 05, 2001 at 06:58:24PM -0400, drioux  wrote:
> 
> Hi:
> 
> I was wondering what the causes/workarounds for a recently-found symptom involving a mix of Apache SOAP 2.0 and 2.1 clients and servers were.  The error I've been seeing is:
> 
> SOAPException= SOAP-ENV:Protocol, Unsupported response content type 
>             "text/html", 
>             must be: "text/xml". 
>             Response was: 
>             <head><title>Error: 400</title></head> 
>             <h1>Error: 400</h1> 
>             <h2>Location: /soap/servlet/rpcrouter</h2><b>Content type must be: 
>             'text/xml'.</ 
>             b><br></body> 
> 
> I am just wondering where the SOAP client or server is getting confused here?  Thanks for any input.
> 
> // David Rioux
> // drioux@pictorius.com
---end quoted text---