axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amardeep singh khera <>
Subject Queries regarding session managment in axsi2
Date Thu, 07 May 2009 13:48:31 GMT
Hi All,

I am facing some problem in implementing session management while using
axis2. It will be great if anyone can help me out with few queries.

My Scenario: The scenario which I am trying to implement is very simple one.
Basically I have a service implementation class which has a Login and couple
of business methods. Now from a client when I call Login method of the
service I  pass user name and password. At the server my service class
authenticate the user and sends response back to client with the session id.
I am trying to implement transport session so at client I am able to see
session using this code snippet :

stub = *new* MyStub(*serviceUrl*);

client = stub._getServiceClient();

Options opt = client.getOptions();




Sample value of session id:JSESSIONID=61F54A15234AD93EB70F63B05DC0A6C1;

This is all fine till here. Now if in the Login method the user
authentication fails the session id which the server should sent to the
client should be null , so that if the user tries to access my other
business methods he should not be able to do that. Basically I need a way to
control sessionId at the server only.
Right now i am trying to set sessionId to null using this code snippet:

MessageContext msgContext=MessageContext.*getCurrentMessageContext*();

SessionContext sessionContext=msgContext.getSessionContext();



But at my client i am still getting the sesssionId as not-nCan you please
suggest a way of doing this.

Thanks in advance.

Amardeep Singh Khera

View raw message