You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by dmitri zelikov <dm...@hotmail.com> on 2006/04/10 16:28:14 UTC

[users@httpd] Content-type on SOAP fault

Hi All,

I have a Web Service returning a SOAP fault. The content-type I set with the 
SOAP fault is text/xml and response code is set to 500.

I modify the request_rec struct and set content-type -

m_rq->content_type = "text/xml";

I even changed the headers_out and err_headers_out as below -

ap_table_set(m_rq->headers_out, "content-type", apr_pstrdup(m_rq->pool, 
"text/xml"));
ap_table_set(m_rq->err_headers_out, "content-type", apr_pstrdup(m_rq->pool, 
"text/xml"));

The problem is that when I get the SOAP fault and check my HTTP packet 
trace, I see the content-type as text/html; charset=iso-8859-1

Does apache code change the content-type underneath? Shouldnt it set it what 
I specified?

Thanks,
Vivek

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content-type on SOAP fault

Posted by dmitri zelikov <dm...@hotmail.com>.
Hi Nick.

Thanks for the reply.

The SOAP fault is an authentication failure SOAP fault.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope 
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <SOAP-ENV:Fault>
            <faultcode>
                Client.Authentication
            </faultcode>
            <faultstring>
                Authentication Failure.
            </faultstring>
        </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>


I am an authentication/authorization engine running in the background. An 
xml request is sent and the user is not authenticated. As a response, I want 
to send a SOAP fault back. The SOAP fault is as above. With this I set the 
response code to 500.

The content-type I set using the request_rec is text/xml but it shows up as 
text/html;charset=...

Please let me know if you need more information.

Thanks.


>From: Nick Kew <ni...@webthing.com>
>Reply-To: users@httpd.apache.org
>To: users@httpd.apache.org
>Subject: Re: [users@httpd] Content-type on SOAP fault
>Date: Tue, 11 Apr 2006 08:37:08 +0100
>
>On Monday 10 April 2006 15:28, dmitri zelikov wrote:
>  The content-type I set with
> > the SOAP fault is text/xml and response code is set to 500.
>
>500 is Internal Server Error.  So Apache abandons normal
>processing, and serves an ErrorDocument instead.
>
>If you'd said what you're trying to do, or even what a
>"soap fault" is, it might be easier to help.
>
>--
>Nick Kew
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Content-type on SOAP fault

Posted by Nick Kew <ni...@webthing.com>.
On Monday 10 April 2006 15:28, dmitri zelikov wrote:
 The content-type I set with
> the SOAP fault is text/xml and response code is set to 500.

500 is Internal Server Error.  So Apache abandons normal
processing, and serves an ErrorDocument instead.

If you'd said what you're trying to do, or even what a
"soap fault" is, it might be easier to help.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org