Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 82673 invoked from network); 1 Jan 2010 15:52:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Jan 2010 15:52:33 -0000 Received: (qmail 39242 invoked by uid 500); 1 Jan 2010 15:52:31 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 39144 invoked by uid 500); 1 Jan 2010 15:52:31 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 39135 invoked by uid 99); 1 Jan 2010 15:52:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jan 2010 15:52:31 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of amilasuriarachchi@gmail.com designates 209.85.160.49 as permitted sender) Received: from [209.85.160.49] (HELO mail-pw0-f49.google.com) (209.85.160.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jan 2010 15:52:20 +0000 Received: by pwj12 with SMTP id 12so9731483pwj.8 for ; Fri, 01 Jan 2010 07:51:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=g5mVvGB0wG9jPj3EIcwfNoOr9I0PaJ10oOR+CVJwsw0=; b=f9juw6NZKR5J0zYYpldTKNiINMOV6+ZEIHoYiiis1gYyp544uFp+TlBFIL02t7RjLN /FKMioEJiQVc2bSVNVBhyAHA4/i3e0Cx7HWyJiIwhn3ePkJ7naVMZHkgZOqj+1jk1L/c Zb4ONtnp+MlKTNhc7qcICI71SqkdLDRK5KgqY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=vCzH0iWDTQiP46klSxR/YN9qQDwc7X1jaSM0gcr3tX9v6gJDDCrUvzFZmIdQ0Clk8x W5FJ+mIDIEITyuGmkeTPNBoC9q+hhBoBAVQdnq2vLue/EmZs0CMrbC4XWb+sDBpAwsb8 uuIBLf6Sv7rGVAXF7RilDAN/uRB1hmA7I1IjI= MIME-Version: 1.0 Received: by 10.143.138.7 with SMTP id q7mr13938577wfn.314.1262361119087; Fri, 01 Jan 2010 07:51:59 -0800 (PST) In-Reply-To: <1588B37BB7702343A6DDA3C7CA1913F60E44A000BD@mercure.sofaxis.lan> References: <1588B37BB7702343A6DDA3C7CA1913F60E44A000BD@mercure.sofaxis.lan> Date: Fri, 1 Jan 2010 21:21:59 +0530 Message-ID: <60708f4b1001010751s6bd6109i6df471f5eace27c3@mail.gmail.com> Subject: Re: No CredentialProviders problem in axis2 and httpclient From: Amila Suriarachchi To: axis-user@ws.apache.org Content-Type: multipart/alternative; boundary=000e0cd5f6fa14dd02047c1c5a8c X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd5f6fa14dd02047c1c5a8c Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I tried with the sample described here[1] and it worked. this may help you. Amila. [1] http://amilachinthaka.blogspot.com/2010/01/axis2-authentication.html On Wed, Dec 23, 2009 at 1:19 PM, DJP JEAN-PROST Dominique < Dominique.JEAN-PROST@dexia-sofaxis.com> wrote: > Hello, > > > > [ENV] > > AXIS2 1.5.1 > > Commons-httpclient 3.1 > > [/ENV] > > > > I=92m meeting a problem I really can=92t resolve and after reading many l= ines > of code in axis2, here where I am : > > - I=92m trying to call a ms exchange 2007 WS > > - I setup I think my authentication code using this kind of code : > > > > final Options options =3D > this.serviceExchange._getServiceClient().getOptions(); > > final Authenticator authenticator =3D new Authenticator(); > > > > // Cf. > http://ws.apache.org/axis2/1_5_1/http-transport.html#preemptive_auth > > final List authScheme =3D new ArrayList(); > > authScheme.add(Authenticator.NTLM); > > authScheme.add(Authenticator.BASIC); > > > > authenticator.setAuthSchemes(authScheme); > > authenticator.setUsername(this.username); > > authenticator.setPassword(this.password); > > authenticator.setHost(this.host); > > authenticator.setDomain(this.domain); > > authenticator.setPort(this.port); > > > > options.setTimeOutInMilliSeconds(this.timeout); > > options.setProperty(HTTPConstants.CHUNKED, "false"); > > options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true"); > > options.setProperty(HTTPConstants.AUTHENTICATE, authenticator); > > > > this.serviceExchange._getServiceClient().setOptions(options); > > > > I then get the following execution logs where you can see that there is n= o > credential providers found. > > So I searched the net, and found this > http://markmail.org/search/list:org%2Eapache%2Ews%2Eaxis-dev+CredentialsP= roviderwhere you can see that the credential providers was first added and = the > deleted in org/apache/axis2/transport/http/AbstractHTTPSender.java > > > > > > My question is then quite simple : how can I make this work ? Is it right > that CredentialsProvider was deleted from AbstractHTTPSender ? If so, wha= t > should I add in my authentication setup to make it work ? > > Regards, > > dom > > > > > > > > > > HttpMethodDirector.java:843) - Authorization required > > 2009-12-21 12:01:11,447 DEBUG > org.apache.commons.httpclient.HttpMethodDirector ( > HttpMethodDirector.java:662) - enter > HttpMethodBase.processAuthenticationResponse(HttpState, HttpConnection) > > 2009-12-21 12:01:11,447 DEBUG > org.apache.commons.httpclient.auth.AuthChallengeProcessor ( > AuthChallengeProcessor.java:90) - Supported authentication schemes in > the order of preference: [NTLM, Basic] > > 2009-12-21 12:01:11,447 INFO > org.apache.commons.httpclient.auth.AuthChallengeProcessor ( > AuthChallengeProcessor.java:101) - NTLM authentication scheme selecte= d > > 2009-12-21 12:01:11,463 DEBUG > org.apache.commons.httpclient.auth.AuthChallengeProcessor ( > AuthChallengeProcessor.java:155) - Using authentication scheme: ntlm > > 2009-12-21 12:01:11,463 DEBUG > org.apache.commons.httpclient.auth.AuthChallengeProcessor ( > AuthChallengeProcessor.java:163) - Authorization challenge processed > > 2009-12-21 12:01:11,463 DEBUG > org.apache.commons.httpclient.HttpMethodDirector ( > HttpMethodDirector.java:714) - Authentication scope: NTLM realm>@mercure:443 > > 2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.HttpState ( > HttpState.java:436) - enter > HttpState.getCredentials(AuthScope) > > 2009-12-21 12:01:11,463 DEBUG > org.apache.commons.httpclient.HttpMethodDirector ( > HttpMethodDirector.java:861) - Credentials required > > 2009-12-21 12:01:11,463 DEBUG > org.apache.commons.httpclient.HttpMethodDirector ( > HttpMethodDirector.java:879) - Credentials provider not available > > 2009-12-21 12:01:11,463 INFO > org.apache.commons.httpclient.HttpMethodDirector ( > HttpMethodDirector.java:737) - No credentials available for NTLM realm>@mercure:443 > > 2009-12-21 12:01:11,463 DEBUG org.apache.axis2.transport.http.HTTPSender > ( HTTPSender.java:278) - Handling response - 401 > > > > > > > > Consultez nos nouveaux sites internet : http://www.dexia-sofaxis.com http= ://www.dexia-sofcap-sofcah.com > > Tous ensemble pour l=92environnement : n=92imprimer ce courriel que si n= =E9cessaire. > > Dexia Sofaxis disclaimer : http://www.dexia-sofaxis.com/disclaimer.html > > --=20 Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ --000e0cd5f6fa14dd02047c1c5a8c Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable I tried with the sample described here[1] and it worked. this may help you.=

Amila.

[1] http://amilachinthaka.blogspot.com/2010/01/= axis2-authentication.html

On Wed, Dec 23, 2009 at 1:19 PM, DJP JEAN-PR= OST Dominique <Dominique.JEAN-PROST@dexia-sofaxis.com> wr= ote:

Hello,

=A0

[ENV]

AXIS2 1.5.1

Commons-httpclient 3.1

[/ENV]

=A0

I=92m meeting a problem I really can=92t resolve and after reading many lines of code in axis2, here where I am=A0:

- I=92m trying to call a ms exchange 2007 WS

- I setup I think my authentication code using this kind of code=A0:

=A0

=A0=A0=A0=A0=A0 =A0=A0 final Options options =3D this.serviceExchange._g= etServiceClient().getOptions();

=A0=A0=A0=A0=A0=A0=A0=A0 final Authenticator authenticator =3D new Authenticator();

=A0

=A0=A0=A0=A0=A0=A0=A0=A0 // Cf. http://ws.apache= .org/axis2/1_5_1/http-transport.html#preemptive_auth

=A0=A0=A0=A0=A0=A0=A0=A0 final List<String> authScheme =3D new ArrayList<String>();

=A0=A0=A0=A0=A0=A0=A0=A0 authScheme.add(Authenticator.NTLM);

=A0=A0=A0=A0=A0=A0=A0=A0 authScheme.add(Authenticator.BASIC);

=A0

=A0=A0=A0=A0=A0=A0=A0=A0 authenticator.setAuthSchemes(authScheme);

=A0=A0=A0=A0=A0=A0=A0=A0 authenticator.setUsername(this.username);

=A0=A0=A0=A0=A0=A0=A0=A0 authenticator.setPassword(this.password);

=A0=A0=A0=A0=A0=A0=A0=A0 authenticator.setHost(this.host);

=A0=A0=A0=A0=A0=A0=A0=A0 authenticator.setDomain(this.domain);

=A0=A0=A0=A0=A0=A0=A0=A0 authenticator.setPort(this.port);

=A0

=A0=A0=A0=A0=A0=A0=A0=A0 options.setTimeOutInMilliSeconds(this.timeout);=

=A0=A0=A0=A0=A0=A0=A0=A0 options.setProperty(HTTPConstants.CHUNKED, "false");

=A0=A0=A0=A0=A0=A0=A0=A0 options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");

=A0=A0=A0=A0=A0=A0=A0=A0 options.setProperty(HTTPConstants.AUTHENTICATE, authenticator);

=A0

=A0=A0=A0=A0=A0=A0=A0=A0 this.serviceExchange._getServiceClient().setOptions(options);

=A0

I then get the following execution logs where you can see that there is no credential providers found.

So I searched the net, and found this http://markmail.org/search/list:org%2Eapache%2Ews%2Eaxis-dev+CredentialsP= rovider where you can see that the credential providers was first added and the del= eted in org/apache/axis2/transport/http/AbstractHTTPSender.java

=A0

=A0

My question is then quite simple : how can I make this work ? Is it right that CredentialsProvider was deleted from AbstractHTTPSe= nder ? If so, what should I add in my authentication setup to make it work ?

Regards,

dom

=A0

=A0

=A0

=A0

HttpMethodDirector.java:843)=A0=A0=A0=A0 - Authorization required

2009-12-21 12:01:11,447 DEBUG org.apache.commons.httpclient.HttpMethodDirector (=A0=A0=A0=A0=A0=A0 HttpMethodDirector.java:662)=A0=A0=A0=A0 - enter HttpMethodBase.processAuthenticationResponse(HttpState, HttpConnection)

2009-12-21 12:01:11,447 DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor (=A0=A0 AuthChallengeProcessor.java:90)=A0=A0=A0=A0 - Supported authentication sche= mes in the order of preference: [NTLM, Basic]

2009-12-21 12:01:11,447 INFO=A0 org.apache.commons.httpclient.auth.AuthChallengeProcessor (=A0=A0 AuthChallengeProcessor.java:101)=A0=A0=A0=A0 - NTLM authentication scheme s= elected

2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor (=A0=A0 AuthChallengeProcessor.java:155)=A0=A0=A0=A0 - Using authentication scheme:= ntlm

2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.auth.AuthChallengeProcessor (=A0=A0 AuthChallengeProcessor.java:163)=A0=A0=A0=A0 - Authorization challenge proc= essed

2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.HttpMethodDirector (=A0=A0=A0=A0=A0=A0 HttpMethodDirector.java:714)=A0=A0=A0=A0 - Authentication scope: NTLM <a= ny realm>@mercure:443

2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.HttpState ( =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0HttpState.java:436)=A0=A0=A0=A0 - enter HttpState.getCredentials(AuthScope)

2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.HttpMethodDirector (=A0=A0=A0=A0=A0=A0 HttpMethodDirector.java:861)=A0=A0=A0=A0 - Credentials required

2009-12-21 12:01:11,463 DEBUG org.apache.commons.httpclient.HttpMethodDi= rector (=A0=A0=A0=A0=A0=A0 HttpMethodDirector.java:879)=A0=A0=A0=A0 - Credentials = provider not available

2009-12-21 12:01:11,463 INFO=A0 org.apache.commons.httpclient.HttpMethodDirector (=A0=A0=A0=A0=A0=A0 HttpMethodDirector.java:737)=A0=A0=A0=A0 - No credentials available for NTL= M <any realm>@mercure:443

2009-12-21 12:01:11,463 DEBUG org.apache.axis2.transport.http.HTTPSender (=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0 HTTPSender.java:278)=A0=A0=A0=A0 - Handling response - 401

=A0

=A0

=A0

Consultez nos nouveaux sites internet :=20
http://www.dexia=
-sofaxis.com=20
http://www=
.dexia-sofcap-sofcah.com

Tous ensemble pour l=92environnement : n=92imprimer ce courriel que si n=E9=
cessaire.

Dexia Sofaxis disclaimer : http://www.dexia-sofaxis.com/disclaimer.html



--
Amila Suriarachchi
W= SO2 Inc.
blog: http://am= ilachinthaka.blogspot.com/
--000e0cd5f6fa14dd02047c1c5a8c--