Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Apache XML-RPC server creation problem

  1. #1
    Junior Member
    Join Date
    Jan 2011
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Apache XML-RPC server creation problem

    Hi ! I would like to ask what's going wrong in my code. How can I avoid the error: "The method addHandler(String, MyServer) is undefined for the type WebServer". Finally I need to have a working XML-RPC server, that's the point. The code below was taken from XML-RPC Examples


    import java.net.InetAddress;
     
    import org.apache.xmlrpc.XmlRpcServer;
    import org.apache.xmlrpc.webserver.WebServer;
     
    public class MyServer {
    	public static void main(String[] args) {
     
    		try {
    			System.out.println("Attempting to start XML-RPC Server...");
    			WebServer server = new WebServer(80);
    			server.addHandler("sample", new MyServer());
    			server.start();
    			System.out.println("Started successfully.");
     
    		} catch (Exception e) {
    			System.err.println("JavaServer: " + e);
    		}
     
    	}
     
    }
    Last edited by r0x; October 10th, 2011 at 09:58 AM.


Similar Threads

  1. Problem with apache xml-rpc lib
    By tah_206207 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 22nd, 2011, 02:31 PM
  2. Apache server restsrting problem
    By Gaurav Gupta in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 13th, 2011, 05:50 AM
  3. Need Hellp!! problem with org.apache.struts.actions.DownloadAction.copy
    By nikshri in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 6th, 2010, 01:06 AM
  4. Problem running Apache tomcat 6.0 using i.p. address
    By nakul in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: April 8th, 2010, 07:58 AM
  5. [SOLVED] minesweeper game creation problem
    By kaylors in forum What's Wrong With My Code?
    Replies: 5
    Last Post: June 27th, 2009, 04:06 PM