On Mon, Jun 24, 2013 at 11:52 PM, lassesvestergaard
<[email protected]> wrote:
> Hi all.
>
> I managed to get it working by upgrading to commons-net 3.3 (thanks). I
> didn't know how to do this in Maven, but it seems that you just make a
> specific dependency for commons-net in your POM, and then the implicit
> commons-net dependency disappears. I don't know if this also go for making a
> specific dependency that has a lower version than the implicit dependency.
>
> All-in-all it seems to work. I have a couple of additional questions though:
>
> First of all it seems that the Exchange.getIn().getBody(), in the Process,
> returns a GenericFile, and I can only convert it to FTPFile. How would I go
> about this if I want to have a java.io.File?
>

You cannot get the ftp as a java.io.File. That is only for file component.
The ftp component uses the FTPFile type which is from the common net
library (which is the ftp client we use)


> I can read in the documentation on FTP2 that I will have better performance
> if I first download files to a local folder, and then read them later. I'm
> not sure how to leverage from this. My suggestion has been to first do:
>

Yeah if the file is big, then you can download directly to a work directory,
or you can use the new streamDownload option.

> (from://someFTP).to(file://somefolder);
>
> and then in following lines do:
>
> from(file://somefolder).process(new Process(){someCode});
>
> What I can't figure out is if this is the preferred way of doing it. Any
> suggestions?
>
> A last thing that seems odd to me, is that it looks like the FTP component
> ignores sud folders. I can only see actual files, when I run the code from
> my first post. I cannot traverse my entire file structure. I have tried to
> set recursive=true and stepwise=true. I start from my root folder when
> reading.
>
> Any comment is appreciated
>
> Regards
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Cannot-change-directory-to-Code-550-on-FTP-component-tp5734612p5734682.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

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