Skip to Content
avatar image
Former Member

Problems using a webservice with session activation

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 29, 2004 at 11:16 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.