Hi dims I did modifications to CommonsHTTPSender.java for maintaining sessions.
Cookies needed to be set on HttpState not on MessageContext, since HttpMethodBase overwrites the cookies from HttpState. Also we need to setCookiePolicy on HttpState to CookiePolicy.COMPATIBILITY, else it is defaulting to RFC2109Spec which adds Version information to it and tomcat server not recognizing it Now it maintains the sessions I am enclosing the file. Have a look at it and see can it be added to AXIS base code, Since you are the author you are the best person to review this code :) -Thanks Chandra ----- Original Message ----- From: "Davanum Srinivas" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, June 26, 2003 7:53 PM Subject: Re: How to maintain the session using HttpClient in AXIS, with Tomcat Server > Take a look at the axis code org\apache\axis\transport\http\CommonsHTTPSender.java. Tweak it if > needed and send in a patch > (http://nagoya.apache.org/wiki/apachewiki.cgi?AxisProjectPages/SubmitPatches ) > > Thanks, > -- dims > > --- Chandra Talluri <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Using CommonsHTTPSender& HttpClint I can open a connection and do multiple > > requests/responses without closing. But Now I can not able to maintain the > > session. In every call I get a new session > > > > Actually for every call on server side I get a new ServletEndpointContext :( > > > > In the client I am calling stub.setMaintainSession(true); > > > > Server code snippet is > > > > public class Processor implements ServiceLifecycle > > { > > public void doIt(String pid,String name) > > { > > System.out.println("Context :" + this.context.toString());// Every > > time I get new one > > javax.servlet.http.HttpSession session = context.getHttpSession(); > > System.out.println(session.getId());// Obviously this is different > > > > } > > > > public void destroy() //never called > > { > > System.out.println("Called Destroy"); > > this.context = null; > > } > > > > public void init(Object ctx) throws javax.xml.rpc.ServiceException > > { > > if(this.context == null); > > { > > System.out.println("Called Init"); //For every call it comes here > > this.context = (ServletEndpointContext) ctx; > > } > > } > > private ServletEndpointContext context = null; > > > > } > > > > This is problem is not there If I use HTTPSender. But that won't keep > > connections open :( > > > > Thanks in advance > > -Chandra Talluri > > NetNumber.com, Inc. > > 650 Suffolk Street > > Suite 307 > > Lowell, MA 01854 > > Tel: 978-848-2841 > > [EMAIL PROTECTED] > > http://www.netnumber.com > > > > > ===== > Davanum Srinivas - http://webservices.apache.org/~dims/ > > __________________________________ > Do you Yahoo!? > SBC Yahoo! DSL - Now only $29.95 per month! > http://sbc.yahoo.com > > >
CommonsHTTPSender.java
Description: Binary data
