axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ali, Haneef" <haneef....@hp.com>
Subject RE: HttpBasicAuthentification scenarion
Date Wed, 11 Jul 2007 15:49:24 GMT

Hi,

Stub.getOptions should help you.

// Sample code

HttpTransportProperties.Authenticator auth = new
HttpTransportProperties.Authenticator();

auth.setPreemptiveAuthentication(true);
auth.setAuthSchemes(authSchemes);

auth.setUsername("username"); 
auth.setPassword("password");

Options options = ((YourStub)._getServiceClient().getOptions(); 

options.setProperty(HTTPConstants.AUTHENTICATE, auth);

YourStub._getServiceClient().setOptions(options);


Haneef

________________________________

From: Nencho Lupanov [mailto:nencholupanov@googlemail.com] 
Sent: Wednesday, July 11, 2007 6:26 AM
To: axis-dev@ws.apache.org; axis-user@ws.apache.org
Subject: HttpBasicAuthentification scenarion


Hi all,
 i am trying to use the axis2 ServiceClient against 
web service endpoint that has http basic authentification enabled.
 
I wonder - is there a way to get hold of the http-commons HttpClient
that is used underneath in order to set the Credentials?
 
Thanks,
Nencho

---------------------------------------------------------------------
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