camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hilde <hilde.sch...@yahoo.de>
Subject How to save a File from Body to disk
Date Thu, 10 May 2012 11:20:18 GMT
Hi folks!

The intention is to save a file from the message body to a directory on the
file system.
Unfortunately I am not able to save a file that sits inside the body to save
to disk via file component. What I am doing wrong?

<camel:endpoint id="errorFileMove"
uri="file://[[configDir]]/.error?fileName=${file:name.noext}"/>

<camel:route>
  ...
  <camel:setBody>
   <camel:simple>${headers.originialFile}</camel:simple>
  </camel:setBody>			
  <camel:to ref="errorFileMove"/>
</camel:route>			 

At the beginning after the file consumer has detected the file it is saved
to the message header
and in the end the body is equiped with that header in order to save the
file to disk via the file component. It does not work.

Cheers
Hilde



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-save-a-File-from-Body-to-disk-tp5699895.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message