3 Replies Latest reply on Apr 4, 2008 4:59 AM by Tom Fennelly

    Problem Accesing multiple Service

    Rajib Chaudhuri Newbie

      My jboss-esb.xml is like below.

      <jbossesb parameterReloadSecs="5" xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
       <providers>
       <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-context-factory="org.jnp.interfaces.NamingContextFactory" jndi-URL="localhost">
       <jms-bus busid="troubleTicketEsbChannel">
       <jms-message-filter dest-name="/queue/TroubleTicketPOC_esb" dest-type="QUEUE"/>
       </jms-bus>
       </jms-provider>
       </providers>
       <services>
       <service category="CreateTroubleTicketService" name="TroubleTicketCreate_esb" description="Create Trouble Ticket Consumer">
       <listeners>
       <jms-listener name="JMS-ESBListener" busidref="troubleTicketEsbChannel" maxThreads="20" is-gateway="false"/>
       </listeners>
       <actions>
       <action name="request-mapper" class="com.wipro.poc.troubleticket.action.TroubleTicketProcessRequestAction" process="processTroubleTicket"/>
       <action name="soapui-client-action" class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <property name="wsdl" value="http://127.0.0.1:8090/TroubleTicket_POC?wsdl"/>
       <property name="responseAsOgnlMap" value="true"/>
       <property name="SOAPAction" value="createTroubleTicketByValue"/>
       </action>
       <action name="response-mapper" class="com.wipro.poc.troubleticket.action.MyResponseAction"></action>
       </actions>
       </service>
       <service category="DisplayTroubleTicketService"
       name="TroubleTicketDisplay_esb" description="Display Trouble Ticket Consumer">
       <listeners>
       <jms-listener name="JMS-ESBListener"
       busidref="troubleTicketEsbChannel" maxThreads="20"
       is-gateway="false">
       </jms-listener></listeners>
       <actions>
       <action name="request-mapper" class="com.wipro.poc.troubleticket.action.TroubleTicketProcessRequestAction" process="processTroubleTicket"/>
       <action name="soapui-client-action" class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <property name="wsdl" value="http://127.0.0.1:8090/TroubleTicket_POC?wsdl"></property>
       <property name="responseAsOgnlMap" value="true"></property>
       <property name="SOAPAction" value="getTroubleTicketsByKeys"></property></action>
       <action name="response-mapper" class="com.wipro.poc.troubleticket.action.MyResponseAction"></action></actions>
       </service>
       <service category="UpdateTroubleTicketService"
       name="TroubleTicketUpdate_esb" description="Display Trouble Ticket Consumer">
       <listeners>
       <jms-listener name="JMS-ESBListener"
       busidref="troubleTicketEsbChannel" maxThreads="20"
       is-gateway="false">
       </jms-listener></listeners>
       <actions>
       <action name="request-mapper" class="com.wipro.poc.troubleticket.action.TroubleTicketProcessRequestAction" process="processTroubleTicket"/>
       <action name="soapui-client-action" class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <property name="wsdl" value="http://127.0.0.1:8090/TroubleTicket_POC?wsdl"></property>
       <property name="responseAsOgnlMap" value="true"></property>
       <property name="SOAPAction" value="setTroubleTicketByValue"></property></action>
       <action name="response-mapper" class="com.wipro.poc.troubleticket.action.MyResponseAction"></action></actions>
       </service>
       </services>
      </jbossesb>

      but when I calling ServiceInvoker using any Category & Service Name. Its not executing the proper SOAPAction, its executing by order.

      Suppose I Executing
      ServiceInvoker deliveryAdapterDisplay = new ServiceInvoker("DisplayTroubleTicketService", "TroubleTicketDisplay_esb");
      
      Message requestMessage = MessageFactory.getInstance().getMessage(MessageType.JAVA_SERIALIZED);
      
      requestMessage.getBody().add(xmlString);
      
      Message replyMessage = deliveryAdapterDisplay.deliverSync(requestMessage,20000);


      Its invoking 1st createTroubleTicketByValue, then if I resubmit again its executing getTroubleTicketsByKeys.

      if I resubmit again the same action, its executing setTroubleTicketByValue.

      So its executing by order irespective of the ServiceInvoker call.

      Please help me out if I am writing the jboss-esb.xml not properly.