aspose file tools*
The moose likes Web Services and the fly likes web service vs HTTP session Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "web service vs HTTP session" Watch "web service vs HTTP session" New topic
Author

web service vs HTTP session

Greg Parker
Greenhorn

Joined: Aug 13, 2010
Posts: 10
How correct am I when I use HTTP session information in a web based web service endpoint code (say Axis)? Does the specification block me from doing it? Is the web service supposed to be a piece of business functionality exposed regardless of the medium it is communicated through? Context : when i am trying to expose a web service to a javascript soap client i have the capability to use the session info but is it correct to do so? What are the tradeoffs. Thanks in advance for the answers..
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12683
    
    5
SOAP specifically does not say anything about persistence via sessions or any other mechanism so it is up to you, the programmer. The HttpSession mechanism gets activated before your SOAP service sees the request.

If your service is only going to be accessed by browsers implementing cookies, sure you can use sessions. Of course some potential users may have cookies turned off so that could be a problem.

Bill

Java Resources at www.wbrogden.com
Greg Parker
Greenhorn

Joined: Aug 13, 2010
Posts: 10
Thanks William..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web service vs HTTP session
 
Similar Threads
using session facade vs business delegate
Web service develepment
Webservices and SCBCD
Can this possible?
stateless session bean and web service