Hi all,
My french company buy EDTFTPJ-PRO to allow a JAVA application to transfer file by FTP.
But I have a problem...
I have a FileZilla Server on a web server of my company.
I have no problem to communicate with it by FileZilla Client (by inside or outside our company's network).
If I try with my application, there is no problem when I try on our internal network.
But if I try from outside... I can't... The connection is ok, I can change directory but i'm unable to list files or directory then i can't get or put files too.
I think there is a problem on my params connection...
I'm sure that FilleZilla is correctly customized (accounts, rights for each account are ok...) so my manager looked for our router and there is no problem.
He's thinking my application is not well parametered... but what is very surprising is that it works when i'm connected on our network and not when i'm at home...
This is my code :
mlFtp = new SSLFTPClient();
mlFtp.setConfigFlags(SSLFTPClient.ConfigFlags.DISABLE_SSL_CLOSURE);
mlFtp.setParserLocale(Locale.US);
mlFtp.setRemoteHost(FTP_ADDRESS);
mlFtp.setRemotePort(FTP_PORT);
mlFtp.setValidateServer(false);
mlFtp.connect();
mlFtp.auth(SSLFTPClient.AUTH_TLS);
mlFtp.login(USER, PASS);
mlFtp.setConnectMode(FTPConnectMode.PASV);
mlFtp.setType(FTPTransferType.BINARY);
And when the connection is ok i try to do this :
String[] listing = null;
listing = mlFtp.dir(); // It doesn't work...
for (int i = 0; i < listing.length; i++) {
System.out.println("\t\t\t --> " + listing[i]); // On affiche les noms.
}
mlFtp.chdir("./DIRECTORY"); // It works well
listing = mlFtp.dir(); // It doesn't work...
for (int i = 0; i < listing.length; i++) {
System.out.println("\t\t\t --> " + listing[i]);
}
mlFtp.chdir("../"); // It works well
Thank u !
++
CC