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 Ondrej Martinsky <on...@gmail.com> on 2007/09/09 01:11:06 UTC

Apache XML-RPC Server - No such handler exception

Hello,

 

I’m new in problematic of apache XML-RPC, and currently I am trying  to
implement an xml-rpc server in Java SE. Let’s say we have an interface
“myproject.MyRemoteProcedure” and class
“myproject.MyRemoteProcedureImplementation”, which implements it:

 

Package myproject;

public interface MyRemoteProcedure {

    public String echo(String name);

}

 

I’m using my own webserver class to handle with the procedure above :

 

WebServer webServer = new WebServer(port);

XmlRpcServer xmlRpcServer = webServer.getXmlRpcServer();

 

I create a PropertyHandlerMapping for xmlRpcServer directly by providing the
MyRemoteProcedure class:

 

PropertyHandlerMapping phm = new PropertyHandlerMapping();

phm.addHandler(“MyRemoteProcedure”, myproject.MyRemoteProcedure.class);

try { 

    phm.getHandler(“MyRemoteProcedure”);   ß problem ?

} catch (Exception e) {

    e.printStackTrace();   

} 

 

The problem is that when I try to get a handler back from the handler
mapping, I get a “XmlRpcNoSuchHandlerException: No such handler” exception.
I received this exception also in the client application when I was trying
to call remote procedure by the ClientFactory. I don’t understand why system
doesn’t recognize the handler “MyRemoteProcedure” provided by addHandler
method in previous line.

 


Re: Apache XML-RPC Server - No such handler exception

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 9/9/07, Ondrej Martinsky <on...@gmail.com> wrote:

> doesn't recognize the handler "MyRemoteProcedure" provided by addHandler

I believe the problem is that you need to add the method name. For
example, don't use "MyRemoteProcedure", but
"MyRemoteProcedure.someMethod".

Jochen

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

    -- (Terry Pratchett, Thief of Time)

---------------------------------------------------------------------
To unsubscribe, e-mail: xmlrpc-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: xmlrpc-dev-help@ws.apache.org