It's possible to invoke a servlet from a web service maintainig the state ? I would call the servlet from the web service and using the session from within it. I'm using Axis.
Joined: Mar 15, 2004
I'm far from an expert on this, but this is my understanding of the situation:
Web service calls are inherently stateless, and there is as yet no (commonly implemented) standard for pushing sessions across Web services, or linking them to session beans.
So, you will either have to invent a mechanism for this yourself, or make your session bean stateless. I'd wager the latter would be much easier.
Joined: Aug 04, 2005
Tim, thank you for the answer. I dont'use any EJB.
The situation is:
CLIENT <-----> WEBSERVICE <----->SERVLET
The servlet sets some attributes in the session, I would read these attributes from the web service in order to pass them to the client. The servlet and the Web Service are in the same Web Container.
Joined: Mar 22, 2005
I think it would be easier to rewrite your servlet class so that you can instantiate it, and call the relevant methods directly from within your web service. That would save all the overhead of transforming Java objects to HTTP back to Java objects, as well as avoiding the problem you ask about.