J
Jitesh Gangwani
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
Following is the java code
NTCredentials creds = new
NTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","CWSPSEHOLI");
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
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
Following is the java code
NTCredentials creds = new
NTCredentials("USERNAME","PASSWORD","SERVER_IP_ADDRESS","CWSPSEHOLI");
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