Here is the problem that I am trying to solve: I have a web application already coded using Struts Framework and I want to expose all the functionality of the application as a webservice. The problem is that all business logic is in the Struts Action classes and I am kind of lost as to how to solve this problem. I can take out the business logic into Business Delegates as methods and expose these new methods but how do I keep track of Session from there?
If i dont use request, how do I set attributes in session? how do I even get to the session? I am confused about what should I leave in the Action class and what should I take out.
Example: One action class uses DAO to get information from database per user role, set this information into the session, jsp displays the information on the page.
My question is whose responsibility is it to get the information from the database and set it in session. Should this logic be in the method exposed as a webservice or the client using the webservice should set it in the session? I think I am unable to draw a line between what webservice should do and what the client using it should implement...