/*
* Using the Tuscany Node API to load a contribution.
* Using the Tuscany Node API to get a local service proxy
*/
public void launchBindingSCACalculator(){
Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../binding-jsonrpc/calculator-contribution/target/sample-binding-jsonrpc-calculator-contribution.jar"));
node.start();
CalculatorService calculator = node.getService(CalculatorService.class, "CalculatorServiceComponent");
// TODO - could use JUnit assertions but don't want to have to handle JUnit dependency from Ant script
double result = calculator.add(3, 2);
System.out.println("3 + 2 = " + result);
if (result != 5.0){
throw new SampleLauncherException();
}
node.stop();
}