ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Carroll" <jcarr...@microbrightfield.com>
Subject I would like to add request / session info to the
Date Thu, 07 Feb 2002 16:04:12 GMT

Hi thanks for the work on the helma (apache) xmlrpc library!

I am wondering if it's possible to somehow add request info
(like the session stuff) from the XmlRpcServlet so that it is available 
to the function being called by xmlrpc.

For instance: I added the lines with the ***

public class XmlRpcServlet {
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException  
    {
     *** xmlrpc.setServletRequest(req)
        byte[] result = xmlrpc.execute(req.getInputStream ());
        res.setContentType("text/xml");
        res.setContentLength(result.length);
        OutputStream output = res.getOutputStream();
        output.write(result);
        output.flush();
    }
}

public class Test {

    XmlRpcServer itsServer;

    public String hello()
    {
       *** // somehow get the servlet request information
       *** ses = itsServer.getServletRequestForThisSpecificXMLRPC_Call()
       *** // get a session variable
	 *** Long uid = (Long)session.getAttribute("uid");

        return new String("Hello from Neuroinfo. Rodger, copy.");
    }
}

Thanks!
-Jim Carroll

Mime
View raw message