Hello all,
I am new to this library. I am using version 3.1.2
Some methods in my class implementing RPC are of return type VOID. I am
not able to call these methods from my test client. Other methods where
return type is not void are working fine. The error that I see both on
the server side as well as client side is "No such handler". I have
tried explicitly using the method "setVoidMethodEnabled(true)" on
PropertyHandlerMapping on my XmlRpcServer instance. Is this not the
right way to enable mapping for void return type methods?
The error that I get on the server is
SEVERE: No such handler: pool.join
[java] org.apache.xmlrpc.server.XmlRpcNoSuchHandlerException: No
such handler: pool.join
[java] at
org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getHandler(Abs
tractReflectiveHandlerMapping.java:214)
[java] at
org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.j
ava:45)
[java] at
org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
[java] at
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.j
ava:200)
[java] at
org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
[java] at
org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
And the code that I am using to implement my server is as follows:
WebServer webServer = new WebServer(port);
XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();
PropertyHandlerMapping phm = new PropertyHandlerMapping();
phm.load(Thread.currentThread().getContextClassLoader(),
"XmlRpcServlet.properties");
phm.setVoidMethodEnabled(true);
xmlRpcServer.setHandlerMapping(phm);
XmlRpcServerConfigImpl serverConfig =
(XmlRpcServerConfigImpl) xmlRpcServer.getConfig();
serverConfig.setEnabledForExtensions(true);
serverConfig.setContentLengthOptional(false);
webServer.start();