You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlrpc-dev@ws.apache.org by Mike Boyers <mb...@yahoo.com> on 2008/09/04 21:44:12 UTC

The Handler - XmlRpcServlet Relationship

I'm using a pretty basic server side implementation at the moment.  I have a class that extends XmlRpcServlet.  It implements the newXmlRpcHandlerMapping() method which contains the details about the handler to invoke.  Everything's fine with that, and I've got all of my public xmlrpc methods in my handler, and I'm able to call them with no problem.

What I'd like to be able to do, though, is expose some of the items that are visible in the servlet to the handler.  For example, I've got some logic in one of my handler methods that needs to know the remote IP address.  This is avaiable in the servlet's request object, but that's not currently available to my handler, and I don't know how to make it available.  Can someone steer me in the right direction?

Thanks,
Mike


      

Re: The Handler - XmlRpcServlet Relationship

Posted by Jochen Wiedmann <jo...@gmail.com>.
On Thu, Sep 4, 2008 at 9:44 PM, Mike Boyers <mb...@yahoo.com> wrote:
> I'm using a pretty basic server side implementation at the moment.  I have a class that extends XmlRpcServlet.  It implements the newXmlRpcHandlerMapping() method which contains the details about the handler to invoke.  Everything's fine with that, and I've got all of my public xmlrpc methods in my handler, and I'm able to call them with no problem.
>
> What I'd like to be able to do, though, is expose some of the items that are visible in the servlet to the handler.  For example, I've got some logic in one of my handler methods that needs to know the remote IP address.  This is avaiable in the servlet's request object, but that's not currently available to my handler, and I don't know how to make it available.  Can someone steer me in the right direction?

See

    http://people.apache.org/~jochen/xml-rpc/site/faq.html#client_ip

that's an example, which passes the clients IP address to the handler.

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)