latest svn, you can configure ntlm and set auth scheme priority as well

-- dims

On 9/29/06, David Pinho (Hexadecimal) <[EMAIL PROTECTED]> wrote:
I've successfully used HttpClient with NTLM auth (directly, no axis), but I had 
to use the org.apache.httpclient.NTCredentials. It seems Axis is not 
understanding you want to use NTLM.
Using HttpClient you can configure auth schemes priorities with something like:

Vector<String> authPrefs = new Vector<String>(1);
authPrefs.add(AuthPolicy.NTLM);
httpClient.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY,
                                            authPrefs);


Hope it can help shed some light, although a bit off-topic.




-----Original Message-----
From: Jake Goulding [mailto:[EMAIL PROTECTED]
Sent: quinta-feira, 28 de Setembro de 2006 20:01
To: [email protected]
Subject: Re: [axis2] NTLM Authentication available?

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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>

--

JAKE GOULDING
Software Engineer
[EMAIL PROTECTED]

Viví­simo [Search Done Right(tm)]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AVISO

Esta mensagem e quaisquer anexos seus podem conter informação confidencial para 
uso exclusivo do destinatário. Cabe ao destinatário assegurar a verificação de 
vírus e outras medidas que assegurem que esta mensagem não afecta os seus 
sistemas. Se não for o destinatário, não deverá usar, distribuir ou copiar este 
e-mail, devendo proceder à sua eliminação e informar o emissor. É estritamente 
proibido o uso, a distribuição, a cópia ou qualquer forma de disseminação não 
autorizada deste e-mail e seus anexos. Obrigado.

DISCLAIMER
This e-mail and its attachments may contain confidential information for 
exclusive use of its recipient. It is your responsibility to carry out 
appropriate virus and other checks to ensure that this message and any 
attachments do not affect your systems / data. If you are not the intended 
recipient you must not use, distribute or reproduce this e-mail and you must 
notify the sender and delete the entire email. Any unauthorized use, 
dissemination, distribution or copying of this message and its attachments is 
strictly prohibited. Thank You.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to