I have used following code to handle error on soap call

proxy
==============

<faultSequence>
            <makefault version="soap11">
                <code xmlns:tns="http://www.w3.org/2003/05/soap-envelope";
                    value="get-property('FAULT_CODE')" />
                <reason expression="get-property('ERROR_CODE')" />
                <detail expression="get-property('ERROR_MESSAGE')" />
            </makefault>
            <send />
        </faultSequence>

Output
==============
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode xmlns:tns="http://www.w3.org/2003/05/soap-envelope
">123456</faultcode>
         <faultstring>abc</faultstring>
         <detail>xyz</detail>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>


I need to know what is the best approach to handle exception on REST calls.

i tried to apply same way just for try but it only give ERROR_MESSAGE not
another...

my expectation is to deliver all exception to client (caller). eg:
transport error due to unavailable endpoint.. etc
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to