You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nicolas74 <nm...@gnubila.fr> on 2014/12/05 18:16:48 UTC

ftp-component: RemoteFile to a classic File

Hi all,

I'm a little bit confused about ow to use RemoteFile in a processor with the
ftp component.

I have the following route :





In my processor, I really don't know how to proceed to convert, in my
processor, the RemoteFile to a classic File object.

Any idea ?

Best regards,
Nicolas.



--
View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ftp-component: RemoteFile to a classic File

Posted by Nicolas74 <nm...@gnubila.fr>.
Ok.

Thanks for your help guys.

Best,
Nicolas.



--
View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227p5760284.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ftp-component: RemoteFile to a classic File

Posted by François LIOT <fr...@poplidays.com>.
Hi,

I do confirm the Claus's remark,
There is no instruction in FTP to modify remotely file.

For sure, on some FTP servers, you can configure some nasty and uncommon options, and successfully instruct this,
But it's clearly not in regular FTP's RFC norms.

Regards.


________________________________________
From: Claus Ibsen <cl...@gmail.com>
Sent: Monday, December 8, 2014 9:56 AM
To: users@camel.apache.org
Subject: Re: ftp-component: RemoteFile to a classic File

On Sun, Dec 7, 2014 at 8:40 PM, Nicolas74 <nm...@gnubila.fr> wrote:
> Thanks.
> That's what I did, and it perflectly works.
>
> I have to process some modifications to the file through a java application.
> So, is it the only way to process my file ? Or is there a more optimized
> solution without downloading the file ?
>

I hardly see a way of being able to modify a remote file on a FTP
server without having one way of another to download the file.

You can use stream download if you want to process the file in a
streaming fashion.
http://camel.apache.org/ftp2


> Best,
> Nicolas.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227p5760252.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: ftp-component: RemoteFile to a classic File

Posted by Claus Ibsen <cl...@gmail.com>.
On Sun, Dec 7, 2014 at 8:40 PM, Nicolas74 <nm...@gnubila.fr> wrote:
> Thanks.
> That's what I did, and it perflectly works.
>
> I have to process some modifications to the file through a java application.
> So, is it the only way to process my file ? Or is there a more optimized
> solution without downloading the file ?
>

I hardly see a way of being able to modify a remote file on a FTP
server without having one way of another to download the file.

You can use stream download if you want to process the file in a
streaming fashion.
http://camel.apache.org/ftp2


> Best,
> Nicolas.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227p5760252.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: ftp-component: RemoteFile to a classic File

Posted by Nicolas74 <nm...@gnubila.fr>.
Thanks.
That's what I did, and it perflectly works.

I have to process some modifications to the file through a java application.
So, is it the only way to process my file ? Or is there a more optimized
solution without downloading the file ?

Best,
Nicolas.



--
View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227p5760252.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ftp-component: RemoteFile to a classic File

Posted by Claus Ibsen <cl...@gmail.com>.
Yes if you want to download from ftp and save to file its

from ftp
  to file



On Fri, Dec 5, 2014 at 8:49 PM, Nicolas74 <nm...@gnubila.fr> wrote:
> Ok, thanks Claus.
>
> So, the correct way to do this should be the following:
>
>
> Is that correct ? Is there another solution ?
>
> Thanks for your help,
> Best,
> Nicolas.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227p5760232.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Re: ftp-component: RemoteFile to a classic File

Posted by Nicolas74 <nm...@gnubila.fr>.
Ok, thanks Claus.

So, the correct way to do this should be the following:


Is that correct ? Is there another solution ?

Thanks for your help,
Best,
Nicolas.



--
View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227p5760232.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ftp-component: RemoteFile to a classic File

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

A remote file is not a java.io.File. Its an instance of the file type
the ftp client library uses.

On Fri, Dec 5, 2014 at 6:16 PM, Nicolas74 <nm...@gnubila.fr> wrote:
> Hi all,
>
> I'm a little bit confused about ow to use RemoteFile in a processor with the
> ftp component.
>
> I have the following route :
>
>
>
>
>
> In my processor, I really don't know how to proceed to convert, in my
> processor, the RemoteFile to a classic File object.
>
> Any idea ?
>
> Best regards,
> Nicolas.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/ftp-component-RemoteFile-to-a-classic-File-tp5760227.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/