Sample 13 show cased how to perform dual channel invocations on the client side. This sample demonstrates how to perform dual channel invocations on both client side and server side, using proxy services.
This sample will show the action of the dual channel invocation between client and Synapse as well as between Synapse and the Axis2 server. Note that if you want to enable dual channel invocation you need to set the separateListener attribute to true on the enableAddressing element of the endpoint.
Execute the stock quote client in the dual channel mode as follows:
In the above example, the request received is forwarded to the sample service hosted on Axis2 and the endpoint specifies to enable addressing and do the invocation in dual channel mode. If you observe the message flow using TCPmon, you will see that on the channel you send the request to Synapse, the response has been written as HTTP 202 Accepted, where as the real response from Synapse comes over a different channel which cannot be obsesrved unless you use tcpdump to dump all the TCP level messages.
At the same time you can observe the behaviour of the invocation between Synapse and the actual Axis2 service, where you can see a 202 Accepted message being delivered to Synapse as the response to the request. The actual response will be delivered to Synapse over a different channel.