Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 40553 invoked from network); 23 Sep 2008 14:05:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Sep 2008 14:05:28 -0000 Received: (qmail 7498 invoked by uid 500); 23 Sep 2008 14:05:22 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 7284 invoked by uid 500); 23 Sep 2008 14:05:21 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Users List" Delivered-To: mailing list user@commons.apache.org Received: (qmail 7273 invoked by uid 99); 23 Sep 2008 14:05:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2008 07:05:21 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Sep 2008 14:04:20 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Ki8VZ-0008BI-JG for user@commons.apache.org; Tue, 23 Sep 2008 07:04:53 -0700 Message-ID: <19628455.post@talk.nabble.com> Date: Tue, 23 Sep 2008 07:04:53 -0700 (PDT) From: JavierL To: user@commons.apache.org Subject: Re: Proxy without authentication In-Reply-To: <19628407.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: xleyba@gmail.com References: <19628039.post@talk.nabble.com> <19628407.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org I found the solution, thanks.. J JavierL wrote: > > Hi > > Where/How should I set them ? > > > J > > > jwcarman wrote: >> >> Have you tried setting the system properties "http.proxyHost" and >> "http.proxyPort"? >> >> On Tue, Sep 23, 2008 at 9:45 AM, JavierL wrote: >>> >>> >>> Hi >>> >>> I'm doing an application that wants to connect to an external server >>> with >>> httpclient. My problem is that I've a proxy between my computer and the >>> server. >>> >>> I've the proxy ip and port and nothing more. In fact, my Firefox browser >>> just use this information to connect outside. >>> >>> In my application I did: >>> >>> ----------- >>> >>> String url = "http://www.yahoo.com"; >>> >>> try { >>> HostConfiguration config = new HostConfiguration(); >>> config.setProxyHost(new ProxyHost("172.26.18.147",8080)); >>> config.setHost(url); >>> log.info("....host config done !"); >>> >>> HttpClient httpclient = new HttpClient(); >>> httpclient.setHostConfiguration(config); >>> httpclient.setState(new HttpState()); >>> log.info("....httpclient config done !"); >>> >>> httpget = new GetMethod(url); >>> log.info("....method done !"); >>> >>> httpclient.executeMethod(httpget); >>> >>> log.info("...status line: " + httpget.getStatusLine()); >>> >>> in = httpget.getResponseBodyAsStream(); >>> } catch (Exception e) { >>> log.error(e.getMessage()); >>> } finally { >>> httpget.releaseConnection(); >>> } >>> >>> ----------- >>> >>> and when I run the application I receive the message: >>> >>> 156 INFO YahooRetriever - ....method done ! >>> 578 INFO AuthChallengeProcessor - ntlm authentication scheme selected >>> 578 INFO HttpMethodDirector - No credentials available for NTLM >> realm>@1 >>> 72.26.18.147:8080 >>> 578 INFO YahooRetriever - ...status line: HTTP/1.1 407 Proxy >>> Authentication R >>> equired >>> 578 INFO YahooParser - Creating XML Reader >>> >>> Am I wrong ? How can I do to pass through the proxy ? >>> >>> >>> Thanks in advance >>> >>> J >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Proxy-without-authentication-tp19628039p19628039.html >>> Sent from the Commons - User mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >>> For additional commands, e-mail: user-help@commons.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org >> For additional commands, e-mail: user-help@commons.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Proxy-without-authentication-tp19628039p19628455.html Sent from the Commons - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org