I guess we can say you save me a month!!!!
Realy grateful. :) :)
Pedro Braga.
Indra Syafruddin wrote:
you forget server.start(); // it is not written in the documentation... I spent 1 month to discover this :-(--- Pedro Braga <[EMAIL PROTECTED]> wrote:Hello All, I'm trying to use a built-in HTTP Server to "export" some methods. I just start with an example I found on the Net. It was from the time of "helma.xmlrpc.*" as you can see on the code. I changed to org.apache.xmlrpc.* When I run the program it just starts and ends immediately without error!?!? Can you help me, please? Thanks in advance. ----------------------- <example> ----------------------- import java.util.Hashtable; //import helma.xmlrpc.*; import org.apache.xmlrpc.*; public class JavaServer { public JavaServer () { // Our handler is a regular Java object. It can have a // constructor and member variables in the ordinary fashion. // Public methods will be exposed to XML-RPC clients. } public Hashtable sumAndDifference (int x, int y) { Hashtable result = new Hashtable(); result.put("sum", new Integer(x + y)); result.put("difference", new Integer(x - y)); return result; } public static void main (String [] args) { try { // Invoke me as <http://localhost:8080/RPC2>. WebServer server = new WebServer(8080); server.addHandler("sample", new JavaServer()); } catch (Exception exception) { System.err.println("JavaServer: " + exception.toString()); } } } ----------------------- </example> ----------------------- -- Pedro Braga [EMAIL PROTECTED]__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
-- Pedro Braga [EMAIL PROTECTED]
