you can access the "CamelFileNameProduced" header and set that as the body after the file is written...something like this
.setBody(header(Exchange.FILE_NAME_PRODUCED)) Bharat Goyal wrote: > > Hi, > We have a route that is configured to get XML content from a http > endpoint, log it to a file using the file component (as shown below). > However, what we want is to pass only the path of the file and not input > stream to the next component in the route. Is there a way to extract the > file name and only pass that to the next uri/component in the route? > > Thanks > > <route id="http-uop-hottransfer"> > <from > uri="quartz://hotTransfer-uop-quartz?trigger.repeatInterval=2&trigger.repeatCount=0&fireNow=true"/> > > <bean ref="hotTransfer-uop-endpoint" method="route"/> > <to uri="log:newuophottransferxml"/> > <to uri="mock:newuophottransferresult" /> > <to uri="file:/tmp/?fileName=uop-hottransfer-${date:now:yyyyMMdd}.xml" /> > <to uri="log:newuophottransferxmlfile" /> > </route> > ----- Ben O'Day IT Consultant -http://benoday.blogspot.com -- View this message in context: http://camel.465427.n5.nabble.com/pass-file-name-of-generated-file-to-next-endpoint-tp4449588p4449648.html Sent from the Camel - Users mailing list archive at Nabble.com.