I'm using Spring to load in the class name of a handler I want to use for my
XML-RPC server, however, I'm getting a "java.lang.IllegalStateException:
Invalid parameter or result type: org.apache.xmlrpc.XmlRpcRequest" error
when I do this.

I'm not sure if I'm doing this how it should be done for version 3, but
maybe someone can take a look at the following code and let me know if I'm
not setting the server up improperly, or my handler class isn't correct:

Server:
----------------
PropertyHandlerMapping phm = new PropertyHandlerMapping();
// "handlerClass" is a String that is populated by Spring to be something
like "my.package.class"
phm.addHandler("xmlRpcHandler", Class.forName(handlerClass, true,
Thread.currentThread().getContextClassLoader()).newInstance().getClass());

xmlRpcWebServer = new WebServer(port);

XmlRpcServerConfigImpl serverConfig = new XmlRpcServerConfigImpl();
serverConfig.setEnabledForExtensions(true);
serverConfig.setContentLengthOptional(false);

xmlRpcServer = xmlRpcWebServer.getXmlRpcServer();
xmlRpcServer.setConfig(serverConfig);
xmlRpcServer.setHandlerMapping(phm);

xmlRpcWebServer.start();
-----------------

Handler (ex: my.package.class)
-----------------
public class XMLRPCHandler{

    public XMLRPCHandler() {    }
    
    public boolean isStudentActive(String test, String test2){
        System.out.println(test + " | " + test2);
        return true;
        
    }
}
---------------

Thanks!
-- 
View this message in context: 
http://www.nabble.com/Dynamically-loading-a-handler-at-runtime-tf2470715.html#a6888926
Sent from the Apache Xml-RPC - User mailing list archive at Nabble.com.


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

Reply via email to