|
List Info
Thread: Need NTLM Authentication help
|
|
| Need NTLM Authentication help |
  United States |
2008-06-11 08:59:42 |
I am trying to connect to a web service using Axis2 version
1.4 (Latest
one available for download from the site) and Java version
1.4.2
I can reach the web service but I keep failing to
authenticate, as I do
not really know how to properly authenticate using NTLM.
I am getting the following error attempting to connect:
Transport error: 401 Error: Unauthorized
org.apache.axis2.AxisFault: Transport error: 401 Error:
Unauthorized
There was some code online describing how you can create an
instance of
HttpTransportProperties.NTLMAuthentication however that
subclass
"NTLMAuthentication" does not exist anywhere in
the Apache Axis2 JAR and
my compiler gets an error on that line. I have no idea what
version they
were using but it is certainly not the latest one.
Here's the code I have now to reach the web service:
TestStub stub = new TestStub();
Options options = stub._getServiceClient().getOptions();
HttpTransportProperties.ProxyProperties proxy = new
HttpTransportProperties.ProxyProperties();
proxy.setProxyPort(80);
proxy.setDomain("someproxy.somedomain.com");
proxy.setProxyName("someproxy.somedomain.com");
options.setProperty(org.apache.axis2.transport.http.HTTPCons
tants.PROXY,
proxy);
TestStub.GetTestResponse resp = stub.GetTest(new
TestStub.GetTest());
What do I need to change here to properly use NTLM
authentication?
------------------------------------------------------------
---------
To unsubscribe, e-mail: axis-dev-unsubscribe ws.apache.org
For additional commands, e-mail: axis-dev-help ws.apache.org
|
|
| Re: Need NTLM Authentication help |

|
2008-06-12 01:47:36 |
|
Please use the following code
HttpTransportProperties.Authenticator ntlmAuthentication = new HttpTransportProperties.Authenticator();
ntlmAuthentication.setUsername("axis2");
ntlmAuthentication.setPassword("axis2"); ntlmAuthentication.setHost("axis2"); ntlmAuthentication.setPort(9443); ntlmAuthentication.setRealm("someRealm");
ntlmAuthentication.setAllowedRetry(boolean allowedRetry)
options.setProperty( org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, ntlmAuthentication);
-- Saminda Abeyruwan
Senior Software Engineer WSO2 Inc. - www.wso2.org
|
| Re: Need NTLM Authentication help |

|
2008-06-12 01:48:24 |
|
HttpTransportProperties.Authenticator ntlmAuthentication =
new HttpTransportProperties.Authenticator();
ntlmAuthentication.setUsername("axis2");
ntlmAuthentication.setPassword("axis2"); ntlmAuthentication.setHost("axis2"); ntlmAuthentication.setPort(9443); ntlmAuthentication.setRealm("someRealm");
ntlmAuthentication.setAllowedRetry(true)
options.setProperty( org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, ntlmAuthentication);
On Thu, Jun 12, 2008 at 12:17 PM, Saminda Abeyruwan < samindaa  gmail.com" >samindaa gmail.com> wrote:
Please use the following code
HttpTransportProperties.Authenticator ntlmAuthentication = new HttpTransportProperties.Authenticator();
ntlmAuthentication.setUsername("axis2");
ntlmAuthentication.setPassword("axis2"); ntlmAuthentication.setHost("axis2"); ntlmAuthentication.setPort(9443); ntlmAuthentication.setRealm("someRealm");
ntlmAuthentication.setAllowedRetry(boolean allowedRetry)
options.setProperty( org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE, ntlmAuthentication);-- Saminda Abeyruwan
Senior Software Engineer WSO2 Inc. - www.wso2.org
-- Saminda Abeyruwan
Senior Software Engineer WSO2 Inc. - www.wso2.org
|
[1-3]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|