Hi All,


I am facing an issue with managing session between  an axis2 java service
and C#.net console client. I am able to manage session between the same
axis2 java service and java client(axis client) by using following code in
my java  client:



Service Client client = stub._getServiceClient();

                  Options opt = client.getOptions();

                  opt.setTimeOutInMilliSeconds(600000);

                  opt.setManageSession(true);

                  client.setOptions(opt);



And in my service implementation class I store user details into axis
session using following code



MessageContext msgContext = MessageContext.*getCurrentMessageContext*();

            ServiceContext serviceContext = msgContext.getServiceContext();

            serviceContext.setProperty("ROLE_ID", roleId.toString());

            serviceContext.setProperty("AUTHENTICATION_STATUS",

                        authenticationStatus);

            serviceContext.setProperty("USER_ID", userId);

            msgContext.setServiceContext(serviceContext);



This is all working fine for me as long as I am using java client.


Now my other requirement is to develop a C# .net console client for the same
service. So I have generated the proxy class using Microsoft visual studio
from wsdl and written C#.net console client which is working fine. But now I
want to implement session management in a similar way as I am able to do so
in java client. Can anyone please suggest me a way to do so.

Thanks
Amardeep Singh

Reply via email to