The normal way for JBossESB to function is as folows:
Application (or WS) sends a message to an ESB-gateway. From there te service which is listening on that gateway wil pickup the message and return only an answer if you have the mep="RequestResponse" set on your actions node. As long as you remain using your requestResponse mep in your coupled services (in your ESB configuration), you will recieve your answer by the same route the request came in.
In schort, if you replace your request message with a response message somewhere along the path, you will recieve your response message in your application who has send the request. If you would use like a HTTPRouter, then the router will do this automaticaly. With a JMSRouter it seems your target JMS-Queue needs to send a reply to the replytoQueue, before the message can be returned.
Does this help? Or did I mis the question?
Hans, i appreciate your feedback on it.
let me put my views more clear.
in the below scenario where in WS adapater will forward esb message(converted one) to ESB Service for processing using ServiceInvoker.
I wonder how a processed esb message(message will go thru atleast 4 dfferent service invocations) back in the webservice code, so that SOAP response can be prepared and send back to webservice aware client.?
all service transitions happen using ServiceInvoker[do you suggest any alternative way from service to service like using EPR?)
Step-1 : WS1(Router) ->
Step -2: ESB Service1(custom Router which determines the esb service from the message content)->
Step-3:ESB Service2[could be any service]->
Step-4:ESB Service3(here ESB3 could be again ESB Service1, if a message has sequence of requests to be processed , if there are no more requests to be processed this step would be a simple Response Router which makes use of JMSRouter)
here the step-2 to step-4 is already implemented, now am just trying to expose a WebService & HTTP and SFTP interfaces with some mere configuration changes.