2 Replies Latest reply on May 21, 2012 4:08 AM by Tadayoshi Sato

    SyncServiceInvoker is suppressing the raise of web service faults

    Reto Huber Newbie

      Hi

       

      I have some question regarding the JBoss ESB action SyncServiceInvoker. If i’m going to use this service invoker the fault messages from the action pipeline will not raise as expected.

       

      I try to explain it step by step.  I provide my ESB service as web service by simply adding to inXsd, outXsd and faultXsd to my actions element.

      Normally the web service returns an fault if an exception rise during the processing of the action pipeline.

      As soon as I call the SyncServiceInvoker a further exception will not cause a fault. The web service simply responds with the request.

       

      I have analysed the ESB Message and have seen that the ESB Message Header after the SyncServiceInvoker call is not the same as at the beginning. I don’t know if this is related but it was the only idea i had to look for clues.

       

      Can somebody explain me why I didn’t get the web service fault?

      Or why the header is different after calling the remote service?

      Or how I should do a proper exception handling?

       

      Thank you in advance for all of your hints.

       

      Regards,

      Reto

       

      The jboss-esb.xml stripped to the basic:

       

      {code:xml}<?xml version="1.0"?>

      <jbossesb

      xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd"

      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.0.xsd">

          <providers>

              <jms-provider connection-factory="ConnectionFactory" name="JBossMQ">

                  <jms-bus busid="briefingGwChannel">

                      <jms-message-filter dest-name="queue/testproject.test_Request_gw" dest-type="QUEUE" />

                  </jms-bus>

                  <jms-bus busid="briefingEsbChannel">

                      <jms-message-filter dest-name="queue/testproject.test_Request_esb" dest-type="QUEUE" />

                  </jms-bus>

                 

              </jms-provider>

          </providers>

       

          <services>

             

              <service category="syncServiceInvoker" name="test-1.0" description="Just for Testing" >

       

                  <listeners>

                      <jms-listener busidref="briefingEsbChannel" name="JMS-ESBInternal" />

                  </listeners>

       

                   <actions inXsd="/interface/request.xsd" outXsd="/interface/response.xsd" faultXsd="/interface/fault.xsd" validate="false" >

       

       

                      <action class="org.jboss.soa.esb.actions.SystemPrintln" name="initialMessage">

                           <property name="message" value="initialMessage:"/>

                           <property name="printfull" value="true"/>

                      </action>

         

                      <action name="openInteraction" class="org.jboss.soa.esb.actions.SyncServiceInvoker">

                          <property name="service-category" value="testproject" />

                          <property name="service-name" value="test-1.0" />

                          <property name="failOnException" value="true" />

                      </action>

                     

                      <action class="org.jboss.soa.esb.actions.SystemPrintln" name="MessageAfterInvoker_123">

                           <property name="message" value="MessageAfterInvoker"/>

                           <property name="printfull" value="true"/>

                      </action>

                     

                      <action class="com.alabus.ibs.esb.actions.ActionToFail" name="WillCauseAnException" />

                          

                       <action class="org.jboss.soa.esb.actions.SystemPrintln" name="MessageAfterInvoker2">

                           <property name="message" value="MessageAfterInvoker"/>

                           <property name="printfull" value="false"/>

                      </action>

                     

                  </actions>

                 

              </service>

          </services>

      </jbossesb>{code}

       

       

      My ESB Message Header before the service invoker:

       

      {code:xml}

      To: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/testproject.test_Request_esb/>,

                                                   <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>,

                                                   <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>,

                                                   <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>,

                                                   <wsa:ReferenceProperties jbossesb:destination-type : queue/>,

                                                   <wsa:ReferenceProperties jbossesb:destination-name : queue/testproject.test_Request_esb/>,

                                                   <wsa:ReferencePropertiesj bossesb:specification-version : 1.1/>,

                                                   <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>,

                                                   <wsa:ReferenceProperties jbossesb:persistent : true/>,

                                                  <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>,

                                                  <wsa:ReferenceProperties jbossesb:transacted : false/>,

                                                  <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ]

      ReplyTo: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/testproject.test_Request_esb_reply/>,

                                                   <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>,

                                                   <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>,

                                                   <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>,

                                                   <wsa:ReferenceProperties jbossesb:destination-type : queue/>,

                                                   <wsa:ReferenceProperties jbossesb:destination-name : queue/testproject.test_Request_esb_reply/>,

                                                   <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>,

                                                   <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>,

                                                   <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='52efce61-517a-49c5-9c13-0646ba3004d3'/>,

                                                   <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>,

                                                   <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ]

      MessageID: 16491588-0bdc-4fe8-94e3-3bbcdd9d37c7

      RelatesTo: jms:correlationID#16491588-0bdc-4fe8-94e3-3bbcdd9d37c7

      {code}

       

       

      My ESB Message Header after the service invoker. It seems that the EPRs (the JMS Queues) are a mixed up:

       

      {code:xml}

      To: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/simpletestproject.test_Request_esb_reply/>,

                                                    <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>,

                                                    <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>,

                                                    <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>,

                                                    <wsa:ReferenceProperties jbossesb:destination-type : queue/>,

                                                    <wsa:ReferenceProperties jbossesb:destination-name : queue/simpletestproject.test_Request_esb_reply/>,

                                                    <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>,

                                                    <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>,

                                                    <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='b9efd00c-ab66-4897-9ae7-81ff174e6bcd'/>,

                                                    <wsa:ReferenceProperties jbossesb:persistent : true/>,

                                                    <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>,

                                                    <wsa:ReferenceProperties jbossesb:transacted : false/>,

                                                    <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ]

      From: JMSEpr [ PortReference < <wsa:Address jms:127.0.0.1:1099#queue/simpletestproject.test_Request_esb/>,

                                                    <wsa:ReferenceProperties jbossesb:java.naming.provider.url : 127.0.0.1:1099/>,

                                                    <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>,

                                                    <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>,

                                                    <wsa:ReferenceProperties jbossesb:destination-type : queue/>,

                                                    <wsa:ReferenceProperties jbossesb:destination-name : queue/simpletestproject.test_Request_esb/>,

                                                    <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>,

                                                    <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>,

                                                    <wsa:ReferenceProperties jbossesb:persistent : true/>,

                                                    <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>,

                                                    <wsa:ReferenceProperties jbossesb:transacted : false/>,

                                                    <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ]

      MessageID: 08cd0035-5cb6-44d3-8b7e-0014d1bc6be9

      RelatesTo: 16491588-0bdc-4fe8-94e3-3bbcdd9d37c7

      {code}