Package org.apache.xmlrpc.client

Examples of org.apache.xmlrpc.client.XmlRpcClientConfig


    /**
     * Determine the XML namespace that should be used for a particular
     * Code Collaborator server.
     */
    protected static String getNamespace(XmlRpcClient client) {
        XmlRpcClientConfig config = client.getClientConfig();
        if (config instanceof XmlRpcHttpClientConfig) {
            XmlRpcHttpClientConfig hcc = (XmlRpcHttpClientConfig) config;
            URL url = hcc.getServerURL();
            if (url.getFile().equals(URL_SUFFIX_3))
                return NAMESPACE3;
View Full Code Here


        }
    }

    private void testAdder(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        Object o = client.execute("Adder.add", new Object[]{new Integer(3), new Integer(5)});
        assertEquals(new Integer(8), o);
    }
View Full Code Here

        }
    }

    private void testListMethods(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        Object o = client.execute("system.listMethods", new Object[0]);
        Object[] methodList = (Object[]) o;
        Arrays.sort(methodList, Collator.getInstance(Locale.US));
        assertEquals(4, methodList.length);
View Full Code Here

        }
    }

    private void testMethodHelp(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        String help = (String) client.execute("system.methodHelp", new Object[]{"Adder.add"});
        assertEquals("Invokes the method org.apache.xmlrpc.test.AuthenticationTest$AdderImpl.add(int, int).", help);
    }
View Full Code Here

        }
    }

    private void testMethodSignature(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        Object[] signatures = (Object[]) client.execute("system.methodSignature", new Object[]{"Adder.add"});
        assertEquals(signatures.length, 1);
        Object[] signature = (Object[]) signatures[0];
        assertEquals(3, signature.length);
View Full Code Here

        }
    }

    private void testAdder(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        Object o = client.execute("Adder.add", new Object[]{new Integer(3), new Integer(5)});
        assertEquals(new Integer(8), o);
    }
View Full Code Here

        }
    }

    private void testListMethods(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        Object o = client.execute("system.listMethods", new Object[0]);
        Object[] methodList = (Object[]) o;
        Arrays.sort(methodList, Collator.getInstance(Locale.US));
        assertEquals(4, methodList.length);
View Full Code Here

        }
    }

    private void testMethodHelp(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        String help = (String) client.execute("system.methodHelp", new Object[]{"Adder.add"});
        assertEquals("Invokes the method org.apache.xmlrpc.test.AuthenticationTest$AdderImpl.add(int, int).", help);
    }
View Full Code Here

        }
    }

    private void testMethodSignature(ClientProvider pProvider) throws Exception {
        XmlRpcClient client = pProvider.getClient();
        XmlRpcClientConfig config = getConfig(pProvider);
        client.setConfig(config);
        Object[] signatures = (Object[]) client.execute("system.methodSignature", new Object[]{"Adder.add"});
        assertEquals(signatures.length, 1);
        Object[] signature = (Object[]) signatures[0];
        assertEquals(3, signature.length);
View Full Code Here

TOP

Related Classes of org.apache.xmlrpc.client.XmlRpcClientConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.