Quantcast

Must File component write the body?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Must File component write the body?

Tim Dudgeon
When using the File component to write to a file is it always the
message body that is written, or is it possible to use an expression
(e.g. simple)?
Of course body can be replaced with new content using an expression, but
is that the only way to do this?

Tim
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Must File component write the body?

Claus Ibsen-2
On Wed, Sep 12, 2012 at 11:54 AM, Tim Dudgeon <[hidden email]> wrote:
> When using the File component to write to a file is it always the message
> body that is written, or is it possible to use an expression (e.g. simple)?
> Of course body can be replaced with new content using an expression, but is
> that the only way to do this?
>

Yes, you can use wireTap with an expression to set the body which taps
to the file endpoint. Then you can write without changing the original
exchange.

Or just use a bean and write the file content yourself.


> Tim



--
Claus Ibsen
-----------------
FuseSource
Email: [hidden email]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Loading...