aspose file tools*
The moose likes Web Services and the fly likes solution for extracting faultstring from SOAP FAULT EXCEPTION Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply locked New topic
Author

solution for extracting faultstring from SOAP FAULT EXCEPTION

prince davies
Ranch Hand

Joined: May 08, 2009
Posts: 74


Help me to find out a good solution.


Is there any optimal way of extracting fault string from the SOAP FAULT EXCEPTION. i have provided my code how retrieved the fault string.

Parent and Children elements inside SOAP FAULT EXCEPTION
[ <con:errorCode>BEA-382500</con:errorCode>, <con:reason>yyyyyy</con:reason>,
<con:details>
<con1:ReceivedFaultDetail xmlns:con1="<http://www.bea.com/wli/sb/stages/transform/config>">
<con1:faultcode>soapenv:Server</con1:faultcode>
<con1:faultstring>ERR-666666 : error messsage here</con1:faultstring>
<con1:detail>
<ns7:ServiceException xmlns:S="<http://xsi:nil="true">
</ns7:ServiceException>
</con1:detail> <con1:http-response-code>500</con1:http-response-code> </con1:ReceivedFaultDetail>
</con:details>, <con:location><con:node>PipelinePairNode1</con:node><con:pipeline>PipelinePairNode1_request</con:pipeline><con:stage>checkAndDetermineBillingCycles1</con:stage><con:path>request-pipeline</con:path> </con:location>]


prince davies
Ranch Hand

Joined: May 08, 2009
Posts: 74
XPATH SOLUTION

I am getting SOAPFaultException on the fly and getting cause of the exception. This cause contains XML string to find out respective fault string.

How do i parse and feed soapfaultexception or cause into xpath methods?

How do I get value from the following node faultstring which is 3 layers down
detail
ReceivedFaultDetail
faultstring










Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Double-posting.
See this thread: http://www.coderanch.com/t/562634/Web-Services/java/SOAPFaultException-EXTRACTING-FAULT-STRING-XPATH
Locking this thread.


My free books and tutorials: http://www.slideshare.net/krizsan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: solution for extracting faultstring from SOAP FAULT EXCEPTION