You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by James Carroll <jc...@microbrightfield.com> on 2002/02/07 17:04:12 UTC
I would like to add request / session info to the
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