cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using a webservice with session activation

Former Member
0 Kudos

Hello

I´m trying to access a webservice that holds a session for every user.

My problem is, that whenever i use a method, a new session on my webservice server is cerated, although I use the same webservice instance on the client side.

Example :

IMyWebService myWebService = (IMyWebService)PortalRuntime.getRuntimeResources().getService("myProject.MySampleWS");

myWebService.doLogin(username, pwd);

myWebService.getUserInfos();

This code produces two sessions on my webservice server, so that getUserInfos() fails,because it uses a different session than doLogin.

Does anyone know how I can use the same session as long as I am using the same instance of IMyWebService ?

Regards

Alexander

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

the solution to your problem mainly depends on how your webservice server is implementing sessions.

The normal "http-server-way" won't work here. (Http-Servers normally use cookies or insert session-ids in the respective html files for tracking a session)

For example webservice-servers can send a session-id as the return-type of a call to some login method. This session-id then has to be used (by the client) as a parameter in subsequent calls to that webservice.

Former Member
0 Kudos

thank´s very much

i already thought of something like this. right now I´ve implemented my own session management, based on the uniqueID of the portal user.