Return-Path: Delivered-To: apmail-jakarta-httpclient-user-archive@www.apache.org Received: (qmail 37047 invoked from network); 25 May 2005 08:00:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 May 2005 08:00:06 -0000 Received: (qmail 60901 invoked by uid 500); 25 May 2005 08:00:06 -0000 Delivered-To: apmail-jakarta-httpclient-user-archive@jakarta.apache.org Received: (qmail 60872 invoked by uid 500); 25 May 2005 08:00:05 -0000 Mailing-List: contact httpclient-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: "HttpClient User Discussion" Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-user@jakarta.apache.org Received: (qmail 60859 invoked by uid 99); 25 May 2005 08:00:05 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=HTML_50_60,HTML_MESSAGE,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from notesmta-03.eu.nabgroup.com (HELO notesmta-03.eu.nabgroup.com) (213.120.244.36) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 25 May 2005 01:00:02 -0700 To: httpclient-user@jakarta.apache.org Subject: SSL and NTLM problems MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.12 February 13, 2003 Message-ID: From: Jon.Andrews@eu.nabgroup.com Date: Wed, 25 May 2005 08:59:52 +0100 X-MIMETrack: Serialize by Router on NEUMT003/HUB/INET_EUROPE(Release 6.5.3FP1|December 15, 2004) at 25/05/2005 09:00:02, Serialize complete at 25/05/2005 09:00:02 Content-Type: multipart/alternative; boundary="=_alternative 002BEF4F8025700C_=" X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --=_alternative 002BEF4F8025700C_= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks to you guys who helped me work out how to finally post to this group - much appreciated! Hi folks, I'm having all kinds of trouble trying to get a secure socket connection to the outside world via our IAS proxy server. It seems that the following code is not finding a route out to the outside world through the IAS proxy. It also seems (this maybe related) not to be performing any kind of authentication at all, since I can use username=3D"username" and password=3D"password" and it does not complain about these credentials being= incorrect=3F=3F I wonder if anyone could help me out here as I admit I'm a bit of a newcomer to all this stuff. public static void main(String[] args) throws Exception { NTCredentials creds =3D new NTCredentials("user","password",= "www-cache.eu.nag.net", "nag-eur"); HttpClient client =3D new HttpClient(); PostMethod method =3D new PostMethod("https://wwwpp50.landg.= com/OrigoTermV3/GatewayV3/"); AuthScope authscope =3D new AuthScope("www-cache.eu.nag.net= ",443); // ISA proxy address client.getState().setCredentials(authscope,creds); int statusCode =3D 0; try { method.setRequestHeader("Content-Type", "text/xml");= method.setRequestBody("someXML"); // deprecated statusCode =3D client.executeMethod(method); } catch (HttpException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Status Code 1: " + statusCode); String responseBody =3D method.getResponseBodyAsString(); System.out.println("******" + responseBody); method.releaseConnection(); } } I get (seems to attempt this 4 times, this is extract of third attempt) ... Attempt number 3 to process request 24 May 2005 17:54:44,498 45142 [main] DEBUG: org.apache.commons.httpclient.HttpConnection - enter HttpConnection.open() 24 May 2005 17:54:44,498 45142 [main] DEBUG: org.apache.commons.httpclient.HttpConnection - Open connection to wwwpp50.landg.com:443 24 May 2005 17:55:05,421 66065 [main] DEBUG: org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams() 24 May 2005 17:55:05,421 66065 [main] DEBUG: org.apache.commons.httpclient.HttpMethodDirector - Closing the connection. 24 May 2005 17:55:05,421 66065 [main] DEBUG: org.apache.commons.httpclient.HttpConnection - enter HttpConnection.close() 24 May 2005 17:55:05,421 66065 [main] DEBUG: org.apache.commons.httpclient.HttpConnection - enter HttpConnection.closeSockedAndStreams() 24 May 2005 17:55:05,421 66065 [main] INFO: org.apache.commons.httpclient.HttpMethodDirector - I/O exception caught when processing request: No route to host: connect 24 May 2005 17:55:05,421 66065 [main] DEBUG: org.apache.commons.httpclient.HttpMethodDirector - No route to host: connect java.net.NoRouteToHostException: No route to host: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:329) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:194) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:181) at java.net.Socket.connect(Socket.java:459) at java.net.Socket.connect(Socket.java:409) at java.net.Socket.(Socket.java:315) at java.net.Socket.(Socket.java:197) at com.ibm.jsse.bg.(Unknown Source) at com.ibm.jsse.JSSESocketFactory.createSocket(Unknown Source) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket= (SSLProtocolSocketFactory.java:81) at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket= (SSLProtocolSocketFactory.java:126) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:704) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethod= Director.java:382) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDir= ector.java:168) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) at AlternateAuthenticationExample.main(AlternateAuthenticationExample.java:162)= 24 May 2005 17:55:05,421 66065 [main] INFO: org.apache.commons.httpclient.HttpMethodDirector - Retrying request 24 May 2005 17:55:05,421 66065 [main] DEBUG: org.apache.commons.httpclient.HttpMethodDirector - Attempt number 4 ... Any ideas on why its not actually managing to authenticate=3F I guess this is the reason why it says "can't find route to host" Thanks in advance, Jon Andrews =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D National Australia Group Europe Limited (Company Number 02108635, Registered= Office 88 Wood Street, London EC2V 7QQ) (NAGE) is a subsidiary of National = Australia Bank Limited (an Australian registered company). The following UK = companies are authorised and regulated by the Financial Services Authority: = Clydesdale Bank PLC (trading as Clydesdale Bank and Yorkshire Bank), MLC Sa= vings Limited, MLC Trust Management Company Limited, Clydesdale Bank Insuran= ce Brokers Limited, Yorkshire Bank Financial Services Limited, National Aust= ralia Insurance Services Limited and Custom Fleet Limited. The views and opinions expressed in this email may not reflect the views and= opinions of any member of the group of which NAGE forms part. The informati= on contained in this message is confidential and may also be privileged. It = is intended only for the addressee named above. The unauthorised use, disclo= sure, copying or alteration of this message is strictly prohibited. If you a= re not the addressee (or responsible for delivery of the message to the addr= essee), please notify the originator immediately by return message and destr= oy the original message. This message and any attachments have been scanned = for viruses prior to leaving the NAGE network. However, NAGE does not guaran= tee the security of this message and will not be responsible for any damages= arising as a result of any virus being passed on or arising from any altera= tion of this message by a third party. NAGE may monitor emails sent to and f= rom the NAGE network. --=_alternative 002BEF4F8025700C_=--