xml-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CKortm...@heyde.de
Subject RE: Handling SOAP Faults using HTTPURLConnection based client
Date Wed, 05 Jun 2002 08:29:02 GMT
Hi,

have you tried something like this?

      Response inquiry_response = theCall.invoke(ServerUrl, "");
      Parameter result = inquiry_response.getReturnValue();

      if(inquiry_response.generatedFault())
      {
        Fault theFault = inquiry_response.getFault();
        result_string = theFault.getFaultCode() + "\n" +
theFault.getFaultString());
      }
      else
        result_string =
inquiry_response.getReturnValue().getValue().toString();

It works fine with my client.

-----Original Message-----
From: K. Swaminathan [mailto:swami@instantis.com]
Sent: Wednesday, June 05, 2002 4:05 AM
To: soap-user@xml.apache.org
Subject: Handling SOAP Faults using HTTPURLConnection based client


Hi,

 I am trying to write a simple SOAP client using HttpUrlConnection. If the
server response
is a SOAP Fault, then The HttpURLConnection seems to throw a
FileNotFoundException, when
attempting to do a conn.getResponseCode(). How does one get access to the
fault information.
Some example that I saw on the web, suggested conn.getErrorStream(), but it
returns null.
Can someone point me to how you read in the fault info?

Thanks
Swami K.

Mime
View raw message