camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <christian.muel...@gmail.com>
Subject Re: How to get header parameter in a to route of camel
Date Fri, 23 Mar 2012 12:07:57 GMT
I didn't used the cxfrs component until now, but my expectation would be:
- set the header you would like to send as message header
- may provide your own "headerFilterStrategy" (checkout [1] for this)

This should work, IMO. If not, feel free to raise a JIRA for it.

[1] http://camel.apache.org/cxf.html

Best,
Christian

On Thu, Mar 22, 2012 at 12:50 PM, atg roxx <atgroxx@gmail.com> wrote:

> Hi All,
>
> I am doing some processing in a route before sending it to next end point.
> and in that processor I am setting some header parameter which I want to
> use to form the next route URL.
>
>
> from( "jms:request")
>            .process(new AddHeader())
>            .to("cxfrs://http://abc.com/" + < header (test)>)
>
>
>
> AddHeader implements Processor{
>
>        @Override
> public void process(Exchange exchange) throws Exception {
>
>                exchange.getIn().setHeader("test", "test");
> exchange.getOut().setBody( exchange.getIn().getBody(), String.class);
>                exchange.getOut().setHeaders(exchange.getIn().getHeaders());
>
> }
>
> }
>
> Is it possible to have the header value test which is set in the AddHeader
> to be available in the to() route.
>
> Or is there any other way out to get that test  in the to() route.
>
>
> --Regards,
> atg roxx
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message