On Mon, May 5, 2014 at 10:58 AM, vkarkhanis <vkarkha...@gmail.com> wrote: > Hello, > Here is a situation we have: > > We intend to hit a http url with parameter as complete filePath and pass it > on to file Consumer for it to dynamically interpret it .. the scenario is > something like -- > > <route id="route_id_1"> > > <from > uri="jetty:http://{{jetty.host}}:{{jetty.port}}/fileAvailable"/> > <process ref = "processorToExtractFileName"/> > > </route> > > The exchange header will be read in the "processorToExtractFileName" > processor class to fetch the fileName passed in the request url as parameter > > This file name needs to be passed to the next route: > > <route id="route_id_2"> > > <from uri="file://{{directory_name}}?fileName={file name passed in > exchange from route_id_1}"/> > > --- > > </route> > > Can you please let us know how this scenario can be handled considering file > is polling consumer. >
This is not possible. You cannot have a file consumer route that uses dynamic uris passed in from another route. If you want to read the file, you can transform the message to a java.io.File instance <from uri="jetty" ..> <transform> <simple type="java.io.File">${header.nameOfFile}</simple> </transform> .. do something with the file > Thank you, > Regards > > Vaibhav A. Karkhanis > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Fetching-file-name-from-jetty-endpoint-and-passing-it-on-to-file-consumer-tp5750860.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/