String serviceURI = args[0];
// Create endpoint reference to service
EndpointReferenceType endpoint = new EndpointReferenceType();
endpoint.setAddress(new Address(serviceURI));
MapPortType map = locator.getMapPortTypePort(endpoint);
// Get PortType
map = locator.getMapPortTypePort(endpoint);
//necessary to set the client timeout, so that it does not occur during the create model phase
HTTPUtils.setTimeout((Stub)map, 1000 * 60 * 120);
//examples from globus client documentation-can be used as indicatios of how many estimations are made-each estimation adds 10 to the resource
// Perform an addition
map.add(10);
// Perform another addition
map.add(5);
// Access value
System.out.println("Current value: "
+ map.getValueRP(new GetValueRP()));
// Perform a subtraction
map.subtract(5);
// Access value
System.out.println("Current value: "
+ map.getValueRP(new GetValueRP()));
Estimate input=new Estimate();
input.setAscid(args[1]);
//change dynamically to whatever input in the following format [input1;input2;...;inputn]
input.setHlinput("[1;1;1;1]");
String result=map.estimate(input);
System.out.println("Current result: "+result);
} catch (Exception e) {
e.printStackTrace();