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: How to get header/property info out from sendBodyAndHeader/sendBodyAndProperty
Date Sat, 20 Nov 2010 11:28:38 GMT
Hi

Learn the patterns :)

You need to use the recipient list pattern which can act dynamic.
http://camel.apache.org/recipient-list.html

On Fri, Nov 19, 2010 at 3:25 PM, yuanchen <yuanch@yahoo.com> wrote:
>
> I am trying to use ProducerTemplate.sendBodyAndProperty(endpoint, body,
> property, propertyValue) or sendBodyAndHeader(endpoint, body, header,
> headerValue) to passing some info in the property/header to endpointUri
> (used as file name) defined in CamelContext spring config below.  How do I
> configure the camel context to get the string value from header/property
> passed in sendBodyAndHeader/sendBodyAndProperty?
>
> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>        <route>
>            <from uri="direct:endpoint"/>
>            <to uri="file:/?fileName=${some string passed from
> property/header}"/>
>        </route>
> </camelContext>
>
> Thanks a lot for the help,
> YC
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-get-header-property-info-out-from-sendBodyAndHeader-sendBodyAndProperty-tp3272364p3272364.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
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message