Hi, you don't need to pass that header as the option of the URI.
If you take a look at the File2[1] document, you will find there is a message header (CamelFileName) can do the job as you want.
[1]http://camel.apache.org/file2.html On 11/19/10 10:25 PM, yuanchen 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
-- Willem ---------------------------------- FuseSource Web: http://www.fusesource.com Blog: http://willemjiang.blogspot.com (English) http://jnn.javaeye.com (Chinese) Twitter: willemjiang
