camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gustavo Franke <franke.gust...@gmail.com>
Subject Re: issue moving files to ftp
Date Wed, 20 Oct 2010 21:21:54 GMT
Based on your suggestion I've wrote this

        from(FTPS_ENDPOINT
+"?password=gustavo&move=processed?localWorkDirectory="+ localWorkFolder)
            .beanRef("parser", "convert")
            .to(FTPS_ENDPOINT
+"/out?password=gustavo&fileName=${file:onlyname}")
            ;
but for some reason the localWorkDirectory doesn't seems to be working (I
don't see the files copied in there).
and I'm getting a FileNotFoundException (in the FTP side) and the file is
there.
Do I need more detailed info besides http://camel.apache.org/ftp2 ?

Thanks,
Gustavo.

On Tue, Oct 19, 2010 at 8:23 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:

> The FTP component supports a local work folder directly.
>
> See the localWorkDirectory option
> http://camel.apache.org/ftp2
>
> Then you can do
>
> from(ftp:xxx?localWorkDirectory=/somepath").beanRef("parser",
> "convert").xxx?
>
>
> On Mon, Oct 18, 2010 at 11:56 PM, Gustavo Franke
> <franke.gustavo@gmail.com> wrote:
> > Here's what I have in my RouteBuilder
> >
> > public void configure() {
> >        String localWorkFolder = "/tmp/camel";
> >        from("ftp://gustavo
> @localhost:21/Test?password=gustavo&move=.processed").to("file://"
> > + localWorkFolder);
> >        from("file://" + localWorkFolder + "?noop=true").beanRef("parser",
> > "convert");
> >        from("file:///tmp/camelout").to("ftp://gustavo
> > @localhost:21/Test/out?password=gustavo&fileName=${file:onlyname}");
> >    }
> >
> > I'm not sure if I am missing some thing but on the java app side the
> files
> > are generated properly, those files should be copied to the ftp.
> > But for some reason, on the ftp side the files are generated but its
> content
> > is missing or corrupt, and I'm completely clueless regarding to this.
> >
> > If I don't explicit the &fileName=${file:onlyname} I get this error
> "Error
> > writing file [Test/out/C:\tmp\camel\myFile.txt]" being Test/out the
> remote
> > folder and C:\tmp\camel\myFile.txt path of the file. That's the reason
> why I
> > added the &fileName=${file:onlyname} but I don't know why the content is
> > missing.
> >
> > Any help would be great.
> > Thanks,
> > Gustavo
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message