You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by "Averbukh, Yuliya" <YA...@doubleclick.net> on 2001/02/28 00:05:59 UTC

unable to track sessions using SOAP

I found that Session scope in the deployed application is equivalent to the
request scope.  The reason for that is the following function call in the
invoke method of Call.java:

	st.send(url, SOAPActionURI, null, callEnv, smr, ctx);

The third argument (headers) is null, so the new headers are created for
every request.  Thus, even if the client sets the cookie, it is being erased
by this call.  This solved the problem for me:

	st.send(url, SOAPActionURI, st.getHeaders(), callEnv, smr, ctx);

To keep the same session, I do something like this prior to calling
invoke():

	m_call.getSOAPTransport().getHeaders().put("Cookie", m_strCookie);
where cookie string was obtained from Set-Cookie header in the previous call

Hope this helps and will make it to the build.
thanks,
--Yuliya



-----Original Message-----
From: William A. Nagy [mailto:nagy@watson.ibm.com]
Sent: Tuesday, February 27, 2001 1:33 PM
To: soap-dev@xml.apache.org
Subject: java tag requirement for providers in deployment descriptor


Is there any particular reason why all pluggable providers are
required to have a <java> tag in their deployment descriptor?

Lines 553-556 of DeploymentDescriptor.java say:

      nl = e.getElementsByTagNameNS (Constants.NS_URI_XML_SOAP_DEPLOYMENT,
                                     "java");
      if ( nl != null ) {

getElementsByTagNameNS, however, returns an empty NodeList if there
are no matching elements, not null.  I'm guessing that this is really
an error, and not a real requirement.  If there are no objections,
could someone please fix this?  Thanks.

-Bill


Re: unable to track sessions using SOAP

Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
I looked at this carefully, but I don't think its right to commit it.
You're right, making the change allows you to make sessions work,
but it also picks up *all* the response headers and sends them back..
which doesn't feel good. Even the server identification string would
go back right?

How do u know which cookies to send back? Do all servers always say
    Set-Cookie: <blah ..>
and then u just copy all of those back out? If so I can implement
session support directly onto the Call HTTP transport object
directly.

Bye,

Sanjiva.

----- Original Message -----
From: "Averbukh, Yuliya" <YA...@doubleclick.net>
To: <so...@xml.apache.org>
Sent: Tuesday, February 27, 2001 6:05 PM
Subject: unable to track sessions using SOAP


> I found that Session scope in the deployed application is equivalent to the
> request scope.  The reason for that is the following function call in the
> invoke method of Call.java:
>
> st.send(url, SOAPActionURI, null, callEnv, smr, ctx);
>
> The third argument (headers) is null, so the new headers are created for
> every request.  Thus, even if the client sets the cookie, it is being erased
> by this call.  This solved the problem for me:
>
> st.send(url, SOAPActionURI, st.getHeaders(), callEnv, smr, ctx);
>
> To keep the same session, I do something like this prior to calling
> invoke():
>
> m_call.getSOAPTransport().getHeaders().put("Cookie", m_strCookie);
> where cookie string was obtained from Set-Cookie header in the previous call
>
> Hope this helps and will make it to the build.
> thanks,
> --Yuliya
>
>
>
> -----Original Message-----
> From: William A. Nagy [mailto:nagy@watson.ibm.com]
> Sent: Tuesday, February 27, 2001 1:33 PM
> To: soap-dev@xml.apache.org
> Subject: java tag requirement for providers in deployment descriptor
>
>
> Is there any particular reason why all pluggable providers are
> required to have a <java> tag in their deployment descriptor?
>
> Lines 553-556 of DeploymentDescriptor.java say:
>
>       nl = e.getElementsByTagNameNS (Constants.NS_URI_XML_SOAP_DEPLOYMENT,
>                                      "java");
>       if ( nl != null ) {
>
> getElementsByTagNameNS, however, returns an empty NodeList if there
> are no matching elements, not null.  I'm guessing that this is really
> an error, and not a real requirement.  If there are no objections,
> could someone please fix this?  Thanks.
>
> -Bill
>