hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gangwani, Jitesh (Churchill India)" <Jitesh.Gangw...@rbs.co.uk>
Subject NTLM authentication problem
Date Thu, 16 Dec 2004 12:05:47 GMT
Hi,
   I am trying to a get a webpage which is on IIS server in different
domain secured by NTLM authentication. I am using
commons-httpclient-3.0-beta1 api to connect. I am not able to get
index.html page.

The NLTM api is giving following information messages 

****************************************************************************
********************
15-Dec-2004 16:01:46
org.apache.commons.httpclient.auth.AuthChallengeProcessor
selectAuthScheme
INFO: ntlm authentication scheme selected
15-Dec-2004 16:01:46 org.apache.commons.httpclient.HttpMethodDirector
processWWWAuthChallenge
INFO: No credentials available for NTLM <any
realm>@www.maintenance.cws.pse1.rbsgrp.net:80
<http://www.maintenance.cws.pse1.rbsgrp.net:80>
****************************************************************************
*********************



The web page which is retrieved is of HTTP Error
HTTP 401.2 - Unauthorized: Logon failed due to server configuration
Internet Information Services



Following is the java code

****************************************************************************
*********************
 NTCredentials creds =
newNTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","MY_DOMAIN");
 HttpClient client = new HttpClient();
 HttpMethod method = new GetMethod("http://servername/index.html");
 AuthScope authscope =  new AuthScope("http://servername/index.html",80);
 client.getState().setCredentials(authscope,creds);
 int statusCode = client.executeMethod(method);
 System.out.println("Status Code 1:  " + statusCode);
 String responseBody = method.getResponseBodyAsString();
 System.out.println("******" + responseBody);
 method.releaseConnection();
****************************************************************************
***********************

Can anyone please tell me what I am doing wrong.

Thanks

Jitesh




The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St
Andrew Square, Edinburgh EH2 2YB

The Royal Bank of Scotland plc is authorised and regulated by the Financial Services Authority
and represents The Royal Bank of Scotland Marketing Group. The Bank sells life policies, collective
investment schemes and pension products and advises only on the Marketing Group's range of
these products and on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.

This e-mail message is confidential and for use by the addressee only. If the message is received
by anyone other than the addressee, please return the message to the sender by replying to
it and then delete the message from your computer. Internet e-mails are not necessarily secure.
The Royal Bank of Scotland plc does not accept responsibility for changes made to this message
after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the
responsibility of the recipient to ensure that the onward transmission, opening or use of
this message and any attachments will not adversely affect its systems or data. No responsibility
is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry
out such virus and other checks as it considers appropriate.


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message