Hi Tanmay
We are evaluation Synapse to find out whether we use Enterprise wide. Many of our Applications use Sonic MQ to send / receive messages
Cool.. do let us know if you have any other questions w.r.t. Synapse for your evaluation..
I have configured a Proxy to listen from Sonic MQ. As per the Synapse documentation I 
have configured axis2.xml for JMSReceiver. When I place a SAOP Message on Sonic MQ ( 
SampleQ1 ) , Synapse can listen and do the web service call out over http. Now I want to 
send the Response back to another queue (SampleQ2) in Sonic MQ. I have specified 
"transport.jms.ReplyDestination" paratemer in the proxy configuration, but does 
not work. I am getting the following error
This is because you have not created the response queue already. ActiveMQ (which we typically use for samples and demos) creates queues on demand (i.e. if they are prefixed as "dynamicQueues/<QueueName>". Thus let me share a snippet from a modified sample 250 that I tried just now with ActiveMQ

My synapse.xml is:
<definitions xmlns="http://ws.apache.org/ns/synapse";>
   <proxy name="StockQuoteProxy" transports="jms">
       <target>
           <endpoint>
<address uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
           </endpoint>
           <outSequence>
       <log level="full"/>
               <send/>
           </outSequence>
       </target>
       <parameter name="transport.jms.DestinationType">queue</parameter>
<parameter name="transport.jms.ReplyDestination">dynamicQueues/SampleQ2</parameter>
   </proxy>
</definitions>

And I modified the GenericJMSClient.java (sample client) to send a getQuote request as:
...
   } else if ("pox".equalsIgnoreCase(type)) {
           app.sendTextMessage(dest,
"<m0:getQuote xmlns:m0=\"http://services.samples/xsd\";><m0:request><m0:symbol>IBM</m0:symbol></m0:request></m0:getQuote>");
....

Now on the log, I see:
2008-06-11 10:13:11,590 [127.0.1.1-asankha] [HttpClientWorker-1] INFO LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:56B25A35019B946CA812131593915316310021749385213, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><ns:getQuoteResponse xmlns:ns="http://services.samples/xsd";><ns:return type="samples.services.GetQuoteResponse"><ns:change>3.8963028454997812</ns:change><ns:earnings>-9.007511436429999</ns:earnings><ns:high>90.62490651941376</ns:high><ns:last>86.781229934912</ns:last><ns:lastTradeTimestamp>Wed Jun 11 10:13:11 IST 2008</ns:lastTradeTimestamp><ns:low>-85.7804439087995</ns:low><ns:marketCap>1.2997826975147944E7</ns:marketCap><ns:name>IBM Company</ns:name><ns:open>-86.55106785664815</ns:open><ns:peRatio>-19.492848379609608</ns:peRatio><ns:percentageChange>3.9200749257359955</ns:percentageChange><ns:prevClose>99.39358097264554</ns:prevClose><ns:symbol>IBM</ns:symbol><ns:volume>18116</ns:volume></ns:return></ns:getQuoteResponse></soapenv:Body></soapenv:Envelope> 2008-06-11 10:13:11,592 [127.0.1.1-asankha] [HttpClientWorker-1] WARN JMSConnectionFactory Error looking up destination for JNDI name : queue://SampleQ2 2008-06-11 10:13:24,823 [127.0.1.1-asankha] [I/O dispatcher 3] INFO LogMediator To: http://www.w3.org/2005/08/addressing/anonymous, MessageID: urn:uuid:56B25A35019B946CA81213159404813765004-459066398, Direction: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body /></soapenv:Envelope>

Note the first WARN message "WARN JMSConnectionFactory Error looking up destination for JNDI name : queue://SampleQ2" after which the queue is created by ActiveMQ, and then you will not get this message thereafter. Ofcourse with Sonic, you would need to create them before you run the scenario.

Note: Sometimes with some JMS providers, the JNDI name and the physical JMS destination names can be different, check this for Sonic

asankha



Reply via email to