1 Reply Latest reply on Jul 5, 2011 9:53 PM by njiang

    Enrich a message with a file's content

    manta7

      Hello everyone !

       

      I have a simple problem but unfortunately I didn't find the solution on the Internet.

      I would like to enrich a message with a file's content.

       

      For example like that:

       

      from("direct:test").

      enrich("file://c:?fileName=myFile.txt").

      to("log:hello");

       

      I would like that the log prints the content of myFile.txt.

      But, with this code the body of the message (when I call direct:test) is copied on myFile.txt so my log prints the old body (instead of the content of myFile.txt).

      I hope to be clear enough...

       

      I'm using Camel 2.6 and Fuse ESB 4.3

       

      Thanks !