The moose likes Web Services and the fly likes Maintaining state between two web services Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Maintaining state between two web services" Watch "Maintaining state between two web services" New topic
Author

Maintaining state between two web services

Abdul Basit Munda
Greenhorn

Joined: Sep 07, 2005
Posts: 10
Can anyone of you tell me , how can we maintain states between two web services. The problem on hand is i have one login service and one project service, Now user should be able to login using login service and then use the project service, so i need some kind of session management between login service and project service. I know how to maintain session in individual services, but i m not sure how can i have the same session used between both the services, Any other ideas to solve the problem will be appreciated too

Thanks for your help
Rr Kumaran
Ranch Hand

Joined: Sep 17, 2001
Posts: 548
may be SAML and WS-Addressing can answer your questions.


RR Kumaran
SCJP 1.4
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
The login service could return a token to the user, which is then passed to the project service along with the other parameters. Assuming that both services run in the same webapp, you can maintain a hashmap in the web app context with the token as key to more user information.
This won't work if the services don't run in the same web app, of course.


Android appsImageJ pluginsJava web charts
 
 
subject: Maintaining state between two web services
 
Threads others viewed
Can 2 ear files talk to each other
Lost Session at JWSP-Client
Tricky question (How to pass javax.ejb.Handle)
SessionListener
SCDJWS-REST/SOAP Web services
IntelliJ Java IDE