FileDocCategorySizeDatePackage
XmlRpcClientTestPlugin.javaAPI DocExample1406Sun Jan 12 23:37:36 GMT 2003com.wiverson.macosbook.webservices

XmlRpcClientTestPlugin

public class XmlRpcClientTestPlugin extends Object implements com.wiverson.macosbook.SimpleEditPlugin

Fields Summary
Constructors Summary
public XmlRpcClientTestPlugin()

    
Methods Summary
public java.lang.StringcallRemote()

        try
        {
            org.apache.xmlrpc.XmlRpcClient xmlrpc = new org.apache.xmlrpc.XmlRpcClient("http://localhost:9000/MiniServer");
            java.util.Vector params = new java.util.Vector();
            return (String) xmlrpc.execute("MiniServer.now", params);
        } catch (java.net.MalformedURLException e1)
        {
            e1.printStackTrace();
        } catch (java.io.IOException e2)
        {
            e2.printStackTrace();
        }catch (org.apache.xmlrpc.XmlRpcException e3)
        {
            e3.printStackTrace();
        }
        return "Unable to connect.";
    
public voiddoAction(com.wiverson.macosbook.SimpleEdit frame, java.awt.event.ActionEvent evt)

        frame.appendDocumentText(this.callRemote());
    
public java.lang.StringgetAction()

        return "Test Synchronous XML-RPC";
    
public voidinit(com.wiverson.macosbook.SimpleEdit frame)

    
public static voidmain(java.lang.String[] args)

        System.out.print("Calling synch...");
        System.out.println(new XmlRpcClientTestPlugin().callRemote());