// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
import java.net.URL;

import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;

public class C1 {
    public static void main(String[] args) throws Exception {
        XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
        config.setServerURL(new URL("http://localhost:8001/"));
        XmlRpcClient client = new XmlRpcClient();
        client.setConfig(config);
        Object[] msgs = (Object[])client.execute("S.process", new Object[] { "Hi from Java!" });
        for(Object o : msgs) {
            String msg = (String)o;
            System.out.println(msg);
        }
    }
}
