// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package test.server;

import org.apache.xmlrpc.server.PropertyHandlerMapping;
import org.apache.xmlrpc.server.XmlRpcServer;
import org.apache.xmlrpc.webserver.WebServer;

public class TestServer {
	public static void main(String[] args) throws Exception {
		WebServer srv = new WebServer(8001);
		XmlRpcServer xmlrpc = srv.getXmlRpcServer();
		srv.start();
        PropertyHandlerMapping phm = new PropertyHandlerMapping();
        phm.addHandler("Test", Test.class);
        xmlrpc.setHandlerMapping(phm);
		System.out.print("Press enter to exit");
		System.in.read();
		srv.shutdown();
	}
}
