开发者

Java Web Service session management

开发者 https://www.devze.com 2023-03-13 18:48 出处:网络
I am building a web service where the user will need to login and the application will need to maintain a persistent session.I am using Ap开发者_运维百科ache Axis2 for client/server communication via

I am building a web service where the user will need to login and the application will need to maintain a persistent session. I am using Ap开发者_运维百科ache Axis2 for client/server communication via SOAP/XML. What would the simplest and most common way of doing this? I know I could implement session management from scratch similarly to how a browser does it, using cookies, but I'd rather use standard Java libraries for this. Am I correct in assuming that even though I'm using Axis2, the solution doesn't really have anything to do with Axis2 since Axis2 is basically just a way for the client/server to send messages to each other?

I've read a lot of information online about this, but there's so much information that it's hard to know where to start. Basically I'm just looking for someone to point me in the right direction on what classes to use and so on. I just need a simple username password authentication and session management system for a web service.


First, are you 100% sure you need sessions? SOAP is happier without them. Second, are you 100% sure you need Axis2? Third, I think the most straightforward way to do sessions in Axis2 is the transport approach. It's been a couple of years since I did this, but this http://wso2.org/library/3264 article seems reasonable.

0

精彩评论

暂无评论...
验证码 换一张
取 消