You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by Frank Baldiga <fb...@us.ibm.com> on 2003/09/30 15:05:03 UTC

How to access HTTP response status code

I know this question has been asked before but I couldn't find an answer 
in the achives. I'm using WebSphere 5.0.1. I'm not sure what version of
SOAP it uses. My question is: how can I get access to the HTTP response 
status code in my proxy?  I checked the javadoc for the Call and 
SOAPHTTPConnection classes but there doesn't appear to be a way. A related 
issue is that for staus code 404 and 401 I get the following response back 
from WebSphere which is not very helpful -  SOAPException: 
faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type 
&quot;text/html; charset=ISO-8859-1&quot;, must be: &quot;text/xml&quot;. 
Response was:

So to know what is really going on I'd like to capture the HTTP status 
code and display a better error message in my proxy.

Thank you,
Frank Baldiga
 

Re: How to access HTTP response status code

Posted by Scott Nichol <sn...@scottnichol.com>.
There is not currently any way to do this.  The Apache SOAP code reads the HTTP status down in HTTPUtils#post, but does not pass it back up the call stack.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Frank Baldiga" <fb...@us.ibm.com>
To: <so...@ws.apache.org>
Sent: Tuesday, September 30, 2003 9:05 AM
Subject: How to access HTTP response status code


> I know this question has been asked before but I couldn't find an answer 
> in the achives. I'm using WebSphere 5.0.1. I'm not sure what version of
> SOAP it uses. My question is: how can I get access to the HTTP response 
> status code in my proxy?  I checked the javadoc for the Call and 
> SOAPHTTPConnection classes but there doesn't appear to be a way. A related 
> issue is that for staus code 404 and 401 I get the following response back 
> from WebSphere which is not very helpful -  SOAPException: 
> faultCode=SOAP-ENV:Protocol; msg=Unsupported response content type 
> &quot;text/html; charset=ISO-8859-1&quot;, must be: &quot;text/xml&quot;. 
> Response was:
> 
> So to know what is really going on I'd like to capture the HTTP status 
> code and display a better error message in my proxy.
> 
> Thank you,
> Frank Baldiga
>  
>