import java.io.IOException; import org.apache.xmlrpc.*; public class HelloServer { public static void main(String[] args) { if (args.length < 1) { System.exit(-1); } try { XmlRpc.setDriver("org.apache.xerces.parsers.SAXParser"); System.out.println("Starting XML-RPC Server..."); WebServer server = new WebServer(Integer.parseInt(args[0])); server.addHandler("hello", new HelloHandler()); System.out.println("Registered HelloHandler class to \"hello\""); System.out.println("Now accepting requests..."); } catch (ClassNotFoundException e) { System.out.println("Could not locate SAX Driver"); } catch (IOException e) { System.out.println("Could not start server: " + e.getMessage()); } } }