Have you tried this on 3.0.1? May be 2.1.3 doesn't support the same
sample. Please check this on 3.0.1.
Thanks,
Ruwan
On 12/8/10 6:22 PM, Aalto Ilari wrote:
Hi,
I'm after synchronous http requestàjms-endpointàhttp response on the
same client connection. I have setup something similar to Sample 264
from v. 3.0.1 in 2.1.3, but can't get the final response back to the
original http SOAP client (in my case SOAP UI). So I've verified
(debugging) that I get a response back from my ActiveMQ JMS Endpoint,
but it just disappears and is never sent back through HTTP to the client.
Here is my synapse.xml:
<?xml version="1.0" encoding="UTF-8"?>
<syn:definitions xmlns:syn="http://ws.apache.org/ns/synapse">
<syn:endpoint name="xxx/xxx/mytest/jms-sample-JMS/1.0-SNAPSHOT">
<syn:address
uri="jms:/ExampleServiceQueue?&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue&JMS_REPLY_TO=dynamicQueues/ExampleServiceReplyQueue&transport.jms.ConnectionFactory=myQueueConnectionFactory">
<syn:suspendOnFailure>
<syn:initialDuration>1000</syn:initialDuration>
<syn:progressionFactor>1.0</syn:progressionFactor>
<syn:maximumDuration>10000</syn:maximumDuration>
</syn:suspendOnFailure>
</syn:address>
</syn:endpoint>
<syn:proxy transports="http" trace="enable" name="jms-sample"
startOnLoad="true" statistics="enable">
<syn:target outSequence="jms-sample" inSequence="jms-sample"
endpoint="xxx/xxx/mytest/jms-sample-JMS/1.0-SNAPSHOT">
<syn:faultSequence>
<syn:log level="full"/>
<syn:drop/>
</syn:faultSequence>
</syn:target>
<syn:publishWSDL
uri="file:registry/xxx/xxx/mytest/myproject-sei/1.0-SNAPSHOT/ExampleService.wsdl"/>
<syn:parameter
name="transport.jms.ConnectionFactory">myQueueConnectionFactory</syn:parameter>
</syn:proxy>
<syn:sequence trace="enable" name="jms-sample">
<syn:in>
<syn:property scope="axis2" name="JMS_REPLY_TO"
value="dynamicQueues/ExampleServiceReplyQueue"/>
<syn:property scope="axis2" name="transport.jms.ContentTypeProperty"
value="Content-Type"/>
</syn:in>
<syn:out>
<syn:property scope="axis2" name="TRANSPORT_HEADERS" action="remove"/>
<syn:send/>
</syn:out>
</syn:sequence>
</syn:definitions>
So I get a response back in org.apache.axis2.transport.jms.JMSSender
(which I have been debugging as no logs appear from a successful
correlationId & replyToDestination Listener read):
private void waitForResponseAndProcess(Session session, Destination
replyDestination,
MessageContext msgCtx, String correlationId,
String contentTypeProperty) throws AxisFault {
...
Message reply = consumer.receive(timeout);
if (reply != null) {
//Gets here but there reply is "lost" afterwards
This is what is outputted with DEBUG:
[2010-12-08 14:40:29,816] DEBUG - SequenceMediator Start : Sequence
<jms-sample>
[2010-12-08 14:40:29,816] DEBUG - SequenceMediator Sequence
<SequenceMediator> :: mediate()
[2010-12-08 14:40:29,831] DEBUG - SequenceMediator End : Sequence
<jms-sample>
[2010-12-08 14:40:29,831] DEBUG - AddressEndpoint Sending message
through endpoint : xxx/xxx/mytest/jms-sample-JMS/1.0-SNAPSHOT
resolving to address =
jms:/ExampleServiceQueue?&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&java.naming.provider.url=tcp://localhost:61616&transport.jms.DestinationType=queue&JMS_REPLY_TO=dynamicQueues/ExampleServiceReplyQueue&transport.jms.ConnectionFactory=myQueueConnectionFactory
[2010-12-08 14:40:29,831] DEBUG - AddressEndpoint SOAPAction:
[2010-12-08 14:40:29,831] DEBUG - AddressEndpoint WSA-Action:
[2010-12-08 14:41:05,675] DEBUG - JMSConnectionFactory Creating a new
JMS Session from JMS CF : myQueueConnectionFactory
[2010-12-08 14:41:05,675] DEBUG - JMSConnectionFactory Creating a new
JMS MessageProducer from JMS CF : myQueueConnectionFactory
[2010-12-08 14:41:05,675] DEBUG - JMSUtils Expecting a response to JMS
Destination : ExampleServiceReplyQueue
[2010-12-08 14:41:05,675] DEBUG - JMSMessageSender Sent Message
Context ID : urn:uuid:1F9ADC7673C92F3D6312997682793206483157169 with
JMS Message ID : ID:localhost-3879-1291811958473-0:3:2:1:1 to
destination : queue://ExampleServiceQueue
[2010-12-08 14:41:05,722] DEBUG - JMSMessageSender Committed local
(JMS Session) Transaction
[2010-12-08 14:41:07,409] DEBUG - JMSSender Waiting for a maximum of
30000ms for a response message to destination :
queue://ExampleServiceReplyQueue with JMS correlation ID :
ID:localhost-3879-1291811958473-0:3:2:1:1
Axis2.xml has (both JMSSender and JMSListener are identical):
<transportSender name="jms"
class="org.apache.axis2.transport.jms.JMSSender">
<parameter name="myTopicConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial"
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url"
locked="false">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName"
locked="false">TopicConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType"
locked="false">topic</parameter>
</parameter>
<parameter name="myQueueConnectionFactory" locked="false">
<parameter name="java.naming.factory.initial"
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url"
locked="false">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName"
locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType"
locked="false">queue</parameter>
<parameter name="queue.ExampleServiceQueue"
locked="false">ExampleServiceQueue</parameter>
</parameter>
<parameter name="default" locked="false">
<parameter name="java.naming.factory.initial"
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
<parameter name="java.naming.provider.url"
locked="false">tcp://localhost:61616</parameter>
<parameter name="transport.jms.ConnectionFactoryJNDIName"
locked="false">QueueConnectionFactory</parameter>
<parameter name="transport.jms.ConnectionFactoryType"
locked="false">queue</parameter>
<parameter name="queue.ExampleServiceQueue"
locked="false">ExampleServiceQueue</parameter>
</parameter>
</transportSender>
-Ilari
------------------------------------------------------------------------
Disclaimer: This message and any attachments thereto are intended
solely for the addressed recipient(s) and may contain confidential
information.
If you are not the intended recipient, please notify the sender by
reply e-mail and delete the e-mail (including any attachments thereto)
without producing, distributing or retaining any copies thereof. Any
review, dissemination or other use of, or taking of any action in
reliance upon, this information by persons or entities other than the
intended recipient(s) is prohibited.
Thank you.
_______________________________________________
Esb-java-user mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
--
Ruwan Linton
Software Architect& Product Manager, WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.com
Lean . Enterprise . Middleware
phone: +1 408 754 7388 ext 51789
email: [email protected]; cell: +94 77 341 3097
blog: http://blog.ruwan.org
linkedin: http://www.linkedin.com/in/ruwanlinton
tweet: http://twitter.com/ruwanlinton
_______________________________________________
Esb-java-user mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user