* @version $Rev: 655929 $ $Date: 2008-05-13 16:59:41 +0100 (Tue, 13 May 2008) $
*/
public class NestedCalculatorClient {
public static void main(String[] args) throws Exception {
SCADomainContext context = new SCADomainContext(
"org/apache/tuscany/core/spring/OuterCalculator.composite",
"org/apache/tuscany/core/spring/InnerCalculator.composite",
"org/apache/tuscany/core/spring/InnerOperations.composite");
CalculatorService calculatorService = context.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorServiceComponent");
// Calculate
System.out.println("3 + 2=" + calculatorService.add(3, 2));
System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
System.out.println("3 * 2=" + calculatorService.multiply(3, 2));