camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: JAX-RS based on XML message
Date Wed, 30 Nov 2011 13:04:19 GMT
You can put the URL into the jms message header. You can write a 
customer processor to convert the URL header to camel component can 
understand.

For you case I think you may consider to use the camel-http[1] component 
to send the request by changing the header value[2].

[1]http://camel.apache.org/http.html
[2]http://camel.apache.org/http.html#HTTP-Camel2.x

On Wed Nov 30 00:05:52 2011, Tristan23 wrote:
> I have something like this:
>
> from("jms:queue:products")
> .to(cxfrs://http://my-rs-service.com/restapi/product/1234");
>
> So I read XML documents from a JMS queue, that have a "product" element.
> Based on the value of it I wanna call a JAX-RS WebService.
>
> How would I do this?
>
> - can I somehow use XPath and parse "product" out of my incoming XML?
> - how would I dynamically build my URL for the REST Service call?
>
> cheers,
> T.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JAX-RS-based-on-XML-message-tp5032860p5032860.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


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

Mime
View raw message