Hi,
I've just downloaded and installed xmlrpc v1.2-b1.  The quick
installation test works fine, i.e.

java org.apache.xmlrpc.WebServer
java org.apache.xmlrpc.XmlRpcClient http://localhost:8080 echo test 123
indeed returns [test, 123].

I'm trying to replicate this simple functionality, so I wrote:

public class TestServer {
  public static void main(String[] args) throws Exception {
    WebServer webServer = new WebServer(8080);
    webServer.addHandler("echo", new Echo());
    webServer.start();
  }
}

public class TestClient {
  public static void main(String[] args) throws Exception {
    XmlRpcClient client = new XmlRpcClient("http://localhost:8080";);
    Vector params = new Vector();
    params.add("test");

    System.out.println(client.execute("echo", params));
  }
}

Both compile fine.  I start TestServer, then run TestClient, and to my
surprise I get:
Exception in thread "main" org.apache.xmlrpc.XmlRpcException:
java.lang.Exception: RPC handler object not found for "echo": No default
handler registered
at org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java:457)
...

Why am I getting this exception?  It seems like the method name, "echo"
matches in the client and the server.  I know there's no default method
-- must there be one?

Thanks, and have a good weekend,

Yoav Shapira
Millennium ChemInformatics





This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.

Reply via email to