On Tue, Oct 2, 2012 at 8:08 AM, jctmendoza <[email protected]> wrote:
> Hi,
>
> Using Camel 2.9.1, our defined file endpoint is working correctly; the file
> name and contents are correct.
> When we upgraded to 2.10.0, the functionality broke.
> The file name (of the output file) is still correct, but it now contains the
> file name itself.
> Below is the endpoint and route:
>
> <endpoint id="sample-endpoint" uri="file:///tmp/out/?fileName=testfile.txt"
> />
>
> <route id="sample-route">
>      <from uri="direct:start" />
>      <setBody>
>           <constant>/tmp/in/testfile.txt</constant>
>      </setBody>
>      <to ref="sample-endpoint" />
> </route>
>
> After upgrading to 2.10.0, /tmp/out/testfile.txt contains
> "/tmp/in/testfile.txt" instead of the actual contents.
>

You would need to tell Camel that its a file, for example
<setBody>
  <simple resultType="java.io.File">/tmp/in/testfile.txt/<simple>
</setBody>

Or use the <convertBodyTo type="java.io.File"/> after the current <setBody>




> Thanks,
>
> James
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/File-Endpoint-problem-in-Camel-2-10-tp5720346.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to