Thanks a lot for all the replies,
In order to manage HttpSession, I've tried the following code for my web
service :
public class TestSessionService implements ServiceLifecycle {
private ServletEndpointContext jaxrpcContext;
public void init(Object context) throws ServiceException {
jaxrpcContext = (ServletEndpointContext) context;
}
public void destroy() {
jaxrpcContext = null;
}
public void tester() {
HttpSession session = jaxrpcContext.getHttpSession();
System.out.println("SESSION ID : "+session.getId());
}
}
But I get this error when the getHttpSession() method is invoked :
org.apache.axis2.AxisFault: null; nested exception is:
java.lang.NullPointerException
I think the object named jaxrpcContext isn't initialise in the init() method
and is always null.
My source is this document :
http://www-128.ibm.com/developerworks/xml/library/ws-tip-stateful.html
Any kind of help will be highly appreciated.
Best regards,
Loïc
----- Original Message -----
From: "Deepal Jayasinghe" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, June 28, 2006 9:06 AM
Subject: Re: [Axis2] Need a small example with HttpSession
Loïc MAZE wrote:
Hi,
I'm a beginner with Axis 2 and I would like to know how to implement a
stateful web service using HttpSession. I've spent several hours on
this mailing but I’ve found absolutely nothing.
ya , we dont have enough documents explaining session management stuff
(I am on the process of writing a document on this area).
Can somebody supply a concrete example of axis session ? Any
information in this regard will be highly appreciated.
Managing transport level session require you to change axis2.xml , need
to add the following parameter;
<parameter name="manageTransportSession" locked="false">true</parameter>
Then you need to deploy your services with its scope being
"transportsession" .
In the client side when you invoking the service you have an option to
manage session as well.
To understand the concept pls have a look at
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceGroupContextTest.java
Best regards,
Loïc
--
Thanks,
Deepal
................................................................
~Future is Open~
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]