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 Scott Nichol <sn...@scottnichol.com> on 2004/06/01 16:30:15 UTC

Re: Timeouts, errors or failures

> I'm new to SOAP and I'm trying to build a client class to access some
> web-service. In my client class, I need to be able to determine exactly the
> results of my call, because based on those results, there are different
> actions that I should take. So I need to be able to differentiate between
> the following cases:
> 
> 1- My request did not even reach the server.
> 2- My request reached the server, but there was no reply (I guess we can
> call that time-out).

I do not think these two can be distinguished unambiguously at the TCP/IP level.  Apache SOAP definitely cannot tell you the difference.  It will throw an exception, presumably a SocketException.

> 3- My request reached the server, but there was something wrong with the
> request, so the server returned an error.
> 4- My request reached the specific web-service I'm calling, but an error
> occurred while the service was executing.

An error that occurs at the HTTP level, e.g. bad URL, would mean the HTTP server would send an HTTP error back, with whatever payload it wanted.  This would cause an exception to be thrown in Apache SOAP.  An error that occurs during SOAP processing should mean that a SOAP Fault is returned to you.  The service *may* distinguish within the Fault whether the error occurred because of your request or some error in processing a valid request, but I have seen lots of services that do not distinguish.

> 5- My request reached the specific web-service I'm calling, and the service
> responed successfully.

You will get a "normal" return from Call#invoke.

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.