String multiplierWSDLLoc = multiplier.getServiceWsdlLocation();
NotificationSender notifier = new NotificationSender(
XBayaConstants.DEFAULT_BROKER_URL.toString(), "test-topic");
WorkflowInvoker adderInvoker1 = new GenericInvoker(null, adderWSDLLoc,
"adder", null, null, notifier);
adderInvoker1.setup();
adderInvoker1.setOperation("add");
adderInvoker1.setInput("x", 2);
adderInvoker1.setInput("y", 3);
adderInvoker1.invoke();
Object output1 = adderInvoker1.getOutput("z");
logger.info("output1 = " + output1);
WorkflowInvoker adderInvoker2 = new GenericInvoker(null, adderWSDLLoc,
"adder", null, null, notifier);
adderInvoker2.setup();
adderInvoker2.setOperation("add");
adderInvoker2.setInput("x", 4);
adderInvoker2.setInput("y", 5);
adderInvoker2.invoke();
Object output2 = adderInvoker2.getOutput("z");
logger.info("output2 = " + output2);
WorkflowInvoker multiplierInvoker = new GenericInvoker(null,
multiplierWSDLLoc, "multiplier", null, null, notifier);
multiplierInvoker.setup();
multiplierInvoker.setOperation("multiply");
multiplierInvoker.setInput("x", output1);
multiplierInvoker.setInput("y", output2);
multiplierInvoker.invoke();
Object output3 = multiplierInvoker.getOutput("z");
logger.info("output3 = " + output3);
adder.shutdownServer();
multiplier.shutdownServer();
}