Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 14942 invoked by uid 98); 2 Dec 2002 23:22:21 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 14910 invoked from network); 2 Dec 2002 23:22:19 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 2 Dec 2002 23:22:19 -0000 Received: (qmail 3116 invoked by uid 500); 2 Dec 2002 23:21:08 -0000 Received: (qmail 3109 invoked from network); 2 Dec 2002 23:21:07 -0000 Received: from unknown (HELO BIGCOW.intraephox.ephox.com) (202.138.204.102) by daedalus.apache.org with SMTP; 2 Dec 2002 23:21:07 -0000 Received: by BIGCOW.intraephox.ephox.com with Internet Mail Service (5.5.2653.19) id ; Tue, 3 Dec 2002 09:21:13 +1000 Message-ID: <0AC2D75550100F4DBDB025D4D0561188770388@BIGCOW.intraephox.ephox.com> From: Adrian Sutton To: 'Jakarta Commons Users List' , "'el-nino@gmx.li'" Subject: RE: HTTPClient, PostMethod and setRequestBody Date: Tue, 3 Dec 2002 09:21:12 +1000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N HttpClient now has a separate dependancy on commons-logging, previously commons-logging was a part of HttpClient. Grab the latest build of commons-logging and you should be good to go again. Adrian Sutton, Software Engineer Ephox Corporation www.ephox.com -----Original Message----- From: Thilo Roessler [mailto:el-nino@gmx.li] Sent: Monday, 2 December 2002 8:28 PM To: Jakarta Commons Users List Subject: HTTPClient, PostMethod and setRequestBody Hello to all of you! As I mentioned in an earlier mail, I try uploding a File to a HTTP-URL using the PostMethod of HTTPClient. Looking through the API-Documentation on the jakarta-homepage, I found a method called "setRequestody". When trying to use it, i recognized that in my version of HTTP-Client (Alpha1 which I downloaded from jakarta.apache.org), this method does not exist. So I got th latest GUMP-generated binary. There, the desired method existed ... unfortunately, other parts of my programm did not work anymore when using this Version of HTTPClient. When running my program, I received the following error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at org.apache.commons.httpclient.HttpConnection.(HttpConnection.java:85 3) at Post141.main(Post141V2.java:42) Here is a piece of my code: ============================================================= HttpConnection CPGCon; CPGCon = new HttpConnection("tn.integration.cpgmarket.com", 443, true); CPGCon.open(); System.out.println("Connection open"); PostMethod post2CPG; post2CPG = new PostMethod("/invoke/CPGmarketTN.partner.push/receiveDocument"); System.out.println("Post Method created"); post2CPG.setRequestHeader("Content-type", "multipart/form-data"); Header[] postHeaders = post2CPG.getRequestHeaders(); int i; i = postHeaders.length; System.out.println("Header-Fields: " + i); if (i > 0) { i = 0; while (i < postHeaders.length){ System.out.println(postHeaders[i].toString()); i = i + 1; }; // while (postHeaders[i].toString() <> "") }; // if i > 0 then post2CPG.setRequestBody("bla"); CPGCon.close(); System.out.println("Connection closed"); ============================================================= Is there anybody who has an idea what I am doing wrong? Thilo -- To unsubscribe, e-mail: For additional commands, e-mail: