http://jakarta.apache.org/commons/net/apidocs/index.html for the javadocs > -----Original Message----- > From: David Johnson [mailto:[EMAIL PROTECTED] > Sent: Monday, January 09, 2006 10:54 PM > To: Jakarta Commons Users List; [EMAIL PROTECTED] > Subject: Re: Commons/Net Documentation > > I've made some progress. I can now log into the server... but > instead of > transferring the file > (C:\builds\wsdl\AmazonWebServices.wsdl), it creates a > 0 length file with the name "C:\builds\wsdl\AmazonWebServices.wsdl" > > hmmm wth am i missing? > //Code: > ftpServer.user(ftpUser); > ftpServer.pass(ftpUser); these 2 lines u don't need, cause from what i've seen in the code below u allready use the login() method.
> ftpServer.cwd(directory); //testDirectory u should use the changeWorkingDirectory() method > ftpServer.stor(wsdlLocation); // wsdlLocation = > "C:\builds\wsdl\AmazonWebServices.wsdl" u could use the storeFile() method of the FTPClient or the storeFileStream() method hope it helps. mk > > Thanks, > Dave > > On 1/9/06, David Johnson <[EMAIL PROTECTED]> wrote: > > > > Hi there > > > > I'm trying to find basic documentation for the Commons/Net > package, and > > both links that I see here > http://jakarta.apache.org/commons/net/ are > > rather unhelpful. > > > > What I'm trying to do is fairly straigtforward > > > > 1. Connect to a known FTP server > > 2. Login to said FTP server using known userid and password > > 3. set the transfer type to ASCII > > 4. Transfer a file (whose location I have) to a > subdirectory (/uploadTest) > > > > 5. close the connection > > 6. do allapproriate error checking. > > > > I dont see that sort of basic information in the JavaDocs.. > > > > what I have so far is > > > > FTPClient ftpServer=new FTPClient(); > > FTPClientConfig conf = new > FTPClientConfig(FTPClientConfig.SYST_UNIX); > > ftpServer.configure(conf); > > > > boolean error = false; > > try { > > int reply; > > > > ftpServer.connect(commonLocation); > > System.out.println("Connected to " + commonLocation + "."); > > System.out.print(ftpServer.getReplyString()); > > > > reply = ftpServer.getReplyCode(); > > > > if(!FTPReply.isPositiveCompletion(reply)) { > > ftpServer.disconnect(); > > System.err.println("Error -- FTP server refused > connection."); > > } > > > > ftpServer.login(ftpUser, ftpPass); > > // Set the transfer type > > // Chenge directories > > // transfer file > > > > ftpServer.logout(); > > } catch(IOException e) { > > error = true; > > e.printStackTrace(); > > } finally { > > if(ftpServer.isConnected()) { > > try { > > ftpServer.disconnect(); > > } catch(IOException ioe) { > > // do nothing > > } > > } > > } > > > > where can I go to get this info? > > > > -- > > -Dave > > [EMAIL PROTECTED] > > > > > -- > -Dave > [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
