package client; import DefaultNamespace.service.CalculatorImplServiceGridLocator; import DefaultNamespace.CalculatorImplPortType; import java.net.URL; public class CalcAdder { public static void main(String[] args) { try { // Get command-line arguments URL GSH = new java.net.URL(args[0]); int a = Integer.parseInt(args[1]); int b = Integer.parseInt(args[2]); // Get a reference to the Grid Service instance CalculatorImplServiceGridLocator calcServiceLocator = new CalculatorImplServiceGridLocator(); CalculatorImplPortType calc = calcServiceLocator.getCalculatorImplPort(GSH); // Call remote method 'add' int c = calc.add(a,b); System.out.println("Sum:" + c); }catch(Exception e) { System.out.println("ERROR!"); e.printStackTrace(); } } }