The example you are mentioning applies to Apache XML-RPC version 2. You are most likely using the jar files from version 3.
Jochen On Tue, Aug 31, 2010 at 1:18 AM, <[email protected]> wrote: > Hello, > > > > I am testing the simple example from > > > > http://www.tutorialspoint.com/xml-rpc/xml_rpc_examples.htm > > > > using Eclipse. But, I could not get the server code compiled as it can not > find > > WebServer.addHandler() method. See the code below. > > > > Am I missing something here? any suggestion is very appreciated. > > > > Regards > > > > Xiaofeng > > > > > > import org.apache.xmlrpc.*; > > import org.apache.xmlrpc.webserver.WebServer; > > > > > > public class JavaServer > > { > > public Integer sum(int x, int y) > > { > > return new Integer(x+y); > > } > > public static void main (String [] args) > > { > > try > > { > > System.out.println("Attempting to start XML-RPC > Server..."); > > WebServer server = new WebServer(8080); > > server.addHandler("sample", new JavaServer()); > > server.start(); > > System.out.println("Started successfully."); > > System.out.println("Accepting requests. (Halt program to > stop.)"); > > } > > catch (Exception exception) > > { > > System.err.println("JavaServer: " + exception); > > } > > } > > } > > > > -- > Scanned by iCritical. > -- I Am What I Am And That's All What I Yam (Popeye)
