synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruwan Linton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SYNAPSE-241) Handling of asynchronous invocations is not correct!
Date Mon, 25 Feb 2008 09:06:51 GMT

    [ https://issues.apache.org/jira/browse/SYNAPSE-241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572030#action_12572030
] 

Ruwan Linton commented on SYNAPSE-241:
--------------------------------------

This issue has two parts, first one is configuration issue;

First you need to add the following snippet of configuration to your configuration in the
in sequence so that the synapse will send a HTTP 202 Accepted message back to the client on
the channel it receives the request.

<syn:property name="RESPONSE" value="true"/>
<syn:property name="SC_ACCEPTED" value="true" scope="axis2"/>
<syn:header name="To" action="remove"/>
<syn:send/>

Then you need to store the wsa:ReplyTo and wsa:MessageID headers in the insequence using the
following configuration snippet

<syn:property name="reply-to" expression="get-property('ReplyTo')"/>
<syn:property name="message-id" expression="get-property('MessageID')"/>

and use those stored properties for the outgoing message in the outsequence as follows;

<syn:header name="To" expression="get-property('reply-to')"/>
<syn:header name="RelatesTo" action="remove"/>
<syn:header name="RelatesTo" expression="get-property('message-id')"/>

and then use a send mediator to send the message back to the client over a different channel.

Now the second part of the issue, which is that, Synapse expects a HTTP 202 Accepted from
axis2 client, but it is receiving a HTTP 200 OK instead. So that synapse thinks it as a new
message to synapse and it loops over and over. In order to overcome this issue it requires
a filter at the top of the insequence to filter out the blank messages.

Further the above specified configuration requires a patch to the synapse 1.1.1 release, for
it to work properly, which is attached to this JIRA

> Handling of asynchronous invocations is not correct!
> ----------------------------------------------------
>
>                 Key: SYNAPSE-241
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-241
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>         Environment: Windows XP SP 2
> Java JDK 1.5.0.12
>            Reporter: Jens Goldhammer
>            Priority: Blocker
>
> As found out together with Ruwan, the ESB does not handle async invocations with a separate
listener correctly.
> Following scenarios:
> - axis2 client<-> axis2 service
> If I invoke the service directly by the client, I can see that the response will not
be delivered within the same http session. I only get an accepted response by the server,
the response is delivered to the simpleServer on the client and the callbackhandler will become
active. Everything works fine!
> axis2 client<->synapse<-> axis2 service
> If I try this with synapse, I see that the same http session is used for the request
and response message. Therefore the callbackhandler on clientside does not recognize that
there is a response...
> ==============
> Listen Port: 8002
> Target Host: 127.0.0.1
> Target Port: 8180
> ==== Request ====
> POST http://localhost:8002/esbQueueService/services/QueueService HTTP/1.1
> Host: 127.0.0.1:8002
> Proxy-Connection: Keep-Alive
> SOAPAction: urn:queueOperation1
> Content-Type: text/xml; charset=UTF-8
> Transfer-Encoding: chunked
> Connection: Keep-Alive
> User-Agent: Synapse-HttpComponents-NIO
> 23f
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
>       <soapenv:Header>
>          <wsa:To>http://localhost:8002/esbQueueService/services/QueueService</wsa:To>
>          <wsa:MessageID>urn:uuid:B914C0B6FFF134DAD21095318257655744388730</wsa:MessageID>
>          <wsa:Action>urn:queueOperation1</wsa:Action>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:fromClientRequest xmlns:ns1="http://de/ibm/com/xsd/queue">
>             <ns1:reqEl> World, hello to you!</ns1:reqEl>
>          </ns1:fromClientRequest>
>       </soapenv:Body>
>    </soapenv:Envelope>0
> ==== Response ====
> HTTP/1.1 200 OK
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=UTF-8
> Transfer-Encoding: chunked
> Date: Tue, 05 Feb 2008 10:03:34 GMT
> 23b
> <?xml version='1.0' encoding='UTF-8'?>
>    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing">
>       <soapenv:Header>
>          <wsa:Action>http://de/ibm/com/wsdl/queue/service/QueueServicePortType/queueOperation1Response</wsa:Action>
>          <wsa:RelatesTo>urn:uuid:B914C0B6FFF134DAD21095318257655744388730</wsa:RelatesTo>
>       </soapenv:Header>
>       <soapenv:Body>
>          <ns1:fromQueueResponse xmlns:ns1="http://de/ibm/com/xsd/queue">
>             <ns1:respEl>from ibm World, hello to you!</ns1:respEl>
>          </ns1:fromQueueResponse>
>       </soapenv:Body>
>    </soapenv:Envelope>0
> ============== 
> For more details and code look at http://www.nabble.com/async-problems-td15287042.html.
> Ruwan has the complete code of my projects...
> Thanks for fixing,
> Jens Goldhammer

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message