Hi Group,

 

 

I am trying to make web service calls to MS Reporting services, which requires NTLM Authentication and so for that I have tried the below code in axis2 stub client, but I am facing "Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials" errors.

 

 

            Options options = executionStub._getServiceClient().getOptions();

 

            HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
            auth.setUsername("xxxxx");
            auth.setPassword("xxxxx");
            auth.setDomain("xxxx");
           
            options.setProperty(HTTPConstants.AUTHENTICATE,auth);

 

 

Error description:

 

Oct 23, 2006 11:45:49 AM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: ntlm authentication scheme selected
Oct 23, 2006 11:45:49 AM org.apache.commons.httpclient.HttpMethodDirector authenticate
SEVERE: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
        at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:331)
        at org.apache.commons.httpclient.HttpMethodDirector.authenticateHost(HttpMethodDirector.java:281)
        at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:233)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:169)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:534)
        at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:333)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:205)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:642)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
------

 

 

 Is this a proper way to do NTLM authentication?....  Can someone please help on this?.

 

Thank you very much,

Vinay

Reply via email to