A Java Server
import org.apache.xmlrpc.*;
public class JavaServer {
public Integer sum(int x, int y) {
public static void main (String [] args) {
WebServer server = new WebServer(80);
server.addHandler("sample", new JavaServer());
} catch (Exception exception) {
System.err.println("JavaServer: " + exception);
The procedure that is called remotely is implemented as a public method in a class.
An instance of this class is then associated with a handler that is accessible by the client.