You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Andy Moody <an...@statefarm.com> on 2000/09/27 17:13:57 UTC

setSession and getSession on HttpSession class

I'm a newbie to SOAP, so forgive my ignorance, but, why does the
RPCRouterServlet class call the setSession and getSession methods on the
HttpSession class?

These two calls caused me many hours of trouble shooting to get SOAP running
on WebSphere for OS/390.  When I look at the JDK api for the HttpSession
class
(http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession
.html), these two methods are NOT in the interface.

I finally just commented out the two lines of code to keep moving.
Obviously, this prevents me from using session scoping in my SOAP server.

So what's the deal?



Re: setSession and getSession on HttpSession class

Posted by Cory Isaacson <ci...@capita2.com>.
setSession and getSession on HttpSession classThis is because if you declare a service of scope Session, it stores your service class in the Servlet Session object. The reason the methods are not there is because you are using an older version of the Servlet API. Version 2.2 is required, or you need to modify the code to the 'put' and 'get' methods instead of the 'attribute' methods. I had the same problem with WebSphere 3.02 on NT. WebSphere 3.5 uses the newer API, and should fix this.

Cory
  ----- Original Message ----- 
  From: Andy Moody 
  To: soap-user@xml.apache.org 
  Sent: Wednesday, September 27, 2000 11:13 AM
  Subject: setSession and getSession on HttpSession class


  I'm a newbie to SOAP, so forgive my ignorance, but, why does the RPCRouterServlet class call the setSession and getSession methods on the HttpSession class?

  These two calls caused me many hours of trouble shooting to get SOAP running on WebSphere for OS/390.  When I look at the JDK api for the HttpSession class (http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession.html), these two methods are NOT in the interface.

  I finally just commented out the two lines of code to keep moving.  Obviously, this prevents me from using session scoping in my SOAP server.

  So what's the deal? 




Re: setSession and getSession on HttpSession class

Posted by Cory Isaacson <ci...@capita2.com>.
The problem is that Servlet 2.2 won't work with WebSphere 3.0x (I already
tried it), so you do have to edit the source or upgrade Websphere.

Cory
----- Original Message -----
From: "Emerson(§d´ÜÀs)" <ch...@ms45.url.com.tw>
To: <so...@xml.apache.org>
Sent: Thursday, September 28, 2000 1:58 AM
Subject: Re: setSession and getSession on HttpSession class


> Hi:
> you can try Servlet 2.2 and the file (servlet.jar) size is 35k.
> I don't know why RPCRouterServlet.class needs it but
> it's OK with Servlet2.2
>
> good luck!
>
> On Wed, 27 Sep 2000 10:13:57 -0500
> Andy Moody <an...@statefarm.com> wrote:
>
> > This message is in MIME format. Since your mail reader does not
understand
> > this format, some or all of this message may not be legible.
> >
> > ----------------------------------------------------------------
> > I'm a newbie to SOAP, so forgive my ignorance, but, why does the
> > RPCRouterServlet class call the setSession and getSession methods on the
> > HttpSession class?
> >
> > These two calls caused me many hours of trouble shooting to get SOAP
running
> > on WebSphere for OS/390.  When I look at the JDK api for the HttpSession
> > class
> >
(http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession
> > .html), these two methods are NOT in the interface.
> >
> > I finally just commented out the two lines of code to keep moving.
> > Obviously, this prevents me from using session scoping in my SOAP
server.
> >
> > So what's the deal?
> >
> >
> >
>


Re: setSession and getSession on HttpSession class

Posted by Cory Isaacson <ci...@capita2.com>.
The problem is that Servlet 2.2 won't work with WebSphere 3.0x (I already
tried it), so you do have to edit the source or upgrade Websphere.

Cory
----- Original Message -----
From: "Emerson(§d´ÜÀs)" <ch...@ms45.url.com.tw>
To: <so...@xml.apache.org>
Sent: Thursday, September 28, 2000 1:58 AM
Subject: Re: setSession and getSession on HttpSession class


> Hi:
> you can try Servlet 2.2 and the file (servlet.jar) size is 35k.
> I don't know why RPCRouterServlet.class needs it but
> it's OK with Servlet2.2
>
> good luck!
>
> On Wed, 27 Sep 2000 10:13:57 -0500
> Andy Moody <an...@statefarm.com> wrote:
>
> > This message is in MIME format. Since your mail reader does not
understand
> > this format, some or all of this message may not be legible.
> >
> > ----------------------------------------------------------------
> > I'm a newbie to SOAP, so forgive my ignorance, but, why does the
> > RPCRouterServlet class call the setSession and getSession methods on the
> > HttpSession class?
> >
> > These two calls caused me many hours of trouble shooting to get SOAP
running
> > on WebSphere for OS/390.  When I look at the JDK api for the HttpSession
> > class
> >
(http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession
> > .html), these two methods are NOT in the interface.
> >
> > I finally just commented out the two lines of code to keep moving.
> > Obviously, this prevents me from using session scoping in my SOAP
server.
> >
> > So what's the deal?
> >
> >
> >
>


Re: setSession and getSession on HttpSession class

Posted by "Emerson(§d´ÜÀs)" <ch...@ms45.url.com.tw>.
Hi:
you can try Servlet 2.2 and the file (servlet.jar) size is 35k.
I don't know why RPCRouterServlet.class needs it but
it's OK with Servlet2.2

good luck!

On Wed, 27 Sep 2000 10:13:57 -0500
Andy Moody <an...@statefarm.com> wrote:

> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> 
> ----------------------------------------------------------------
> I'm a newbie to SOAP, so forgive my ignorance, but, why does the
> RPCRouterServlet class call the setSession and getSession methods on the
> HttpSession class?
> 
> These two calls caused me many hours of trouble shooting to get SOAP running
> on WebSphere for OS/390.  When I look at the JDK api for the HttpSession
> class
> (http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession
> .html), these two methods are NOT in the interface.
> 
> I finally just commented out the two lines of code to keep moving.
> Obviously, this prevents me from using session scoping in my SOAP server.
> 
> So what's the deal?
> 
> 
> 


Re: setSession and getSession on HttpSession class

Posted by "Emerson(§d´ÜÀs)" <ch...@ms45.url.com.tw>.
Hi:
you can try Servlet 2.2 and the file (servlet.jar) size is 35k.
I don't know why RPCRouterServlet.class needs it but
it's OK with Servlet2.2

good luck!

On Wed, 27 Sep 2000 10:13:57 -0500
Andy Moody <an...@statefarm.com> wrote:

> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
> 
> ----------------------------------------------------------------
> I'm a newbie to SOAP, so forgive my ignorance, but, why does the
> RPCRouterServlet class call the setSession and getSession methods on the
> HttpSession class?
> 
> These two calls caused me many hours of trouble shooting to get SOAP running
> on WebSphere for OS/390.  When I look at the JDK api for the HttpSession
> class
> (http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession
> .html), these two methods are NOT in the interface.
> 
> I finally just commented out the two lines of code to keep moving.
> Obviously, this prevents me from using session scoping in my SOAP server.
> 
> So what's the deal?
> 
> 
> 


Re: setSession and getSession on HttpSession class

Posted by Cory Isaacson <ci...@capita2.com>.
setSession and getSession on HttpSession classThis is because if you declare a service of scope Session, it stores your service class in the Servlet Session object. The reason the methods are not there is because you are using an older version of the Servlet API. Version 2.2 is required, or you need to modify the code to the 'put' and 'get' methods instead of the 'attribute' methods. I had the same problem with WebSphere 3.02 on NT. WebSphere 3.5 uses the newer API, and should fix this.

Cory
  ----- Original Message ----- 
  From: Andy Moody 
  To: soap-user@xml.apache.org 
  Sent: Wednesday, September 27, 2000 11:13 AM
  Subject: setSession and getSession on HttpSession class


  I'm a newbie to SOAP, so forgive my ignorance, but, why does the RPCRouterServlet class call the setSession and getSession methods on the HttpSession class?

  These two calls caused me many hours of trouble shooting to get SOAP running on WebSphere for OS/390.  When I look at the JDK api for the HttpSession class (http://java.sun.com/products/servlet/2.1/api/javax.servlet.http.HttpSession.html), these two methods are NOT in the interface.

  I finally just commented out the two lines of code to keep moving.  Obviously, this prevents me from using session scoping in my SOAP server.

  So what's the deal?