Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing SessionID from SOAP call

 
Ste Lamb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again...
I'm currently using JDeveloper and Oracle9iAS. I have an applet which calls a stateful EJB via a web-service (stateful class).
When creating the SOAP calls a session ID is sent as part of the calls - does anyone know of a way to access this session ID? I've found getters and setters for the session ID in the Oracle documentation but there doesn't seem to be a way to use this given the only link I have with the session is the HTTP connection.
No doubt I'm missing something obvious as usual but any help much appreciated.
Thanks
Ste
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, a design point. A stateful Web Service is a really, really bad idea. I wouldn't do that if I were you -- it misses the point of the Web Services specifications, which are supposed to be stateless.
Second, there is a way to do this in JAX-RPC. I'm not sure which SOAP engine you are using, but if it supports JAX-RPC it can be done -- look through the JAX-RPC specification.
Kyle
 
Ste Lamb
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the stateful web-service wasn't my method of choice but I couldn't find a way around the problem. Basically I have to talk to a stateful bean thorugh a SOAP connection. I am using the Oracle SOAP methods and this does not allow you to talk to a stateful bean directly using SOAP. Hence I have had to put a simple class in between the client and bean.
My experience isn't such that I could find a better way to do this.... given time restrictions etc..(isn't that always the way???). Suggestions on a better way would be much appreciated for future reference.
Also, why is a stateful web-service such a bad idea? Surely if its correctly managed its not a problem...
Thanks for your advice I'll look into the JAX-RPC specification...
Ste
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic