Apache XMLRPC 介绍
Apache XML-RPC 是 一个 Java 语言对 XML-RPC 协议的封装。
示例代码:
import org.apache.xmlrpc.client.XmlRpcclient; import org.apache.xmlrpc.client.XmlRpcclientConfigImpl; XmlRpcclientConfigImpl config = new XmlRpcclientConfigImpl(); config.setServerURL(new URL("http://127.0.0.1:8080/xmlrpc")); XmlRpcclient client = new XmlRpcclient(); client.setConfig(config); Object[] params = new Object[]{new Integer(33), new Integer(9)}; Integer result = (Integer) client.execute("Calculator.add", params);