I am successfully using EditFtpj with initSocks through our Proxy. But one external site is failing.
My code is
ftpc = new FTPClient();
ftpc.setRemoteHost(ftpRemoteHost);
ftpc.setMessageListener(listener);
ftpc.setStrictReturnCodes(false);
listener.clearLog();
ftpc.initSOCKS(ftpSocksPort, ftpSocksIP);
ftpc.initSOCKSAuthentication(ftpSocksUID,ftpSocksUPW);
ftpc.connect();
ftpc.login(ftpRemoteUID, ftpRemoteUPW);
ftpc.setType(FTPTransferType.ASCII);
ftpc.chdir(dirname);
String[] dirOutput = ftpc.dir();
But I get a Unexpected null reply received, from the dir command:-
DEBUG [com.enterprisedt.net.ftp.FTPClient] 7 Dec 2006 17:04:35.187 : Connecting to
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.531 : 220 FTP Server 2
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.531 : ---> USER ....
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.562 : 331 Password required ....
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.562 : ---> PASS ********
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.625 : 230 User ... logged in.
Set Ascii
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.625 : ---> TYPE A
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.656 : 200 Type set to A
Chdir
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.656 : ---> CWD cricket
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.687 : 250 CWD command successful
Dir
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:35.687 : ---> PASV
java.io.IOException: Unexpected null reply received
at com.enterprisedt.net.ftp.FTPControlSocket.readReply(FTPControlSocket.java:758)
at com.enterprisedt.net.ftp.FTPControlSocket.sendCommand(FTPControlSocket.java:721)
ftpQuit
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocketPASV(FTPControlSocket.java:587)
DEBUG [com.enterprisedt.net.ftp.FTPControlSocket] 7 Dec 2006 17:04:41.156 : ---> QUIT
at com.enterprisedt.net.ftp.FTPControlSocket.createDataSocket(FTPControlSocket.java:418)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:2079)
at com.enterprisedt.net.ftp.FTPClient.dir(FTPClient.java:2055)
at com.anl.ftp.Ftp.ftpDir(Ftp.java:352)
at com.anl.ftp.Ftp.getDir(Ftp.java:191)
at com.anl.ftp.Test.execute(Test.java:22)
at com.anl.ftp.Test.main(Test.java:28)