HTTP Proxy -> JMS Request <-> JMS Response doesn't handle JMS Response

malagant's picture
Hi, I'm trying for days to get a HTTP Proxy calling a JMS endpoint to handle the JMS response properly, but fail again and again. The log shows the following: [2010-02-02 17:14:53,101] INFO - StartupFinalizerServiceComponent WSO2 Carbon started in 44 sec [2010-02-02 17:14:59,522] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Connected [2010-02-02 17:14:59,522] DEBUG - ServerHandler New incoming connection [2010-02-02 17:14:59,538] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: POST /services/Test HTTP/1.1 [2010-02-02 17:14:59,553] DEBUG - headers >> POST /services/Test HTTP/1.1 [2010-02-02 17:14:59,569] DEBUG - headers >> User-Agent: curl/7.16.4 (i686-pc-mingw32) libcurl/7.16.4 zlib/1.2.3 [2010-02-02 17:14:59,569] DEBUG - headers >> Host: localhost:8280 [2010-02-02 17:14:59,585] DEBUG - headers >> Accept: */* [2010-02-02 17:14:59,585] DEBUG - headers >> Content-Type: application/octet-stream [2010-02-02 17:14:59,585] DEBUG - headers >> Content-Length: 75761 [2010-02-02 17:14:59,600] DEBUG - headers >> Expect: 100-continue [2010-02-02 17:14:59,600] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:14:59,600] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 0; completed: false] [2010-02-02 17:15:01,585] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,585] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 8192; completed: false] [2010-02-02 17:15:01,585] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,585] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 16384; completed: false] [2010-02-02 17:15:01,600] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,600] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 24576; completed: false] [2010-02-02 17:15:01,600] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,600] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 32768; completed: false] [2010-02-02 17:15:01,616] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,616] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 40960; completed: false] [2010-02-02 17:15:01,616] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,616] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 49152; completed: false] [2010-02-02 17:15:01,631] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,631] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 57344; completed: false] [2010-02-02 17:15:01,631] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,631] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 65536; completed: false] [2010-02-02 17:15:01,647] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,647] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 73728; completed: false] [2010-02-02 17:15:01,647] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Input ready [2010-02-02 17:15:01,647] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Content decoder [content length: 75761; pos: 75761; completed: true] [2010-02-02 17:15:01,710] DEBUG - ProxyServiceMessageReceiver Proxy Service Test received a new message from : 127.0.0.1 [2010-02-02 17:15:01,741] DEBUG - ProxyServiceMessageReceiver Message To: /services/Test [2010-02-02 17:15:01,741] DEBUG - ProxyServiceMessageReceiver SOAPAction: null [2010-02-02 17:15:01,741] DEBUG - ProxyServiceMessageReceiver WSA-Action: null [2010-02-02 17:15:01,741] DEBUG - ProxyServiceMessageReceiver Using the anonymous in-sequence of the proxy service for mediation [2010-02-02 17:15:01,756] DEBUG - SequenceMediator Start : Sequence [2010-02-02 17:15:01,756] DEBUG - SequenceMediator Sequence :: mediate() [2010-02-02 17:15:01,756] DEBUG - LogMediator Start : Log mediator [2010-02-02 17:15:01,756] INFO - LogMediator text = Got a HTTP request [2010-02-02 17:15:01,756] DEBUG - LogMediator End : Log mediator [2010-02-02 17:15:01,756] DEBUG - LogMediator Start : Log mediator [2010-02-02 17:15:01,772] INFO - LogMediator To: /services/Test, MessageID: urn:uuid:5BF6C6BCDD99E634261265127300895, Direction: request [2010-02-02 17:15:01,772] DEBUG - LogMediator End : Log mediator [2010-02-02 17:15:01,772] DEBUG - SequenceMediator End : Sequence [2010-02-02 17:15:01,772] DEBUG - ProxyServiceMessageReceiver Forwarding the message to the anonymous endpoint of the proxy service [2010-02-02 17:15:01,772] DEBUG - SynapseConfiguration There is no local registry entry for key : gad_ZUTU2 [2010-02-02 17:15:01,788] DEBUG - EndpointContext Checking if endpoint : gad_ZUTU2 currently at state ACTIVE can be used now? [2010-02-02 17:15:01,788] DEBUG - AddressEndpoint Sending message through endpoint : gad_ZUTU2 resolving to address = jms:/gad_request?transport.jms.ConnectionFactoryJNDIName=connFactory&java.naming.f actory.initial=com.sun.jndi.fscontext.RefFSContextFactory&java.naming.provider.url=file:///c:/WSO2_JNDI-Directory&transport.jms.ReplyDestination=gad_reply&transport.jms.DestinationType=queue& [2010-02-02 17:15:01,788] DEBUG - AddressEndpoint SOAPAction: null [2010-02-02 17:15:01,788] DEBUG - AddressEndpoint WSA-Action: null [2010-02-02 17:15:01,803] DEBUG - Axis2FlexibleMEPClient Sending [add = false] [sec = false] [rm = false] [mtom = false] [swa = false] [format = null] [force soap11=false] [force soap12=false] [pox=fa lse] [get=false] [encoding=null] [to Address: /services/Test] [2010-02-02 17:15:01,803] DEBUG - Axis2FlexibleMEPClient Message [Original Request Message ID : urn:uuid:5BF6C6BCDD99E634261265127300895] [New Cloned Request Message ID : urn:uuid:DD54113215DC1AC4A337 00482708576101521245813] [2010-02-02 17:15:01,819] DEBUG - SynapsePropertiesLoader Retrieving synapse properties from the cache [2010-02-02 17:15:01,819] DEBUG - MiscellaneousUtil The name with ' synapse.global_timeout_interval ' cannot be found. Using default value 86400000 [2010-02-02 17:15:01,819] INFO - TimeoutHandler This engine will expire all callbacks after : 86400 seconds, irrespective of the timeout action, after the specified or optional timeout [2010-02-02 17:15:01,819] DEBUG - SynapsePropertiesLoader Retrieving synapse properties from the cache [2010-02-02 17:15:01,819] DEBUG - MiscellaneousUtil The name with ' synapse.timeout_handler_interval ' cannot be found. Using default value 15000 [2010-02-02 17:15:01,850] DEBUG - SynapseCallbackReceiver Callback added. Total callbacks waiting for : 1 [2010-02-02 17:16:01,673] DEBUG - ServerHandler HTTP connection [/127.0.0.1:4500]: Timeout [2010-02-02 17:16:01,673] DEBUG - ServerHandler Keepalive connection was closed [2010-02-02 17:16:01,673] DEBUG - ServerHandler HTTP connection [closed]: Closed [2010-02-02 17:16:01,673] DEBUG - ServerHandler Connection closed My synapse.xml is: <?xml version="1.0" encoding="UTF-8"?> 15000 and my client HTTP-Request: curl -d@C:\person.xml http://localhost:8280/services/Test -H "Content-Type: application/octet-stream" -v * About to connect() to localhost port 8280 (#0) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port 8280 (#0) > POST /services/Test HTTP/1.1 > User-Agent: curl/7.16.4 (i686-pc-mingw32) libcurl/7.16.4 zlib/1.2.3 > Host: localhost:8280 > Accept: */* > Content-Type: application/octet-stream > Content-Length: 75761 > Expect: 100-continue > * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server * Closing connection #0 I remote debugged JMSSender, JMSUtils etc. and the JMS response is coming back from the JMS endpoint with a fault message but it doesn't get into the sequence. Also, all queues are correctly recognized. Any hints for me? We are close to production and it would be great to read some helpful sentences. ;) Greetings Michael
supun's picture

Before sending the message

Before sending the message to the JMS queue, set the following property property action="set" name="transport.jms.ContentTypeProperty" value="Content-Type" scope="axis2" Thanks, Supun..
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)