axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chandra Talluri" <>
Subject How to maintain the session using HttpClient in AXIS, with Tomcat Server
Date Thu, 26 Jun 2003 20:56:20 GMT


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, Inc.
650 Suffolk Street
Suite 307
Lowell, MA 01854
Tel: 978-848-2841

View raw message