Hi all,
I am writing a client application using Axis to access web services. The server 
publishes an "Authentication" service and a bunch of "Functional" services.
I am expected to login using the first and then call the other services passing the 
same session cookie.

A .Net client worked fine, as I had the ability to share the "CookieManager". In axis, 
though, I cant seem to make it work:

// Bind to authentication service
AuthenticationServiceService authLocator=new AuthenticationServiceServiceLocator();
AuthenticationService auth=authLocator.getauthService();
((AuthServiceSoapBindingStub)auth).setMaintainSession(true); // maintain session
auth.login("user","password");

// bind to a functional service
FunctionalServiceService serviceLocator=new FunctionalServiceServiceLocator();
FunctionalService service=authLocator.getfunctionalService();
((FunctionalServiceSoapBindingStub)service).setMaintainSession(true); // maintain 
session - but it is not the right session
service.doSomething(); // Will throw 403

How can I make both stubs share the same session / cookies?
This is especially frustrating since the server is Axis - and I cant write an Axis 
client...

Omri Spector

Reply via email to