I am facing a strange problem in the ESB.
Here is the issue description.
When a ESB is made to call a webservice, where the webservice throws a RuntimeException inside its implementation, the ESB captures it, wraps it and shows it as ESB Exception.
In this case the SOAP response from the webservice is mentioned below,
<env:Envelope><env:Body><env:Fault><faultstring>Internal Server Error (Caught exception while handling request: java.lang.StringIndexOutOfBoundsException: String index out of range: 10) </faultstring></env:Fault></env:Body></env:Envelope>
As you can see the exception root cause information is present in the <faultstring> SOAP response element and the ESB layer picks this exception root cause, wraps it and shows it as ESB Exception.
Now here comes the actual issue,
We have a third party system expose itself as webservice and we are calling that webservice interface through the ESB.
In case of RuntimeException, the third party (Java Implementation) sends the following SOAP response
<env:Envelope><env:Body><env:Fault><faultstring>Server Error</faultstring><detail><detailedErrorMessage> Any run time exception trace/root cause information </detailedErrorMessage></detail></env:Fault></env:Body></env:Envelope>
As you can see, <faultstring> contains only “Server Error” and the actual root cause is only present in the <faultstring><detail><detailedErrorMessage> element.
As usual ESB layer wraps the information present in the <faultstring> element and shows as “Server Error” in the ESB exception, which is not providing the root cause of the issue.
As per the SOAP 1.2 specification (http://www.w3.org/TR/2001/WD-soap12-part1-20011217/), the SOAP response given from third party is valid.
1) We can have an optional <detail> element inside <faultstring> element to indicate application specific error information
2) Detail element can have zero or more child information element
But ESB does not wraps this root cause of the exception and does not shows it in the ESB exception.
ESB Experts please advice.
July 22, 2008 5:49 AM
July 22, 2008 1:11 PM