You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by ar...@WellsFargo.COM on 2002/09/19 15:59:44 UTC

RE: Using sessions

One way to do it is to have your client object ask the call object to do it
as follows:

	if(doSession)
      {
          shc = new SOAPHTTPConnection ();
          shc.setMaintainSession (true);
          setSOAPTransport (shc);
      }

I assume there are other ways to do it.

-----Original Message-----
From: dovle [mailto:dovle@delsyne.ro]
Sent: Friday, June 21, 2002 12:51 AM
To: Apache SOAP
Subject: Using sessions


Hello to all,
I realize this topic was already discussed for several times but I don't
have the related mails. So if someone knows about a good tutorial or sample
on how to keep sessions active for an Apache Soap service, please email me.

(rpcrouter is a servlet, so it must somehow manage the sessions. I don't
want to implement my own session tracking meckanism.)

thanks alot
dovle


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>

Re: Using sessions

Posted by Scott Nichol <sn...@scottnichol.com>.
Apache SOAP uses cookies for sessions.  That means the server will send HTTP
headers for either Set-Cookie or Set-Cookie2.  The client must parse these
headers and send back the relevant information.  Cookies are specified in
IETF RFC 2109 and 2965.  There is an additional attribute named "expires"
that is not in the spec, but was introduced some time ago by Netscape and is
still in widespread use.  You can look at the source for Apache SOAP client
cookie handling at
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/src/org/apache/so
ap/transport/http/Cookie.java?rev=1.4.

Scott Nichol

----- Original Message -----
From: "dovle" <do...@delsyne.ro>
To: "Scott Nichol" <sn...@scottnichol.com>
Sent: Saturday, June 22, 2002 4:29 AM
Subject: Re: Using sessions


> All fine, but how can I get them, and especially, how could I keep them
> active (the client must do something special or not).
>
> I am interested in this kind of situation, because I want to know what
> should the client send in order to use the same session each time.
> Interop... not using apache soap as client, using KSoap.
>
> If I remember well, there is a parameter of the HTTP connection that
> contains the session id. But I don't know too much on this and that's why
I
> was asking for some links, ideas or pieces of information.
>
> Thanks for your help
> dovle
>
> > In fact, sessions are maintained by default, so you will get sessions
even
> > by doing nothing.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: <ar...@WellsFargo.COM>
> > To: <so...@xml.apache.org>
> > Sent: Thursday, September 19, 2002 9:59 AM
> > Subject: RE: Using sessions
> >
> >
> > > One way to do it is to have your client object ask the call object to
do
> > it
> > > as follows:
> > >
> > > if(doSession)
> > >       {
> > >           shc = new SOAPHTTPConnection ();
> > >           shc.setMaintainSession (true);
> > >           setSOAPTransport (shc);
> > >       }
> > >
> > > I assume there are other ways to do it.
> > >
> > > -----Original Message-----
> > > From: dovle [mailto:dovle@delsyne.ro]
> > > Sent: Friday, June 21, 2002 12:51 AM
> > > To: Apache SOAP
> > > Subject: Using sessions
> > >
> > >
> > > Hello to all,
> > > I realize this topic was already discussed for several times but I
don't
> > > have the related mails. So if someone knows about a good tutorial or
> > sample
> > > on how to keep sessions active for an Apache Soap service, please
email
> > me.
> > >
> > > (rpcrouter is a servlet, so it must somehow manage the sessions. I
don't
> > > want to implement my own session tracking meckanism.)
> > >
> > > thanks alot
> > > dovle
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@xml.apache.org>
> > > For additional commands, e-mail: <ma...@xml.apache.org>
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@xml.apache.org>
> > > For additional commands, e-mail: <ma...@xml.apache.org>
> > >
> > >
> >
>
>


Re: Using sessions

Posted by Scott Nichol <sn...@scottnichol.com>.
Apache SOAP uses cookies for sessions.  That means the server will send HTTP
headers for either Set-Cookie or Set-Cookie2.  The client must parse these
headers and send back the relevant information.  Cookies are specified in
IETF RFC 2109 and 2965.  There is an additional attribute named "expires"
that is not in the spec, but was introduced some time ago by Netscape and is
still in widespread use.  You can look at the source for Apache SOAP client
cookie handling at
http://cvs.apache.org/viewcvs.cgi/*checkout*/xml-soap/java/src/org/apache/so
ap/transport/http/Cookie.java?rev=1.4.

Scott Nichol

----- Original Message -----
From: "dovle" <do...@delsyne.ro>
To: "Scott Nichol" <sn...@scottnichol.com>
Sent: Saturday, June 22, 2002 4:29 AM
Subject: Re: Using sessions


> All fine, but how can I get them, and especially, how could I keep them
> active (the client must do something special or not).
>
> I am interested in this kind of situation, because I want to know what
> should the client send in order to use the same session each time.
> Interop... not using apache soap as client, using KSoap.
>
> If I remember well, there is a parameter of the HTTP connection that
> contains the session id. But I don't know too much on this and that's why
I
> was asking for some links, ideas or pieces of information.
>
> Thanks for your help
> dovle
>
> > In fact, sessions are maintained by default, so you will get sessions
even
> > by doing nothing.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: <ar...@WellsFargo.COM>
> > To: <so...@xml.apache.org>
> > Sent: Thursday, September 19, 2002 9:59 AM
> > Subject: RE: Using sessions
> >
> >
> > > One way to do it is to have your client object ask the call object to
do
> > it
> > > as follows:
> > >
> > > if(doSession)
> > >       {
> > >           shc = new SOAPHTTPConnection ();
> > >           shc.setMaintainSession (true);
> > >           setSOAPTransport (shc);
> > >       }
> > >
> > > I assume there are other ways to do it.
> > >
> > > -----Original Message-----
> > > From: dovle [mailto:dovle@delsyne.ro]
> > > Sent: Friday, June 21, 2002 12:51 AM
> > > To: Apache SOAP
> > > Subject: Using sessions
> > >
> > >
> > > Hello to all,
> > > I realize this topic was already discussed for several times but I
don't
> > > have the related mails. So if someone knows about a good tutorial or
> > sample
> > > on how to keep sessions active for an Apache Soap service, please
email
> > me.
> > >
> > > (rpcrouter is a servlet, so it must somehow manage the sessions. I
don't
> > > want to implement my own session tracking meckanism.)
> > >
> > > thanks alot
> > > dovle
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@xml.apache.org>
> > > For additional commands, e-mail: <ma...@xml.apache.org>
> > >
> > > --
> > > To unsubscribe, e-mail:   <ma...@xml.apache.org>
> > > For additional commands, e-mail: <ma...@xml.apache.org>
> > >
> > >
> >
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Using sessions

Posted by Scott Nichol <sn...@scottnichol.com>.
In fact, sessions are maintained by default, so you will get sessions even
by doing nothing.

Scott Nichol

----- Original Message -----
From: <ar...@WellsFargo.COM>
To: <so...@xml.apache.org>
Sent: Thursday, September 19, 2002 9:59 AM
Subject: RE: Using sessions


> One way to do it is to have your client object ask the call object to do
it
> as follows:
>
> if(doSession)
>       {
>           shc = new SOAPHTTPConnection ();
>           shc.setMaintainSession (true);
>           setSOAPTransport (shc);
>       }
>
> I assume there are other ways to do it.
>
> -----Original Message-----
> From: dovle [mailto:dovle@delsyne.ro]
> Sent: Friday, June 21, 2002 12:51 AM
> To: Apache SOAP
> Subject: Using sessions
>
>
> Hello to all,
> I realize this topic was already discussed for several times but I don't
> have the related mails. So if someone knows about a good tutorial or
sample
> on how to keep sessions active for an Apache Soap service, please email
me.
>
> (rpcrouter is a servlet, so it must somehow manage the sessions. I don't
> want to implement my own session tracking meckanism.)
>
> thanks alot
> dovle
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>


Re: Using sessions

Posted by Scott Nichol <sn...@scottnichol.com>.
In fact, sessions are maintained by default, so you will get sessions even
by doing nothing.

Scott Nichol

----- Original Message -----
From: <ar...@WellsFargo.COM>
To: <so...@xml.apache.org>
Sent: Thursday, September 19, 2002 9:59 AM
Subject: RE: Using sessions


> One way to do it is to have your client object ask the call object to do
it
> as follows:
>
> if(doSession)
>       {
>           shc = new SOAPHTTPConnection ();
>           shc.setMaintainSession (true);
>           setSOAPTransport (shc);
>       }
>
> I assume there are other ways to do it.
>
> -----Original Message-----
> From: dovle [mailto:dovle@delsyne.ro]
> Sent: Friday, June 21, 2002 12:51 AM
> To: Apache SOAP
> Subject: Using sessions
>
>
> Hello to all,
> I realize this topic was already discussed for several times but I don't
> have the related mails. So if someone knows about a good tutorial or
sample
> on how to keep sessions active for an Apache Soap service, please email
me.
>
> (rpcrouter is a servlet, so it must somehow manage the sessions. I don't
> want to implement my own session tracking meckanism.)
>
> thanks alot
> dovle
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>