Hi
Yeah you need to use the message translate eip
http://camel.apache.org/message-translator.html
to covert the hashmap into a format you can send as a file.
If you only need to grab one value from the map, you can just use
simple to lookup the path key from the body
<transform>
<simple>${body["Path"]}</simple>
</transform>
On Thu, Jun 26, 2014 at 12:50 PM, eswar <[email protected]> wrote:
> hi Claus - But I do not want to send the message body as is.
>
> For ex., I have a message body of type HashMap as {"Path",
> "C:/Temp/Test.txt"}. Now I need to send the file mentioned in the path using
> the sftp component. So I was thinking this HashMap should be converted into
> File so that sftp component understands to trasnfer Test.txt into remote
> server and not the message itself.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/convertBody-To-SFTP-component-tp5752815p5752846.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/