You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Brian <br...@xfact.com> on 2011/01/27 16:05:06 UTC

CXF Synchronous Response Generated Asynchronously

We are using camel as our central hub for routing all XML messages between
our difference content providers. We have run into an an
implementation/design issue that we are not sure if it is possible in camel
or at least have not found a solution for it yet. We are still early users
of camel so our experience is limited and we may just be missing some
details. There is what we need to accomplish.....

1) A CXF client sends a request XML to our CXF Camel endpoint.
2) Place this request XML in an ActiveMQ and wait for the response (we have
tried the replyTo).
3) While the original request is still waiting we need to process this
request XML in an acync manner
4) We will pick the XML request from the queue, perform some processing and
send off to a CXF WS "content provider"
5) The web service content provider will receive the request and send an
immediate acknowledgment that it received the message, this acknowledgment
should not be sent back as the response to the original request XML.
6) The content provider will process the request, generate a response XML
and send that back to a CXF endpoint in camel as the response. 
7) Once the response XML is received back in a cxf camel endpoint we want to
put in into the ActiveMQ reply to queue that is still waiting from the
original request.
8) Once the response message is consumed from the reply to queue we want to
send that back to as the original requests acknowledgment.

We have tested this in various scenarios and are not sure if this is
possible. Basically we want the original request to wait until we send it
off to a async web service to get processed and the response is sent back
and then finally send that response back as the acknowledgment. 

Any advice would be greatly appreciated. Thanks.


- Brian
-- 
View this message in context: http://camel.465427.n5.nabble.com/CXF-Synchronous-Response-Generated-Asynchronously-tp3359853p3359853.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CXF Synchronous Response Generated Asynchronously

Posted by Willem Jiang <wi...@gmail.com>.
You are using very complicated message exchange pattern. I don't think 
current InOut, and InOnly exchange pattern can meet you need.
Maybe you need to do more work yourself to wrap these complicated 
interaction into a component :)


On 1/27/11 11:05 PM, Brian wrote:
>
> We are using camel as our central hub for routing all XML messages between
> our difference content providers. We have run into an an
> implementation/design issue that we are not sure if it is possible in camel
> or at least have not found a solution for it yet. We are still early users
> of camel so our experience is limited and we may just be missing some
> details. There is what we need to accomplish.....
>
> 1) A CXF client sends a request XML to our CXF Camel endpoint.
> 2) Place this request XML in an ActiveMQ and wait for the response (we have
> tried the replyTo).
> 3) While the original request is still waiting we need to process this
> request XML in an acync manner
> 4) We will pick the XML request from the queue, perform some processing and
> send off to a CXF WS "content provider"
> 5) The web service content provider will receive the request and send an
> immediate acknowledgment that it received the message, this acknowledgment
> should not be sent back as the response to the original request XML.
> 6) The content provider will process the request, generate a response XML
> and send that back to a CXF endpoint in camel as the response.
> 7) Once the response XML is received back in a cxf camel endpoint we want to
> put in into the ActiveMQ reply to queue that is still waiting from the
> original request.
> 8) Once the response message is consumed from the reply to queue we want to
> send that back to as the original requests acknowledgment.
>
> We have tested this in various scenarios and are not sure if this is
> possible. Basically we want the original request to wait until we send it
> off to a async web service to get processed and the response is sent back
> and then finally send that response back as the acknowledgment.
>
> Any advice would be greatly appreciated. Thanks.
>
>
> - Brian


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang