Hello, found this:
http://hc.apache.org/httpclient-3.x/authentication.html#Preemptive_Authentication which has solved the problemwith this code: HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator(); auth.setUsername(user); auth.setPassword(pwd); auth.setPreemptiveAuthentication(true); Best regards Bartolomeo Il giorno gio, 30/09/2010 alle 09.50 +0200, Bartolomeo Nicolotti ha scritto: > Hello, > > we're using axis2 to generate a client to a webservice to which we've > to authenticate with user/pwd passing: > > HttpTransportProperties.Authenticator > auth = new HttpTransportProperties.Authenticator(); > auth.setUsername(user); > auth.setPassword(pwd); > > options.setProperty(org.apache.axis2.transport.http.HTTPConstants.AUTHENTICATE,auth); > > The problem is that the generated client sends 2 http requests before > to get authenticated. > > The first HTTP request we get unauthotized, the second is the same > except for this http header > > Authorization: Basic ...... > > Is there a way to send this HTTP header in the first http request? > Something like PreAuthentication? > > Many thanks > > Best reagards > > Bartolomeo > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
