How to receive Error code from SOAPClient : JBOSS ESB

842 Views Asked by At

I am using org.jboss.soa.esb.actions.soap.SOAPClient in my ESB. And i am trying to get the HTTP status code or any exception if SOAPClient fails to send request. Here , there may be plenty of reasons for unsuccesful delivary ex :--404,500 etc.... My requirment is to catch any error or exception (can be soap fault exception) or http status code in ESB so that i do some bussiness logic based on Exception . I tried to use below code but unable to receive any exception.

<action  class="com.xxx.esb.yyy.A228ProducerInquiry.ProducerInquiryTransactionHandler" name="RequestMapper" process="mapRequestPath">
     <property name="OGNLPath" value="AgentValidation.strXMLIN"/>
    </action>

    <action class="org.jboss.soa.esb.actions.soap.SOAPClient" name="FasatPost">
     <property name="responseAsOgnlMap" value="true" />
     <property name="wsdl" value="http://example.org?wsdl"/>
     <property name="SOAPAction" value="mySoapAction"/>
      </action>

    <action name="response-mapper"  class="com.foresters.esb.acord.A228ProducerInquiry.MyResponseAction">
     </action>

I can see exception in console and SOAP UI but unable to receive in ESB

Thanks, Madhu CM

1

There are 1 best solutions below

0
On

I have not tried this logic but 'programmers guide' mentions something like this:

  1. When there is an error while processing Message, you could invoke a predefined service or push the message to dead letter queue service.
  2. If neither of the above are configured, the error will be redirected to console, which is what you are seeing.

You can try setting the FaultTo field of Message to an exception handling service. In that exception handling service, you may execute the required recovery steps.