Ok, it 's work fine.
So, i prefer a solution whith a property
from Axis.
Thanks.
> Nicolas,
>
> Can you please add this info to the Axis FAQ Wiki page?
>
> thanks,
> dims
>
> On 12/16/05, Nicolas De Loof <[EMAIL PROTECTED]> wrote:
> >
> > I've solved similar issue by adding this code to my app :
> >
> > DefaultHttpParams.setHttpParamsFactory(new
> > DefaultHttpParamsFactory()
> > {
> > /**
> > * @see
> >
> org.apache.commons.httpclient.params.DefaultHttpParamsFactory#createParams()
> > */
> > protected HttpParams createParams()
> > {
> > HttpParams params = super.createParams();
> >
> > params.setParameter(HttpClientParams.PREEMPTIVE_AUTHENTICATION,
> > Boolean.TRUE);
> > return params;
> > }
> > });
> >
> > Hope it can help you.
> >
> > Nico.
> >
> >
> > Slimane AMAR a écrit :
> >
> > >Hello
> > >
> > >I have the same problem :
> > >http://marc.theaimsgroup.com/?l=axis-dev&m=111891561125089
> > >
> > >The problem is due to commonsHTTPclient.
> > >HttpClient doesn't use by default the preemptive
> > >authentication :
> > >http://jakarta.apache.org/commons/httpclient/authentication.html
> > >
> > >To solve this problem the question is :
> > >Is it possible to specify a property to use
> > >the preemptive authentication with commonsHTTPclient
> > >from Axis ?
> > >
> > >
> > >
> > >>I am sending again my problem!!!!
> > >>
> > >>
> > >
> > >
> > >
> > >>I am using Axis 1.3, tomcat 5.5.12, java 1.5.
> > >>
> > >>
> > >
> > >
> > >
> > >>I am using a client-deploy.wsdd that points to CommonHTTPSender
> > >>transport so my axis client can use Http 1.1. I am
> > >>also using commonsHTTPclient-3.0-rc4.jar and commonsCodec-1-3.jar.
> > >>
> > >>
> > >
> > >
> > >
> > >>My web service is using those two handlers for authentication:
> > >><requestFlow name="checks">
> > >> <handler
> > >>type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
> > >> <handler
> > >>type="java:org.apache.axis.handlers.SimpleAuthorizationHandler"/>
> > >></requestFlow>.
> > >>
> > >>
> > >
> > >
> > >
> > >>I also set the userName and password for my Call object. Also set
> > >>setMaintainSession(true).
> > >>
> > >>
> > >
> > >
> > >
> > >>The problem is:
> > >>
> > >>
> > >
> > >
> > >
> > >>When the client sends the message it is not authorized (HTTP/1.1 401
> > >>Unauthorized). But the client sends
> > >>automatically the same message again, and now it is authorized.
> > >>
> > >>
> > >
> > >
> > >
> > >>Running ethereal I saw in the Http Header that in the first message
> > >>there is not a "Authorization: Basic + some hexadecimal stuff" entry.
> > >>The Http header response has the follow entry: WWW-Authenticate: Basic
> > >>realm="AXIS". I did not set this realm at any place (tomcat
> > >>configuration file or the axis server side).
> > >>
> > >>
> > >
> > >
> > >
> > >>At the axis fault string I have: <faultstring>User 'null' not
> > >>authenticated (unknown user)</faultstring>.
> > >>
> > >>
> > >
> > >
> > >
> > >>As I said I set the user name and password (Ah, the user name and
> > >>password exists at users.lst). Only one detail. Debugging I saw that
> > >>in the messageContext object, at the client side, that the user name
> > >>and password were empty. So in my stub I also set userName and
> > >>password for the messageContext. See the code below:
> > >>
> > >>
> > >
> > >
> > >
> > >>_call.getMessageContext().setUsername(userName);
> > >>
> > >>
> > >
> > >
> > >
> > >>_call.getMessageContext().setPassword(passWord);
> > >>
> > >>
> > >
> > >
> > >
> > >>The second message, that is the first one sent again, goes with the
> > >>Authorization entry at the Http header. The credentials: user name and
> > >>password, are filled. So, the message is authorized.
> > >>
> > >>
> > >
> > >
> > >
> > >>At last, when I use http 1.0 and HTTPSender I do not have the
> > >>authentication problem and
> > >>the message´s duplication problem.
> > >>
> > >>
> > >
> > >
> > >
> > >>With this problem, when I use http 1.1 (using CommonsHTTPSender)my web
> > >>service is slower than
> > >>with http 1.0 (using HTTPSender) even running it at a local network!!!!
> > >>
> > >>
> > >
> > >
> > >
> > >>Could anyone help me? What is going on?
> > >>
> > >>
> > >
> > >
> > >
> > >>Thx,
> > >>
> > >>
> > >
> > >
> > >
> > >>Fabrizzio Cabral de Lacerda
> > >>
> > >>
> > >
> > >
> > >--------------------------------------------------
> > >Slimane AMAR Mail: [EMAIL PROTECTED]
> > >GENIGRAPH URL : http://www.genigraph.fr
> > >104, rue Castagnary Tel : +33 01 45 33 64 63
> > >F-75015 PARIS FRANCE Fax : +33 01 45 33 89 63
> > >--------------------------------------------------
> > >
> > >
> > >
> >
> > This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient, you
> are not authorized to read, print, retain, copy, disseminate, distribute, or
> use this message or any part thereof. If you receive this message in error,
> please notify the sender immediately and delete all copies of this message.
> >
> >
>
>
> --
> Davanum Srinivas : http://wso2.com/blogs/
>
--------------------------------------------------
Slimane AMAR Mail: [EMAIL PROTECTED]
GENIGRAPH URL : http://www.genigraph.fr
104, rue Castagnary Tel : +33 01 45 33 64 63
F-75015 PARIS FRANCE Fax : +33 01 45 33 89 63
--------------------------------------------------