You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Andreas Asmuss <an...@gmail.com> on 2010/07/14 16:27:53 UTC

FTP on MVS filesystem.

Hi

I'm trying to fetch files from an FTP that seems to be using MVS. I have
configured my endpoint as such:

ftp://10.0.0.1/'DATA.OUT.EDI'?delay=5s&delete=true&password=mypw123kl&username=myuser

Camel connects to the ftp but just polls the directory and doesn't retrieve
any files from the FTP.

I am able to fetch the files manually like this:

ftp 10.0.0.1
cd 'DATA.OUT.EDI'
dir
mget *.*

which works. But it shouldn't really be a problem for Camel to poll the
right directory even if given in MVS format as it just uses FTPClient and
does a changeWorkdirectory?
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1092836.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi

Bingo! It works beautifully now :)
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1843315.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

I have attached an updated .jar at ticket
https://issues.apache.org/activemq/browse/CAMEL-2952

It's a quick fix. Could you test it on your system?



On Fri, Jul 23, 2010 at 1:33 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> Hi Claus
>
>> I wonder if when downloading you need to CD to the directory first and
>> then download the file.
>
> Correct - you have to be placed in the same directory as the file you want
> to download it and do "GET filename". You cannot do something like this: get
> 'SDN.OUT.EDI'/file001 which Camel-ftp does at the moment.
>
> ---
>
> ftp> cd 'SDN.OUT.EDI'
> 250 "SDN.OUT.EDI." is the working directory name prefix.
> ftp> ls
> 200 Port request OK.
> 125 List started OK
> FILE001
> FILE002
> 250 List completed successfully.
> ftp: 34 bytes received in 0,00Seconds 34000,00Kbytes/sec.
> ftp> cd ..
> 250 "SDNEDIP.UD." is the working directory name prefix.
> ftp> cd ..
> 250 "SDNEDIP." is the working directory name prefix.
> ftp> cd ..
> 250 "" is the working directory name prefix.
> ftp> get 'SDN.OUT.EDI'/FILE001
> 200 Port request OK.
> 550 Mismatched quotes on pathname 'SDN.OUT.EDI'/FILE001
> ftp> get 'SDN.OUT.EDI/FILE001'
> 200 Port request OK.
> 501 Invalid data set name "'SDN.OUT.EDI/FILE001'".  Use MVS Dsname
> conventions.
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1843293.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi Claus

> I wonder if when downloading you need to CD to the directory first and
> then download the file.

Correct - you have to be placed in the same directory as the file you want
to download it and do "GET filename". You cannot do something like this: get
'SDN.OUT.EDI'/file001 which Camel-ftp does at the moment.

---

ftp> cd 'SDN.OUT.EDI'
250 "SDN.OUT.EDI." is the working directory name prefix.
ftp> ls
200 Port request OK.
125 List started OK
FILE001
FILE002
250 List completed successfully.
ftp: 34 bytes received in 0,00Seconds 34000,00Kbytes/sec.
ftp> cd ..
250 "SDNEDIP.UD." is the working directory name prefix.
ftp> cd ..
250 "SDNEDIP." is the working directory name prefix.
ftp> cd ..
250 "" is the working directory name prefix.
ftp> get 'SDN.OUT.EDI'/FILE001
200 Port request OK.
550 Mismatched quotes on pathname 'SDN.OUT.EDI'/FILE001
ftp> get 'SDN.OUT.EDI/FILE001'
200 Port request OK.
501 Invalid data set name "'SDN.OUT.EDI/FILE001'".  Use MVS Dsname
conventions.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1843293.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jul 22, 2010 at 5:00 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> Hi Claus
>
> We're getting closer :)
>
> Now the files are listed correctly at least, but they can't be downloaded.
>
> I'm not sure why this happens - will look into it tommorow unless you have
> an idea.
>

Yeah take a look tomorrow. I wonder if when downloading you need to CD
to the directory first
And then download the file. It will download the file using its absolute name.

But take a look tomorrow, for example you can see the FTP log and try
from a client.
Then figure out when downloading you need to CD <dir> first before you
can do a GET


> The same thing happens if I use my custom ftpClient with camel ftp 2.5
> (which works with camel 2.4)
>
> SEVERE: Caused by:
> [org.apache.camel.component.file.GenericFileOperationFailedException -
> Cannot retrieve file: GenericFile[FILE001] from:
> Endpoint[ftp://myftphost/'SDN.OUT.EDI'?consumer.delay=5s&password=mypw&username=myusr]]
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> retrieve file: GenericFile[FILE001] from:
> Endpoint[ftp://myftphost/'SDN.OUT.EDI'?consumer.delay=5s&password=mypw&username=myusr]
>        at
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:295)
>        at
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:144)
>        at
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:110)
>        at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98)
>        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>        at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>        at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>        at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>        at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:619)
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1842392.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi Claus

We're getting closer :)

Now the files are listed correctly at least, but they can't be downloaded.

I'm not sure why this happens - will look into it tommorow unless you have
an idea.

The same thing happens if I use my custom ftpClient with camel ftp 2.5
(which works with camel 2.4)

SEVERE: Caused by:
[org.apache.camel.component.file.GenericFileOperationFailedException -
Cannot retrieve file: GenericFile[FILE001] from:
Endpoint[ftp://myftphost/'SDN.OUT.EDI'?consumer.delay=5s&password=mypw&username=myusr]]
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
retrieve file: GenericFile[FILE001] from:
Endpoint[ftp://myftphost/'SDN.OUT.EDI'?consumer.delay=5s&password=mypw&username=myusr]
	at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:295)
	at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:144)
	at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:110)
	at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:98)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1842392.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi

Yeah I know - didn't have time for it today, just wanted to let you know
that it did not work so far. Will debug  tomorrow.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1732138.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

Well spotted. I have fixed the code and attached a new jar at the ticket
https://issues.apache.org/activemq/browse/CAMEL-2952

Please test it again on your system.


On Thu, Jul 22, 2010 at 12:32 PM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> Hi Claus
>
> As shown below the code does listFiles(".") - it should be listFiles().
> Further below you can see how MVS doesn't return any files when doing "ls ."
>
>    public List<FTPFile> listFiles() throws
> GenericFileOperationFailedException {
>        return listFiles(".");
>    }
>
>    public List<FTPFile> listFiles(String path) throws
> GenericFileOperationFailedException {
>        // use current directory if path not given
>        if (ObjectHelper.isEmpty(path)) {
>            path = ".";
>        }
>
>        try {
>            final List<FTPFile> list = new ArrayList<FTPFile>();
>            FTPFile[] files = client.listFiles(path);
>            // can return either null or an empty list depending on FTP
> servers
>            if (files != null) {
>                list.addAll(Arrays.asList(files));
>            }
>            return list;
>        } catch (IOException e) {
>            throw new
> GenericFileOperationFailedException(client.getReplyCode(),
> client.getReplyString(), e.getMessage(), e);
>        }
>    }
>
> Behaviour shown with ftp.exe:
> ftp> cd 'SDN.OUT.EDI'
> 250 "SDN.OUT.EDI" is the working directory name prefix.
> ftp> ls .
> 200 Port request OK.
> 550 No data sets found.
> ftp> ls
> 200 Port request OK.
> 125 List started OK
> FILE001
> FILE002
> 250 List completed successfully.
> ftp: 34 bytes received in 0,00Seconds 17,00Kbytes/sec.
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1835833.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi Claus

As shown below the code does listFiles(".") - it should be listFiles().
Further below you can see how MVS doesn't return any files when doing "ls ."

    public List<FTPFile> listFiles() throws
GenericFileOperationFailedException {
        return listFiles(".");
    }

    public List<FTPFile> listFiles(String path) throws
GenericFileOperationFailedException {
        // use current directory if path not given
        if (ObjectHelper.isEmpty(path)) {
            path = ".";
        }

        try {
            final List<FTPFile> list = new ArrayList<FTPFile>();
            FTPFile[] files = client.listFiles(path);
            // can return either null or an empty list depending on FTP
servers
            if (files != null) {
                list.addAll(Arrays.asList(files));
            }
            return list;
        } catch (IOException e) {
            throw new
GenericFileOperationFailedException(client.getReplyCode(),
client.getReplyString(), e.getMessage(), e);
        }
    }

Behaviour shown with ftp.exe:
ftp> cd 'SDN.OUT.EDI'
250 "SDN.OUT.EDI" is the working directory name prefix.
ftp> ls .
200 Port request OK.
550 No data sets found.
ftp> ls
200 Port request OK.
125 List started OK
FILE001
FILE002
250 List completed successfully.
ftp: 34 bytes received in 0,00Seconds 17,00Kbytes/sec.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1835833.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 21, 2010 at 2:27 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> No, it still doesn't work.
> --

Its you who got the MVS FTP server so you gotta help and debug the
code and see where the problem is.


> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1713509.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
No, it still doesn't work.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1713509.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 21, 2010 at 11:41 AM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> Hi Claus
>
> Didn't notice your posts until now. I just tried with the new jar and it
> didn't work. Is there an "MSV" option that needs to be set or have you just
> changed the way it works generally?

There is no option. The logic is changed to cd the starting directory
and also cd when traversing sub directories.
So it ought to do something similar as you do.



> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1697852.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi Claus

Didn't notice your posts until now. I just tried with the new jar and it
didn't work. Is there an "MSV" option that needs to be set or have you just
changed the way it works generally?
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1697852.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

I have committed a fix to trunk.

I have build a .jar file and attached it to the JIRA ticket
https://issues.apache.org/activemq/browse/CAMEL-2952

Fell free to test it on your system.
Just use Camel 2.4 and then that .jar from the JIRA.



On Fri, Jul 16, 2010 at 1:48 PM, Claus Ibsen <cl...@gmail.com> wrote:
> On Fri, Jul 16, 2010 at 1:45 PM, Andreas Asmuss <an...@gmail.com> wrote:
>>
>> Alright thanks. I'll just stick with my ugly but working solution for now.
>> --
>
> If you have time next week to test a fix then let me know. Then I can
> work on it when I get free time for it.
> I am to busy today with other stuff and most likely on monday as well.
>
>
>
>> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1224016.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> 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
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jul 16, 2010 at 1:45 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> Alright thanks. I'll just stick with my ugly but working solution for now.
> --

If you have time next week to test a fix then let me know. Then I can
work on it when I get free time for it.
I am to busy today with other stuff and most likely on monday as well.



> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1224016.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Alright thanks. I'll just stick with my ugly but working solution for now.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1224016.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jul 16, 2010 at 12:35 PM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> Isn't this strategy first used when the FtpComponent actually has a file to
> process?

Ah yeah sorry of course it is.

There is this API instead
http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/org/apache/camel/spi/PollingConsumerPollStrategy.html

Which is invoked when polling. Its in fact this API used by camel-ftp
to do the try 3 times to reconnect.

Anyway we will fix the camel-ftp to work in 2.5 with your MVS stuff.




> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223990.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Isn't this strategy first used when the FtpComponent actually has a file to
process?
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223990.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi

Yeah I know, it also does in my local copy :) - it still doesn't get called
though.

What about the type I have provided for the generic classes? Should that be
FTPFile or RemoteFile or something?
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223986.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

Your begin method has to return true as the javadoc states!


On Fri, Jul 16, 2010 at 12:16 PM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> Hi
>
> I've tried to implement the interface, don't know if it's correct, but it
> seems that only prepareOnStartup is ever called when running the route.
>
> public class CscProcessStrategy implements
>                GenericFileProcessStrategy<File> {
>
>        public boolean begin(GenericFileOperations<File> operations,
>                        GenericFileEndpoint<File> endpoint, Exchange exchange,
>                        GenericFile<File> file) throws Exception {
>                operations.changeCurrentDirectory("'DATA.OUT.EDI'");
>                return false;
>        }
>
>        public void commit(GenericFileOperations<File> operations,
>                        GenericFileEndpoint<File> endpoint, Exchange exchange,
>                        GenericFile<File> file) throws Exception {
>        }
>
>        public void prepareOnStartup(GenericFileOperations<File> operations,
>                        GenericFileEndpoint<File> endpoint) throws Exception {
>        }
>
>        public void rollback(GenericFileOperations<File> operations,
>                        GenericFileEndpoint<File> endpoint, Exchange exchange,
>                        GenericFile<File> file) throws Exception {
>        }
> }
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223982.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi

I've tried to implement the interface, don't know if it's correct, but it
seems that only prepareOnStartup is ever called when running the route.

public class CscProcessStrategy implements
		GenericFileProcessStrategy<File> {

	public boolean begin(GenericFileOperations<File> operations,
			GenericFileEndpoint<File> endpoint, Exchange exchange,
			GenericFile<File> file) throws Exception {
		operations.changeCurrentDirectory("'DATA.OUT.EDI'");
		return false;
	}

	public void commit(GenericFileOperations<File> operations,
			GenericFileEndpoint<File> endpoint, Exchange exchange,
			GenericFile<File> file) throws Exception {
	}

	public void prepareOnStartup(GenericFileOperations<File> operations,
			GenericFileEndpoint<File> endpoint) throws Exception {
	}

	public void rollback(GenericFileOperations<File> operations,
			GenericFileEndpoint<File> endpoint, Exchange exchange,
			GenericFile<File> file) throws Exception {
	}
}
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223982.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jul 16, 2010 at 10:54 AM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> I got it working by overriding the listFiles() in a custom FTPClient now. But
> I'm interested in the solution with a processStrategy. However I can't
> figure out how I'm supposed to do the cd command. I need access to some
> object that can do this operation - which and how?
> --

If you look at the API
http://camel.apache.org/maven/camel-2.2.0/camel-core/apidocs/org/apache/camel/component/file/GenericFileProcessStrategy.html

There is an operations parameter in the begin method. Use it to change
the directory.

Its in fact the same operations the camel-ftp component uses when it polls.


> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223947.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
I got it working by overriding the listFiles() in a custom FTPClient now. But
I'm interested in the solution with a processStrategy. However I can't
figure out how I'm supposed to do the cd command. I need access to some
object that can do this operation - which and how?
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223947.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

You can most likely use a custom processStrategy and let it cd to the
starting directory in the begin method.

See more here:
http://camel.apache.org/file2.html



On Thu, Jul 15, 2010 at 4:11 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> Hi Claus
>
> I just tried stepping through both my Camel version and Java version and got
> to the same conclusion. That you need to do a cd in order to have the files
> visible :-)
>
> I suppose I can work around this using a custom FTPClient that does the cd
> on login and then don't send any directory as parameter.
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223526.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi Claus

I just tried stepping through both my Camel version and Java version and got
to the same conclusion. That you need to do a cd in order to have the files
visible :-)

I suppose I can work around this using a custom FTPClient that does the cd
on login and then don't send any directory as parameter.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1223526.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

Thanks for testing it. I have created a ticket about this issue
https://issues.apache.org/activemq/browse/CAMEL-2952



On Thu, Jul 15, 2010 at 3:10 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> I got it running on Camel 2.4.0 and commons net 2.0 now but it still doesn't
> work. No matter which combination of / and with or without '' it doesn't
> find anything on the poll.
>
> 2010-07-15 14:54:47,672 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1//'DATA.OUT.EDI']
> [org.apache.camel.impl.ScheduledPollConsumer]: Starting to poll:
> Endpoint[ftp://10.0.0.1//'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
> 2010-07-15 14:54:47,672 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1//'DATA.OUT.EDI']
> [org.apache.camel.component.file.remote.FtpConsumer]: pollDirectory from
> fileName: /'DATA.OUT.EDI'
> 2010-07-15 14:54:47,672 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1//'DATA.OUT.EDI']
> [org.apache.camel.component.file.remote.FtpConsumer]: Polling directory:
> /'DATA.OUT.EDI'
> 2010-07-15 14:54:47,727 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1//'DATA.OUT.EDI']
> [org.apache.camel.component.file.remote.FtpConsumer]: No files found in
> directory: /'DATA.OUT.EDI'
> 2010-07-15 14:54:47,728 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1//'DATA.OUT.EDI']
> [org.apache.camel.impl.ScheduledPollConsumer]: Finished polling:
> Endpoint[ftp://10.0.0.1//'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1221569.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
I got it running on Camel 2.4.0 and commons net 2.0 now but it still doesn't
work. No matter which combination of / and with or without '' it doesn't
find anything on the poll.

2010-07-15 14:54:47,672 DEBUG [Camel Thread 0 -
ftp://10.0.0.1//'DATA.OUT.EDI']
[org.apache.camel.impl.ScheduledPollConsumer]: Starting to poll:
Endpoint[ftp://10.0.0.1//'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
2010-07-15 14:54:47,672 DEBUG [Camel Thread 0 -
ftp://10.0.0.1//'DATA.OUT.EDI']
[org.apache.camel.component.file.remote.FtpConsumer]: pollDirectory from
fileName: /'DATA.OUT.EDI'
2010-07-15 14:54:47,672 DEBUG [Camel Thread 0 -
ftp://10.0.0.1//'DATA.OUT.EDI']
[org.apache.camel.component.file.remote.FtpConsumer]: Polling directory:
/'DATA.OUT.EDI'
2010-07-15 14:54:47,727 DEBUG [Camel Thread 0 -
ftp://10.0.0.1//'DATA.OUT.EDI']
[org.apache.camel.component.file.remote.FtpConsumer]: No files found in
directory: /'DATA.OUT.EDI'
2010-07-15 14:54:47,728 DEBUG [Camel Thread 0 -
ftp://10.0.0.1//'DATA.OUT.EDI']
[org.apache.camel.impl.ScheduledPollConsumer]: Finished polling:
Endpoint[ftp://10.0.0.1//'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]


-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1221569.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Jul 15, 2010 at 11:36 AM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> After getting the 2.4.0 jars I know get this exception:
>

Are you sure you got the correct .jars of Commons Net? You need 2.0
jars. See those with -> compile


[INFO] The following files have been resolved:
[INFO]    aopalliance:aopalliance:jar:1.0:test
[INFO]    com.jcraft:jsch:jar:0.1.42:compile
[INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
[INFO]    commons-logging:commons-logging:jar:1.1.1:test
[INFO]    commons-logging:commons-logging-api:jar:1.1:compile
[INFO]    commons-net:commons-net:jar:2.0:compile
[INFO]    javax.activation:activation:jar:1.1:compile
[INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]    junit:junit:jar:4.8.1:test
[INFO]    log4j:log4j:jar:1.2.16:test
[INFO]    org.apache.camel:camel-core:jar:2.5-SNAPSHOT:compile
[INFO]    org.apache.camel:camel-spring:jar:2.5-SNAPSHOT:test
[INFO]    org.apache.camel:camel-test:jar:2.5-SNAPSHOT:test
[INFO]    org.apache.ftpserver:ftplet-api:jar:1.0.3:test
[INFO]    org.apache.ftpserver:ftpserver-core:jar:1.0.3:test
[INFO]    org.apache.mina:mina-core:jar:2.0.0-M6:test
[INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO]    org.slf4j:slf4j-api:jar:1.6.0:test
[INFO]    org.slf4j:slf4j-log4j12:jar:1.6.0:test
[INFO]    org.springframework:spring-aop:jar:3.0.3.RELEASE:test
[INFO]    org.springframework:spring-asm:jar:3.0.3.RELEASE:test
[INFO]    org.springframework:spring-beans:jar:3.0.3.RELEASE:test
[INFO]    org.springframework:spring-context:jar:3.0.3.RELEASE:test
[INFO]    org.springframework:spring-core:jar:3.0.3.RELEASE:test
[INFO]    org.springframework:spring-expression:jar:3.0.3.RELEASE:test
[INFO]    org.springframework:spring-tx:jar:3.0.3.RELEASE:test


> Exception in thread "main" java.lang.NoSuchMethodError:
> org.apache.commons.net.ftp.FTPClient.setConnectTimeout(I)V
>        at
> org.apache.camel.component.file.remote.FtpEndpoint.createRemoteFileOperations(FtpEndpoint.java:84)
>        at
> org.apache.camel.component.file.remote.FtpEndpoint.buildConsumer(FtpEndpoint.java:59)
>        at
> org.apache.camel.component.file.remote.RemoteFileEndpoint.createConsumer(RemoteFileEndpoint.java:70)
>        at
> org.apache.camel.component.file.remote.RemoteFileEndpoint.createConsumer(RemoteFileEndpoint.java:32)
>        at
> org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:60)
>        at
> org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:75)
>        at org.apache.camel.impl.RouteService.doStart(RouteService.java:132)
>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
>        at
> org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1328)
>        at
> org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1256)
>        at
> org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:952)
>        at
> org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
>        at
> org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
>        at
> org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
>        at
> org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
>        at
> org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
>        at
> org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
>        at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
>        at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
>        at
> org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
>        at
> org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:219)
>        at org.apache.camel.spring.Main.doStart(Main.java:173)
>        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
>        at dk.profac.isuiteclient.StartUp.main(StartUp.java:38)
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1200157.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
After getting the 2.4.0 jars I know get this exception:

Exception in thread "main" java.lang.NoSuchMethodError:
org.apache.commons.net.ftp.FTPClient.setConnectTimeout(I)V
	at
org.apache.camel.component.file.remote.FtpEndpoint.createRemoteFileOperations(FtpEndpoint.java:84)
	at
org.apache.camel.component.file.remote.FtpEndpoint.buildConsumer(FtpEndpoint.java:59)
	at
org.apache.camel.component.file.remote.RemoteFileEndpoint.createConsumer(RemoteFileEndpoint.java:70)
	at
org.apache.camel.component.file.remote.RemoteFileEndpoint.createConsumer(RemoteFileEndpoint.java:32)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:60)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:75)
	at org.apache.camel.impl.RouteService.doStart(RouteService.java:132)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:1328)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1256)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:952)
	at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:231)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:858)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:419)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
	at
org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:219)
	at org.apache.camel.spring.Main.doStart(Main.java:173)
	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:56)
	at dk.profac.isuiteclient.StartUp.main(StartUp.java:38)

-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1200157.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

Thanks for showing the working code.

On Thu, Jul 15, 2010 at 11:06 AM, Andreas Asmuss
<an...@gmail.com> wrote:
>
> Hi
>
> My last post didn't make much sense. Obviously Camel also does listFiles()
> when polling the ftp. I've made a basic implementation of what I need to do
> in Java (which works):
>
>        public static void main(String[] args) throws SocketException, IOException
> {
>                FTPClient ftp = new FTPClient();
>                ftp.connect("10.0.0.1");
>                ftp.login("myuser", "mypass");
>                ftp.changeWorkingDirectory("'DATA.OUT.EDI'");
>                FTPFile[] ftpFiles = ftp.listFiles();
>                if (ftpFiles.length > 0) {
>                        for (FTPFile ftpFile : ftpFiles) {
>                                File localFile = new File("C:\\" + ftpFile.getName());
>                                FileOutputStream os = new FileOutputStream(localFile);
>                                ftp.retrieveFile(ftpFile.getName(), os);
>                        }
>                }
>        }
>
> Shouldn't this in the end give the same result as doing:
>
> <from uri="ftp:10.0.0.1/'DATA.OUT.EDI'?username=myuser&password=mypass" />
> <to uri="file:c:\" />
>

In Camel 2.4 you can try out with

 <from uri="ftp:10.0.0.1//'DATA.OUT.EDI'?username=myuser&password=mypass" />

Notice the double slash after the IP



> However the only result I get is:
>
> 2010-07-15 10:46:04,521 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
> [org.apache.camel.impl.ScheduledPollConsumer]: Starting to poll:
> Endpoint[ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
> 2010-07-15 10:46:04,521 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
> [org.apache.camel.component.file.remote.FtpConsumer]: Polling directory:
> 'DATA.OUT.EDI'
> 2010-07-15 10:46:04,581 DEBUG [Camel Thread 0 -
> ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
> [org.apache.camel.impl.ScheduledPollConsumer]: Finished polling:
> Endpoint[ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
>
> I'll try with 2.4.0. But what does absolute path mean in this case - the
> local "physical" path of the ftp-server?
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1196921.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Hi

My last post didn't make much sense. Obviously Camel also does listFiles()
when polling the ftp. I've made a basic implementation of what I need to do
in Java (which works):

	public static void main(String[] args) throws SocketException, IOException
{
		FTPClient ftp = new FTPClient();
		ftp.connect("10.0.0.1");
		ftp.login("myuser", "mypass");
		ftp.changeWorkingDirectory("'DATA.OUT.EDI'");
		FTPFile[] ftpFiles = ftp.listFiles();
		if (ftpFiles.length > 0) {
			for (FTPFile ftpFile : ftpFiles) {
				File localFile = new File("C:\\" + ftpFile.getName());
				FileOutputStream os = new FileOutputStream(localFile);
				ftp.retrieveFile(ftpFile.getName(), os);
			}
		}
	}

Shouldn't this in the end give the same result as doing:

<from uri="ftp:10.0.0.1/'DATA.OUT.EDI'?username=myuser&password=mypass" />
<to uri="file:c:\" />

However the only result I get is:

2010-07-15 10:46:04,521 DEBUG [Camel Thread 0 -
ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
[org.apache.camel.impl.ScheduledPollConsumer]: Starting to poll:
Endpoint[ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
2010-07-15 10:46:04,521 DEBUG [Camel Thread 0 -
ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
[org.apache.camel.component.file.remote.FtpConsumer]: Polling directory:
'DATA.OUT.EDI'
2010-07-15 10:46:04,581 DEBUG [Camel Thread 0 -
ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]
[org.apache.camel.impl.ScheduledPollConsumer]: Finished polling:
Endpoint[ftp://10.0.0.1/'DATA.OUT.EDI'?noop=true&password=mypass&username=myuser]

I'll try with 2.4.0. But what does absolute path mean in this case - the
local "physical" path of the ftp-server?
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1196921.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 14, 2010 at 5:34 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> Yeah you're right. I'm reimplementing some old code using Camel and in that
> code FTPClient is used. I missed the fact that you have to do dir /
> listFiles() before you can fetch the files.
>

In Camel 2.4.0 you can use an absolute starting path. Which may work
for you then.
You can test it with the 2.4.0 jars thats currently being tested.

See this link
http://camel.465427.n5.nabble.com/VOTE-Release-Apache-Camel-2-4-0-td1046411.html#a1046411


> The FTP-component doesn't support this - any ideas? :)
>
> Earlier I implemented the .sendSiteCommand by extending FTPClient and
> overriding the login method and doing it from there (as it is needed to be
> done once per login). This is not very pretty though so if you have a better
> idea for a workaround please tell.
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1092886.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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

Re: FTP on MVS filesystem.

Posted by Andreas Asmuss <an...@gmail.com>.
Yeah you're right. I'm reimplementing some old code using Camel and in that
code FTPClient is used. I missed the fact that you have to do dir /
listFiles() before you can fetch the files.

The FTP-component doesn't support this - any ideas? :)

Earlier I implemented the .sendSiteCommand by extending FTPClient and
overriding the login method and doing it from there (as it is needed to be
done once per login). This is not very pretty though so if you have a better
idea for a workaround please tell.
-- 
View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1092886.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: FTP on MVS filesystem.

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

I doubt its that simple. FTPClient may do more under the hood. Try
getting a pure Apache Commons Net (FTPClient) example to work with
MVS.
For example you may have to configure locale / OS parsers for the file
listings to have it adapt to it.

I suggest to do a bit of googling for Commons Net FTP and MVS.


On Wed, Jul 14, 2010 at 4:27 PM, Andreas Asmuss <an...@gmail.com> wrote:
>
> Hi
>
> I'm trying to fetch files from an FTP that seems to be using MVS. I have
> configured my endpoint as such:
>
> ftp://10.0.0.1/'DATA.OUT.EDI'?delay=5s&delete=true&password=mypw123kl&username=myuser
>
> Camel connects to the ftp but just polls the directory and doesn't retrieve
> any files from the FTP.
>
> I am able to fetch the files manually like this:
>
> ftp 10.0.0.1
> cd 'DATA.OUT.EDI'
> dir
> mget *.*
>
> which works. But it shouldn't really be a problem for Camel to poll the
> right directory even if given in MVS format as it just uses FTPClient and
> does a changeWorkdirectory?
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-on-MVS-filesystem-tp1092836p1092836.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
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