1

I am using JBoss AS 5.1.0 and Jboss ESB 4.10 I am trying to Invoke a Service which has a single action. I have Set MEP = oneWay for the Service.

When I Invoke the Service Using the Below Method I do not get a reply but an Exception.

new ServiceInvoker("Chapter3Sample", "Chapter3Service").deliverSync(esbMessage, 10000);

WHen I change mep=RequestResponse : I am able to get the Reply

As per my understanding ESB Message has a ReplyTo field (Since I am invkoing a Sync Request) the Message should be returned back by the last Action which is not happening in my case. Please find below the ESB XML:

<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
 xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.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.0.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd">
 <providers>
  <jms-provider connection-factory="ConnectionFactory" name="JBossMQ">
   <jms-bus busid="chapter3GwChannel">
    <jms-message-filter dest-name="queue/chapter3_Request_gw" dest-type="QUEUE"/>
   </jms-bus>
   <jms-bus busid="chapter3EsbChannel">
    <jms-message-filter dest-name="queue/chapter3_Request_esb" dest-type="QUEUE"/>
   </jms-bus>
  </jms-provider>
 </providers>
 <services>
  <service category="Chapter3Sample"
   description="A template for Chapter3" name="Chapter3Service">
   <listeners>
    <jms-listener busidref="chapter3GwChannel" is-gateway="true" name="Chapter3GwListener"/>
    <jms-listener busidref="chapter3EsbChannel" name="Chapter3Listener"/>
   </listeners>
   <actions mep="OneWay">
    <action class="org.jboss.soa.esb.samples.chapter3.MyAction"
     name="BodyPrinter">
     <property name="process" value="displayMessage"/>
     <property name="symbol" value="*"/>
     <property name="count" value="50"/>
     <property name="propertyName">
      <hierarchicalProperty attr="value">
       <inner name="myName" random="randomValue"/>
      </hierarchicalProperty>
     </property>
     <property name="exceptionMethod" value="processException"/>
     <property name="okMethod" value="processSuccess"/>
    </action>
   </actions>
  </service>
 </services>
</jbossesb>
Nishant
  • 222
  • 6
  • 21

1 Answers1

1

When your are invoking call as synchronus.

new ServiceInvoker("Chapter3Sample", "Chapter3Service").deliverSync(esbMessage, 10000). set mep=RequestResponse.

when your are invoking call asynchronus.

new ServiceInvoker("Chapter3Sample", "Chapter3Service").deliverASync(esbMessage, 10000). set mep=oneWay .

swamy
  • 1,200
  • 10
  • 23