I was a bit fast on sending the previous post.

My extending of XmlRpcServlet looks as follows:

public class TestServlet extends XmlRpcServlet
{
    private static final long serialVersionUID = 1L;

    private boolean isAuthenticated(String pUserName, String pPassword)
    {
        return "foo".equals(pUserName) && "bar".equals(pPassword);
    }

    protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() throws
XmlRpcException
    {
        PropertyHandlerMapping phm = (PropertyHandlerMapping)
super.newXmlRpcHandlerMapping();
        phm.addHandler(TestRPC.class.getName(), TestRPCImpl.class);        

        /*
        AbstractReflectiveHandlerMapping.AuthenticationHandler handler = new
AbstractReflectiveHandlerMapping.AuthenticationHandler()
        {
            public boolean isAuthorized(XmlRpcRequest pRequest)
            {
                XmlRpcHttpRequestConfig config = (XmlRpcHttpRequestConfig)
pRequest.getConfig();
                return isAuthenticated(config.getBasicUserName(),
config.getBasicPassword());
            };
        };
        phm.setAuthenticationHandler(handler);
        
        */
        return phm;
    }
}


The main question is basically can the XmlRpcServlet be written so that
works with "any" Web Server that supports Servlets fully and the limited one
that comes with XMLRPC or should I write one that is specific for "real" web
server (even specific for Jetty)? Would be nice share at least share some of
the code base from XmlRpcServlet.

Jimisola
-- 
View this message in context: 
http://www.nabble.com/How-to-setup-and-configure-a-Servlet-solution-programmatically-tf2300489.html#a6393537
Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to