SOAP Fault handling

Hello all,

I just want to check/branch on the specific condition on soap fault and scenario is like this…

If any types of data error may happen then we need to just ignore/do specific operation
and if any other transport level fault(i.e authorization denied,id/pass mismatch/target server is not available) happen then we need to through service exception.

And it is true that in any types of scenario it is returning to SOAP fault code.

Then depending upon which condition we can make sure that it is data error or transport level error.Is there any way we can make it by branching on SOAP ENV (soapenv:Server or soapenv:Client) as from client we are getting various types of data error.

Any types of help is always welcome.

Thanks
Baharul

For most systems, transport level error (connection timeout, authentication etc.) won’t result in a SOAP fault from the server, since the request didn’t reach server’s soap handling layer. You will need to catch a http level exception for that.

SOAP fault code/status should be defined by the server that offering this WS, so check with the provider.

Hi Baharul,

Checking on http status codes might suffice your requirement.

Ex:900-UnknownHostException
900-Error occurred while sending SOAP request
900-Connection timed out
500-The service cannot be found for the endpoint reference

-My .02$
Niteesh

Thanks Niteesh & Tong for your response.

I have some more confussion.
I am explaining the current scenerion.From one flow service i am invoking WS connector & the service is auditable.Now if the service get failed due to transaport level error(Unknown host/time out or session TimeOut) then we need to resubmit the failed one.Session timeout is here a SOAPFault as we are getting one sessionID in by calling different connector.

Now at the time of resubmit how we can deceide whether it is data error or transaport level error(Unknown host/time out or session TimeOut).

Thanks
Baharul