After enabling session scope, you will need the client side code to use the session from the returned cookie.
On the client side, add a call to setMaintainSession(true) when using the
WSDL2Java client stubs :
YourCodeServiceLocator servLoc = new YourCodeServiceLocator() ;
YourCode blah = servLoc.getYourCode();
((YourCodeSoapBindingStub) blah).setMaintainSession(true); // add
this to use the sessions cookie
If you are using .Net, set your client stub object's CookieContainer to a
new System.Net.CookieContainer() :
(c#) :
blah = new your.code.YourCodeService() ;
blah.CookieContainer = new System.Net.CookieContainer() ; // add this
to use the session cookie
--Barry
-----Original Message-----
From: Andrew Vardeman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 02, 2002 11:16 AM
To: [EMAIL PROTECTED]
Subject: Re: confused about cookies
Alexander,
If you want to use cookies for session management, you don't have to add a
handler. You just need to specify session scope in your deploy.wsdd and
tell the client to maintain session info. Check out this message:
http://marc.theaimsgroup.com/?l=axis-user&m=101775995930045&w=2
which provides a real working sample.
Andrew
At 08:07 AM 7/2/2002 -0700, you wrote:
>I looked in the mailing list archives for information on how to add
cookie
>handling to a web service. (HTTP Cookies for sessions. also i'll need
>access to the session ID in the program.)
>
>I was swamped with a big collection of approaches, all of them "well I
>haven't done it but this should work" variety.
>
>What is the common way to do cookie session handling? Does there already
>exist a handler for this? if so, how can I add taht to my program, and
>get access to the session ID from my pivot method?
>
>Thanks!!
>Alexander
smime.p7s
Description: application/pkcs7-signature
