diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-10 15:38:31 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-01-10 15:38:31 +0100 |
commit | a63e922375434b9d8f7effffe14845d240b430f9 (patch) | |
tree | 181742c0648405441a74772c56b0025b7c536604 /rpctest/src/main/java/com/orbekk/ServerTest.java | |
parent | 9a554911174e096b95e99527eac04627400c41ba (diff) |
Remove rpctest project.
Apache xmlrpc doesn't work on Android because of a mismatch in Java core
classes [1]. Remove rpctest project.
In my master's project, jsonrpc4j will be used instead of xmlrpc.
[1] http://code.google.com/p/android/issues/detail?id=9493
Diffstat (limited to 'rpctest/src/main/java/com/orbekk/ServerTest.java')
-rw-r--r-- | rpctest/src/main/java/com/orbekk/ServerTest.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/rpctest/src/main/java/com/orbekk/ServerTest.java b/rpctest/src/main/java/com/orbekk/ServerTest.java deleted file mode 100644 index e8c9a3e..0000000 --- a/rpctest/src/main/java/com/orbekk/ServerTest.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.orbekk; - -import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import org.apache.xmlrpc.XmlRpcException; -import org.apache.xmlrpc.server.PropertyHandlerMapping; -import org.apache.xmlrpc.server.XmlRpcHandlerMapping; -import org.apache.xmlrpc.webserver.ServletWebServer; -import org.apache.xmlrpc.webserver.XmlRpcServlet; - -public class ServerTest { - final static int port = 10080; - - public static class HandlerServlet extends XmlRpcServlet { - private XmlRpcHandlerMapping mapping; - - public HandlerServlet(XmlRpcHandlerMapping mapping) - throws ServletException { - this.mapping = mapping; - } - - @Override - protected XmlRpcHandlerMapping newXmlRpcHandlerMapping() - throws XmlRpcException { - return mapping; - } - } - - public static void main(String[] args) { - System.out.println("Starting " + ServerTest.class.getName()); - try { - PropertyHandlerMapping phm = new PropertyHandlerMapping(); - phm.setVoidMethodEnabled(true); - phm.addHandler(Calculator.class.getName(), CalculatorImpl.class); - - XmlRpcServlet servlet = new HandlerServlet(phm); - ServletWebServer server = new ServletWebServer(servlet, port); - server.start(); - } catch (XmlRpcException e) { - System.err.println("Error creating property mapping."); - e.printStackTrace(); - } catch (ServletException e) { - System.err.println("Unable to initialize servlet."); - e.printStackTrace(); - } catch (IOException e) { - System.err.println("Exception from web server."); - e.printStackTrace(); - } - } -} |