Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

web service login operation that will return a session id.  RSS feed

 
win llen
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am very new to web services I just started on this technology a couple of days ago. My manager requires me to create a web service and expose the login(user, password) and logout(sessionid) methods. The login must return session id when user and password authentication is successful.

I've been circling around the internet for a couple days already looking for a tutorial on how to implement this methods and I'm now frustrated.

I would appreciate it very much if someone can provide a link to a tutorial that has similar functionality with my web service.

Thanks.


Regards,
winllen

 
R Srini
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I couldn't find a step-by-step tutorial on this, but please take a look at these links:

- https://jax-ws.dev.java.net/nonav/2.1/docs/statefulWebservice.html
- http://blogs.sun.com/sujit/entry/ws_addressing_and_stateful_webservice
- https://jax-ws.dev.java.net/jax-ws-21-ea3/docs/wsaddressing.html
- https://www.wso2.org/library/articles/stateful-web-services-axis2

Its quite a bit of reading, but you should be able to put two and two together and make it work.
 
win llen
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thank you for the links. Now I have an idea on what should be done for my web service.

More power!




 
Gupta Tarun
Greenhorn
Posts: 22
Hibernate MyEclipse IDE Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
win llen wrote:Hello,

Thank you for the links. Now I have an idea on what should be done for my web service.

More power!



Please share any Sample code if possible.

Thanks
 
win llen
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gupta,

this can easily be done using stateful webservice. In my case I was using axis2 framework for my webservice. You can use either transport session or soapsession to preserve the conversational state.

follow the tutorial in this link it will give you a sample code

https://www.wso2.org/library/articles/stateful-web-services-axis2


cheers!

 
Gupta Tarun
Greenhorn
Posts: 22
Hibernate MyEclipse IDE Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks! I tried this example, This was a great help !

Next step is to use it for Authentication Purpose.

Regards,
Tarun
 
Gupta Tarun
Greenhorn
Posts: 22
Hibernate MyEclipse IDE Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have added a new Post Here and sample code, Please provide some feedback.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!