1 25 26 package org.snipsnap.util; 27 28 import org.apache.xmlrpc.XmlRpcClient; 29 import org.apache.xmlrpc.XmlRpc; 30 import org.radeox.util.logging.Logger; 31 32 import java.util.Vector ; 33 34 40 41 public class XmlRpcTest { 42 public static void main(String [] args) { 43 try { 44 Vector params = new Vector (); 45 XmlRpcClient test = new XmlRpcClient("http://localhost:8668/RPC2"); 46 params.clear(); 47 Object result = test.execute("generator.version", params); 51 Logger.debug("result="+result); 52 result = test.execute("snipSnap.dumpXml", params); 53 System.out.println(new String ((byte[]) result, "UTF-8")); 54 } catch (Exception e) { 55 Logger.warn("XmlRpcTest: unable to call XML-RPC", e); 56 } 57 58 } 59 } 60 | Popular Tags |