Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 43095 invoked from network); 9 Jan 2006 21:54:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jan 2006 21:54:44 -0000 Received: (qmail 2226 invoked by uid 500); 9 Jan 2006 21:54:42 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 1645 invoked by uid 500); 9 Jan 2006 21:54:38 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 1632 invoked by uid 99); 9 Jan 2006 21:54:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2006 13:54:38 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chachany@gmail.com designates 64.233.162.201 as permitted sender) Received: from [64.233.162.201] (HELO zproxy.gmail.com) (64.233.162.201) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jan 2006 13:54:37 -0800 Received: by zproxy.gmail.com with SMTP id 8so4099376nzo for ; Mon, 09 Jan 2006 13:54:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=JSZE4ONkcHV8S9Jc1MXn66t3+9F1/Q/KAjCrM+gCgNYSH5JW+/VJ8mF3V85//U0wyIovRHlPeTBe7o8ddRxMegtEE7STPjLqMWfiisbj4VykEb65RXsaivIshGzAP/QqkPbteD4F7SJul96B7tNmIwP2/YFuNnaXa29BnHNd+fk= Received: by 10.37.12.25 with SMTP id p25mr13482821nzi; Mon, 09 Jan 2006 13:54:16 -0800 (PST) Received: by 10.36.139.10 with HTTP; Mon, 9 Jan 2006 13:54:15 -0800 (PST) Message-ID: <8aef647c0601091354p1a1ef63ej71d3f8e140b08e0c@mail.gmail.com> Date: Mon, 9 Jan 2006 16:54:15 -0500 From: David Johnson Reply-To: ChaChaNY@GMail.com To: Jakarta Commons Users List , chachany@gmail.com Subject: Re: Commons/Net Documentation In-Reply-To: <8aef647c0601091231q5a28b8basee8ddf826f8f73ce@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10150_32321512.1136843655651" References: <8aef647c0601091231q5a28b8basee8ddf826f8f73ce@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_10150_32321512.1136843655651 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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); ftpServer.cwd(directory); //testDirectory ftpServer.stor(wsdlLocation); // wsdlLocation =3D "C:\builds\wsdl\AmazonWebServices.wsdl" Thanks, Dave On 1/9/06, David Johnson 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=3Dnew FTPClient(); > FTPClientConfig conf =3D new FTPClientConfig(FTPClientConfig.SYST_UNIX); > ftpServer.configure(conf); > > boolean error =3D false; > try { > int reply; > > ftpServer.connect(commonLocation); > System.out.println("Connected to " + commonLocation + "."); > System.out.print(ftpServer.getReplyString()); > > reply =3D 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 =3D true; > e.printStackTrace(); > } finally { > if(ftpServer.isConnected()) { > try { > ftpServer.disconnect(); > } catch(IOException ioe) { > // do nothing > } > } > } > > where can I go to get this info? > > -- > -Dave > ChaChaNY@Gmail.com -- -Dave ChaChaNY@Gmail.com ------=_Part_10150_32321512.1136843655651--