You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by ti...@adinet.com.uy on 2004/02/04 16:33:57 UTC
session
Hi,
I would like to know how, using soap rpc, could I determine (from the service
side) an id of who is invoking the call.
I have seen that using soap messages, with the SOAPContext(request-context)
of the incoming message, I could use the method getProperty with the constant
org.apache.soap.Constants.BAG_HTTPSESSION, to obtain an object from the
class javax.servlet.http.HttpSession, and then to obtain the id of the http
session from there. But I would like to know if I could do something like
that with soap rpc.
Thanks a lot,
Tizo
Re: Asunto: Re: session
Posted by Scott Nichol <sn...@scottnichol.com>.
Yes, the Apache SOAP client can keep track of sessions. At http://ws.apache.org/soap/docs/guide/migration.html, the section on <HTTP session maintenance> shows how to make the client aware of sessions.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: <ti...@adinet.com.uy>
To: <so...@ws.apache.org>
Sent: Wednesday, February 04, 2004 2:14 PM
Subject: Asunto: Re: session
Scott,
I had thought something like the client id as a parameter, but then I though
in the http session (and I started to read about http, because I didn't
know much about that).
But using apache soap, both in the client and service side, the http sessions
are supported, aren't them?
Thanks a lot,
Tizo
>-- Mensaje original --
>Reply-To: soap-user@ws.apache.org
>Date: Wed, 4 Feb 2004 07:56:43 -0800 (PST)
>From: Scott Nichol <ch...@yahoo.com>
>Subject: Re: session
>To: soap-user@ws.apache.org
>
>
>The answer depends in part on what you mean by "an id
>of who is invoking the call."
>
>Many services are implemented with a client id as a
>parameter to every method call. Google does this.
>You could design your services similarly.
>
>If you specifically want to use sessions based on HTTP
>cookies, you are correct that you want to access
>session info. You can do this with RPC. Look at
>http://ws.apache.org/soap/docs/guide/migration.html,
>the section titled <Getting at "environmental"
>information for RPC style services>.
>
>However, I must point out that many SOAP
>implementations do not, by default, maintain sessions
>on the client, and some implementations cannot
>maintain sessions at all. If you will have an "open"
>client base (i.e. you will not specify the way the
>clients are implemented), you should not assume that
>sessions based on HTTP cookies will be supported.
>
>--- tizo@adinet.com.uy wrote:
>> Hi,
>>
>> I would like to know how, using soap rpc, could I
>> determine (from the service
>> side) an id of who is invoking the call.
>>
>> I have seen that using soap messages, with the
>> SOAPContext(request-context)
>> of the incoming message, I could use the method
>> getProperty with the constant
>> org.apache.soap.Constants.BAG_HTTPSESSION, to obtain
>> an object from the
>> class javax.servlet.http.HttpSession, and then to
>> obtain the id of the http
>> session from there. But I would like to know if I
>> could do something like
>> that with soap rpc.
>>
>> Thanks a lot,
>>
>> Tizo
>>
>>
>
>
>=====
>Scott Nichol
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free web site building tool. Try it!
>http://webhosting.yahoo.com/ps/sb/
Re: session
Posted by Scott Nichol <ch...@yahoo.com>.
Yes, the Apache SOAP client can keep track of
sessions. At
http://ws.apache.org/soap/docs/guide/migration.html,
the section on <HTTP session maintenance> shows how to
make the client aware of sessions.
--- tizo@adinet.com.uy wrote:
> Scott,
>
> I had thought something like the client id as a
> parameter, but then I though
> in the http session (and I started to read about
> http, because I didn't
> know much about that).
>
> But using apache soap, both in the client and
> service side, the http sessions
> are supported, aren't them?
>
> Thanks a lot,
>
> Tizo
>
>
>
> >-- Mensaje original --
> >Reply-To: soap-user@ws.apache.org
> >Date: Wed, 4 Feb 2004 07:56:43 -0800 (PST)
> >From: Scott Nichol <ch...@yahoo.com>
> >Subject: Re: session
> >To: soap-user@ws.apache.org
> >
> >
> >The answer depends in part on what you mean by "an
> id
> >of who is invoking the call."
> >
> >Many services are implemented with a client id as a
> >parameter to every method call. Google does this.
> >You could design your services similarly.
> >
> >If you specifically want to use sessions based on
> HTTP
> >cookies, you are correct that you want to access
> >session info. You can do this with RPC. Look at
>
>http://ws.apache.org/soap/docs/guide/migration.html,
> >the section titled <Getting at "environmental"
> >information for RPC style services>.
> >
> >However, I must point out that many SOAP
> >implementations do not, by default, maintain
> sessions
> >on the client, and some implementations cannot
> >maintain sessions at all. If you will have an
> "open"
> >client base (i.e. you will not specify the way the
> >clients are implemented), you should not assume
> that
> >sessions based on HTTP cookies will be supported.
> >
> >--- tizo@adinet.com.uy wrote:
> >> Hi,
> >>
> >> I would like to know how, using soap rpc, could I
> >> determine (from the service
> >> side) an id of who is invoking the call.
> >>
> >> I have seen that using soap messages, with the
> >> SOAPContext(request-context)
> >> of the incoming message, I could use the method
> >> getProperty with the constant
> >> org.apache.soap.Constants.BAG_HTTPSESSION, to
> obtain
> >> an object from the
> >> class javax.servlet.http.HttpSession, and then to
> >> obtain the id of the http
> >> session from there. But I would like to know if I
> >> could do something like
> >> that with soap rpc.
> >>
> >> Thanks a lot,
> >>
> >> Tizo
> >>
> >>
> >
> >
> >=====
> >Scott Nichol
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! SiteBuilder - Free web site building tool.
> Try it!
> >http://webhosting.yahoo.com/ps/sb/
>
>
=====
Scott Nichol
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
Asunto: Re: session
Posted by ti...@adinet.com.uy.
Scott,
I had thought something like the client id as a parameter, but then I though
in the http session (and I started to read about http, because I didn't
know much about that).
But using apache soap, both in the client and service side, the http sessions
are supported, aren't them?
Thanks a lot,
Tizo
>-- Mensaje original --
>Reply-To: soap-user@ws.apache.org
>Date: Wed, 4 Feb 2004 07:56:43 -0800 (PST)
>From: Scott Nichol <ch...@yahoo.com>
>Subject: Re: session
>To: soap-user@ws.apache.org
>
>
>The answer depends in part on what you mean by "an id
>of who is invoking the call."
>
>Many services are implemented with a client id as a
>parameter to every method call. Google does this.
>You could design your services similarly.
>
>If you specifically want to use sessions based on HTTP
>cookies, you are correct that you want to access
>session info. You can do this with RPC. Look at
>http://ws.apache.org/soap/docs/guide/migration.html,
>the section titled <Getting at "environmental"
>information for RPC style services>.
>
>However, I must point out that many SOAP
>implementations do not, by default, maintain sessions
>on the client, and some implementations cannot
>maintain sessions at all. If you will have an "open"
>client base (i.e. you will not specify the way the
>clients are implemented), you should not assume that
>sessions based on HTTP cookies will be supported.
>
>--- tizo@adinet.com.uy wrote:
>> Hi,
>>
>> I would like to know how, using soap rpc, could I
>> determine (from the service
>> side) an id of who is invoking the call.
>>
>> I have seen that using soap messages, with the
>> SOAPContext(request-context)
>> of the incoming message, I could use the method
>> getProperty with the constant
>> org.apache.soap.Constants.BAG_HTTPSESSION, to obtain
>> an object from the
>> class javax.servlet.http.HttpSession, and then to
>> obtain the id of the http
>> session from there. But I would like to know if I
>> could do something like
>> that with soap rpc.
>>
>> Thanks a lot,
>>
>> Tizo
>>
>>
>
>
>=====
>Scott Nichol
>
>__________________________________
>Do you Yahoo!?
>Yahoo! SiteBuilder - Free web site building tool. Try it!
>http://webhosting.yahoo.com/ps/sb/
Re: session
Posted by Scott Nichol <ch...@yahoo.com>.
The answer depends in part on what you mean by "an id
of who is invoking the call."
Many services are implemented with a client id as a
parameter to every method call. Google does this.
You could design your services similarly.
If you specifically want to use sessions based on HTTP
cookies, you are correct that you want to access
session info. You can do this with RPC. Look at
http://ws.apache.org/soap/docs/guide/migration.html,
the section titled <Getting at "environmental"
information for RPC style services>.
However, I must point out that many SOAP
implementations do not, by default, maintain sessions
on the client, and some implementations cannot
maintain sessions at all. If you will have an "open"
client base (i.e. you will not specify the way the
clients are implemented), you should not assume that
sessions based on HTTP cookies will be supported.
--- tizo@adinet.com.uy wrote:
> Hi,
>
> I would like to know how, using soap rpc, could I
> determine (from the service
> side) an id of who is invoking the call.
>
> I have seen that using soap messages, with the
> SOAPContext(request-context)
> of the incoming message, I could use the method
> getProperty with the constant
> org.apache.soap.Constants.BAG_HTTPSESSION, to obtain
> an object from the
> class javax.servlet.http.HttpSession, and then to
> obtain the id of the http
> session from there. But I would like to know if I
> could do something like
> that with soap rpc.
>
> Thanks a lot,
>
> Tizo
>
>
=====
Scott Nichol
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/