• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

WebServices and Session

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to expose a method as a webservice that calls the DAO class to get the data from the database and sets it as an attribute in the session. How do I expose this method as a webservice?

Can a method exposed as a webservice set and get attributes to/from session? Can a method exposed as a webservice get request parameters?

Please reply.

S Hasan.
 
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by S Hasan:
Can a method exposed as a webservice set and get attributes to/from session? Can a method exposed as a webservice get request parameters?



You can if the endpoint is implemented as a servlet. However if you do, you are breaking the rules for SOAP web services. Any information between the initial sender and ultimate receiver is supposed to be inside the SOAP envelope. HTTP session and HTTP attributes are part of the HTTP request/response that carry the SOAP envelope. Therefore all the information in the HTTP request/response other than the SOAP envelope is strictly off limits.

See also:
Lost Session at JWSP-Client
HTTP session access considerations
Correlation identifiers
 
moose poop looks like football shaped elk poop. About the size of this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic