You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jctmendoza <jm...@adchemy.com> on 2012/10/02 08:08:27 UTC
File Endpoint problem in Camel 2.10
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.
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.
Re: File Endpoint problem in Camel 2.10
Posted by jctmendoza <jm...@adchemy.com>.
It works! Thanks!
--
View this message in context: http://camel.465427.n5.nabble.com/File-Endpoint-problem-in-Camel-2-10-tp5720346p5720348.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: File Endpoint problem in Camel 2.10
Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Oct 2, 2012 at 8:08 AM, jctmendoza <jm...@adchemy.com> 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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen