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 Praveen Peddi <pp...@contextmedia.com> on 2003/07/07 20:59:31 UTC

turn off cookies and enable URLRewriting

Does anyone know how to turn off cookies on the apache soap client so that I can use URL Rewriting.
Basically our application is deployed in clustered environment and I am trying to test soap services with URL Rewriting enabled. I have my soap client in swing that uses Apache SOAP. Right now I am using session management by calling call.setMaintainSession(true).

Praveen

Re: turn off cookies and enable URLRewriting

Posted by Scott Nichol <sn...@scottnichol.com>.
To maintain a session, the server must send the client some piece of 
information that the client will then send back.  With cookies, this 
is done by the server including a cookie in the Set-Cookie HTTP 
header.  The client then sends that cookie back with each subsequent 
request in a Cookie header.  The server identifies the session based 
on the cookie.

With URL rewriting, the server sends the client a URL with jsessionid 
in the query string.  This is sort of built-in when the server is 
sending HTML to the client.  For each URL sent as a link within the 
HTML, the servlet code first calls HttpServletResponse#encodeURL, 
which allows the servlet container to put the jsessionid in the query 
string.  The links on the HTML page now have the jsessionid, so when 
the user navigates using one of them, the URL used will indicate to 
the server the session through the query string.

With SOAP, the server is not typically sending the client the 
available URLs to call.  You would need to do something like send the 
jsessionid as part of the SOAP response, have the client save it, and 
have the client build URLs for subsequent calls to have the 
jsessionid in the query string.

On 7 Jul 2003 at 17:24, Praveen Peddi wrote:

> Thanks Scott.
> When I use setMaintainSession(false), and use URL rewriting, does session
> management still work?
> 
> I didn't quite understand the second. Why do I need to change my server side
> code. We are using weblogic and I thought weblogic takes care of handling
> URL Rewriting.
> Could you explain it clearly of why do I need to change the server side
> code?
> 
> Praveen
> 
> ----- Original Message ----- 
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@ws.apache.org>
> Sent: Monday, July 07, 2003 5:15 PM
> Subject: Re: turn off cookies and enable URLRewriting
> 
> 
> > There is no need to disable cookie handling to use URL rewriting,
> > although if you want to disable cookie handling, just do
> > call.setMaintainSession(false).
> >
> > Of course, to use rewriting, you will need to code something in your
> > code to communicate the rewritten URLs to the client, then have the
> > client use those URLs.
> >
> > On 7 Jul 2003 at 14:59, Praveen Peddi wrote:
> >
> > > Does anyone know how to turn off cookies on the apache soap client so
> that I can use URL Rewriting.
> > > Basically our application is deployed in clustered environment and I am
> trying to test soap services with URL Rewriting enabled. I have my soap
> client in swing that uses Apache SOAP. Right now I am using session
> management by calling call.setMaintainSession(true).
> > >
> > > Praveen
> >
> >
> > Scott Nichol
> >
> > Do not reply directly to this e-mail address,
> > as it is filtered to only receive e-mail from
> > specific mailing lists.
> >
> >
> >
> >
> 
> 


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.



Re: turn off cookies and enable URLRewriting

Posted by Praveen Peddi <pp...@contextmedia.com>.
Thanks Scott.
When I use setMaintainSession(false), and use URL rewriting, does session
management still work?

I didn't quite understand the second. Why do I need to change my server side
code. We are using weblogic and I thought weblogic takes care of handling
URL Rewriting.
Could you explain it clearly of why do I need to change the server side
code?

Praveen

----- Original Message ----- 
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@ws.apache.org>
Sent: Monday, July 07, 2003 5:15 PM
Subject: Re: turn off cookies and enable URLRewriting


> There is no need to disable cookie handling to use URL rewriting,
> although if you want to disable cookie handling, just do
> call.setMaintainSession(false).
>
> Of course, to use rewriting, you will need to code something in your
> code to communicate the rewritten URLs to the client, then have the
> client use those URLs.
>
> On 7 Jul 2003 at 14:59, Praveen Peddi wrote:
>
> > Does anyone know how to turn off cookies on the apache soap client so
that I can use URL Rewriting.
> > Basically our application is deployed in clustered environment and I am
trying to test soap services with URL Rewriting enabled. I have my soap
client in swing that uses Apache SOAP. Right now I am using session
management by calling call.setMaintainSession(true).
> >
> > Praveen
>
>
> Scott Nichol
>
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
>
>
>
>


Re: turn off cookies and enable URLRewriting

Posted by Scott Nichol <sn...@scottnichol.com>.
There is no need to disable cookie handling to use URL rewriting, 
although if you want to disable cookie handling, just do 
call.setMaintainSession(false).

Of course, to use rewriting, you will need to code something in your 
code to communicate the rewritten URLs to the client, then have the 
client use those URLs.

On 7 Jul 2003 at 14:59, Praveen Peddi wrote:

> Does anyone know how to turn off cookies on the apache soap client so that I can use URL Rewriting.
> Basically our application is deployed in clustered environment and I am trying to test soap services with URL Rewriting enabled. I have my soap client in swing that uses Apache SOAP. Right now I am using session management by calling call.setMaintainSession(true).
> 
> Praveen


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.