import java.io.*; import java.net.*; import java.util.*; import org.apache.xmlrpc.*; public class Client { public static void main(String args[]) { try { XmlRpcClient client = new XmlRpcClient("http://" + args[0] + ":" + Integer.parseInt(args[1]) + "/"); Vector params = new Vector(); params.addElement(args[2]); String result = (String)client.execute("prime_handler.getPrime", params); System.out.println("Response from server: " + result); } catch (MalformedURLException e) { System.out.println("Incorrect URL for XML-RPC server format: " + e.getMessage()); } catch (XmlRpcException e) { System.out.println("XML-RPC Exception: " + e.getMessage()); } catch (IOException e) { System.out.println("IO Exception: " + e.getMessage()); } } }