hi
i want to upload an xml file from my computer to a server but i donot know is there is a website that do that i want to do it for test purposes but my server is not ready yet and i need to make sure that the program is running so i will post the code and if any one can help please replay
thank you in advance
FTPClient client = new FTPClient();
FileInputStream fis = null;
try {
client.connect("verzend.be");
System.out.println("connection successed"+client.getReplyCode());
client.login("test20", "xxxxx");
System.out.println("login successed"+client.getReplyCode());
client.enterLocalPassiveMode();
client.setFileType(FTP.BINARY_FILE_TYPE);
System.out.println("type successed");
File file = new File("F:/list.txt");
String filename = "myPDF.pdf";
fis = new FileInputStream(file);
System.out.println("file successed");
boolean flag=client.storeFile("list.txt", fis);
System.out.println("store successed"+flag);
System.out.println(client.getReplyCode());
if (!client.storeFile(file.getName(),fis)) {
System.out.println("upload failed!");
}
if (flag) {
System.out.println("The first file is uploaded successfully.");
}
fis.close();
client.logout();
} catch (IOException e) {
e.printStackTrace();
}
i get the value of the replay code 530 login failed