Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

web service login operation that will return a session id.

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Ranch Hand
Posts: 215
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!




 
Greenhorn
Posts: 22
MyEclipse IDE Hibernate Postgres Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Hibernate Postgres Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
MyEclipse IDE Hibernate Postgres Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have added a new Post Here and sample code, Please provide some feedback.
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic