Axis2 Session Managment

笑着哭i 提交于 2019-12-02 08:26:05

You may want to use handlers for authentication. Suggest you start here on that topic.

For session information, start here.

As @Maurice Perry said, I'm not sure your question makes sense...remember that web services are supposed to be stateless.

Web services supposed to be stateless. So if you planned to use 'session' for authentication you could consider the following approach:

  • Define authentication API that returns some key/token that server can identify user with in consecutive calls
  • Client must call authentication API first
  • Client must pass the authentication key with any consecutive call in form of API parameter or custom http header.

You could to take a look at eBay API, they use both http headers and method parameters.

You have to remember that if you planned to use session for holding the state, there is a bunch of issues you have to take care of in clustering environment since the same client can be served by different nodes.

I got you creating the Soap service using eclipse and axis 2

just change in the service XML file to have scope

    <service name="Myservice"  scope="soapsession">

and then your service will be state full not default session as request

you got a long way to go to make change , i cannot discuss all of that

here is the link

http://blogs.deepal.org/2009/06/axis2-tutorials-and-articles.html

I'm not sure I understand you question fully. The servlet container (tomcat?) will take care of the session management, and it can also take care of the authentication.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!