wso2 - How can i catch error in wso2esb, when i send message to web service? -
i have rest service, return error http 500 (specially). fault sequence not catch error. how catch error? thanks!
my config:
<?xml version="1.0" encoding="utf-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="d" transports="https,http" statistics="disable" trace="disable" startonload="true"> <target> <insequence> <property name="force_error_on_soap_fault" value="true"/> <send> <endpoint> <address uri="http://localhost:8080/rest/ris/b"/> </endpoint> </send> <log level="full"/> </insequence> <outsequence> <send/> <property name="force_error_on_soap_fault" value="true"/> <log level="full"/> </outsequence> <faultsequence> <log level="full"> <property name="msg" value="==== fault created ==="/> </log> <send/> </faultsequence> </target> <description/> </proxy>
in outsequence, when receive response rest service, can test http status code swith or filter mediator, sample :
<filter source="$axis2:http_sc" regex="500"> <then> ... </then> <else> ... </else> </filter>
Comments
Post a Comment