axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vaibhav Arya" <>
Subject [axis2-sessionmanagement]
Date Thu, 21 May 2009 08:18:22 GMT
Hi Everyone,


I want to maintain soap session so that client should be in session for 30

I'm trying to put some values in ServiceContext in so that I could fetch
those values in later requests, but at every request the values in service
context are shown null.



I can get the value in service Context when I execute
'sender.sendReceive(createPayLoad())' twice in same request.


Can any body please tell me what to do to get this job done.

My code on client side is as follows,


                                    ConfigurationContext configContext =

                                    ServiceClient sender = new
ServiceClient(configContext, null);


                                    Options opts = new Options();






                                    OMElement ele =


My server side code to fetch values in session is,


           MessageContext messageContext =
MessageContext.getCurrentMessageContext ();

           System.out.println ("getLastTouchedTime" +
messageContext.getLastTouchedTime ());

           ServiceContext sc = messageContext.getServiceContext ();

           Object incValue = sc.getProperty ("VALUE");

           if (incValue!= null) {

               System.out.println ("incValue: " + (String) incValue);


               System.out.println ("setting value for incValue: " + (String)

               sc.setProperty ("VALUE", "Value is existing");



I would highly appreciate any quick help.


Thanks & regards


Vaibhav Kr. Arya


Private, Confidential and Privileged. This e-mail and any files and attachments transmitted
with it are confidential and/or privileged. They are intended solely for the use of the intended
recipient. The content of this e-mail and any file or attachment transmitted with it may have
been changed or altered without the consent of the author. If you are not the intended recipient,
please note that any review, dissemination, disclosure, alteration, printing, circulation
or Transmission of this e-mail and/or any file or attachment transmitted with it, is prohibited
and may be unlawful. If you have received this e-mail or any file or attachment transmitted
with it in error please notify OTS Solutions at

View raw message