camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Camel Request-Reply pattern
Date Sun, 05 Feb 2012 09:00:43 GMT
On Sat, Feb 4, 2012 at 7:00 PM, wanggang1 <wanggang1@gmail.com> wrote:
> Hi,
>
> I'm new with Camel.  I have tried to search the web for an answer but could
> not come up with one.  Here is my question.  I need to route a http request
> to a Web Service.  The http request is in existing application so I could
> not change its nature(i.e. async).  My thinking is that I need to use
> Request-Reply pattern and transform XML to SOAP then SOAP to XML on its way
> back.
>
> First, is these the correct approach?
> Second,the request-reply sample shown in Camel document has the response
> from Replier going directly to Requester.  Can I add a transformer in
> between?
>

Yes that is possible.

from HTTP
  transform
  to WS
  transform (*)

When the route ends at (*) then that's the reply going back to the
requester (http client).

There are many ways in Camel you can transform a message.
You can send messages to an endpoint, eg a XSTL endpoint, you can use
a Java bean, etc.

Its the Message Translator EIP
http://camel.apache.org/message-translator.html



> Please help, and it'll be great if you could add a routing sample code.
>
> Thanks
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Request-Reply-pattern-tp5456573p5456573.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message