camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How can I send a file to a remote ftp server using the ftp2 component
Date Sat, 17 Mar 2012 07:54:44 GMT
On Sat, Mar 17, 2012 at 1:42 AM, gsilverman
<gsilverman@dispensingsolutionsinc.com> wrote:
> All of the examples I have seen show how to retrieve files from a remote ftp
> server using the ftp component, but I need to send files. In my processor, I
> create a ProducerTemplate and try to send the file like so:
>
> ProducerTemplate template = exchange.getContext().createProducerTemplate();
>
> String route = protocol + "://" + userid + "@" +  host + ":" + port +
> directory + "?password=" + password;
>
> template.sendBodyAndHeader(route, report, "CamelFileName", filename);
>
> where protocol, userid, host, etc. are dynamic. I don't get any errors when
> using the processor but neither is the file uploaded to the host. What am I
> doing wrong?
>
> By the way, I'm using camel 2.8.1.
>

Check the logs and on the Camel side and as well on the FTP server
side to see what is going on.


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-can-I-send-a-file-to-a-remote-ftp-server-using-the-ftp2-component-tp5572863p5572863.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message