axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject Re: [axis2] NTLM Authentication available?
Date Thu, 28 Sep 2006 19:50:15 GMT
ah. looking at the code again. Please set the host and the domain. The
code is in here:

http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AbstractHTTPSender.java

-- dims

On 9/28/06, Jake Goulding <goulding@vivisimo.com> wrote:
> My code is listed below. I tried without either realm/domain, with both,
> and with just one of each. I always get the same exception.
>
> CODE==
> ListsStub lists = new
> ListsStub("http://192.168.0.27:81/_vti_bin/Lists.asmx");
> ServiceClient sc = lists._getServiceClient();
>
> HttpTransportProperties.Authenticator authentication =
>     new HttpTransportProperties.Authenticator();
>
> authentication.setUsername(username);
> authentication.setPassword(password);
> //authentication.setRealm("mydomain");
> //authentication.setDomain("mydomain");
>
> sc.getOptions().setProperty(HTTPConstants.AUTHENTICATE, authentication);
>
> ListsStub.GetListCollectionResponse res = lists.GetListCollection(new
> ListsStub.GetListCollection());
> ==CODE
>
> 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
>
>
> Davanum Srinivas wrote:
> > are u using setDomain or setRealm?
> >
> > On 9/28/06, Jake Goulding <goulding@vivisimo.com> wrote:
> >> Thanks for the information. I poked a bit at the Nightly, but the
> >> NTLMAuthentication object is now gone, replaced with a more generic
> >> Authentication class. Trying to use it yields:
> >>
> >> Sep 28, 2006 2:28:41 PM 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:537)
> >>
> >>         at
> >> org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:116)
> >>
> >>         at
> >> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:329)
> >>
> >>         at
> >> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:210)
> >>
> >>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:644)
> >>         at
> >> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355)
> >>
> >>         at
> >> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:285)
> >>
> >>         at
> >> com.vivisimo.connector.sharepoint.ListsStub.GetListCollection(ListsStub.java:933)
> >>
> >>         at Test.main(Test.java:25)
> >>
> >>
> >>
> >> robert lazarski wrote:
> >> > http://www.wso2.net/kb/161
> >> >
> >> > My recommendation is to use the latest nightlies , or you could wait a
> >> > week or so for the 1.1 release
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> >>
> >
> >
>
> --
>
> JAKE GOULDING
> Software Engineer
> goulding@vivisimo.com
>
> Viví­simo [Search Done Right™]
> 1710 Murray Avenue
> Pittsburgh, PA 15217 USA
> tel: +1.412.422.2499 x105
> fax: +1.412.422.2495
> vivisimo.com      clusty.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Mime
View raw message