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.
Thanks Lillo
Tim West
Ranch Hand
Joined: Mar 15, 2004
Posts: 539
posted
0
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.
Still, YMMV.
-Tim
Lillo Birillo
Greenhorn
Joined: Aug 04, 2005
Posts: 8
posted
0
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.
THX.Bye Lillo
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35257
7
posted
0
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.