* @return
* @throws WorkflowException
*/
public synchronized boolean invoke() throws WorkflowException {
try {
WSIFMessage inputMessage = this.invoker.getInputs();
logger.info("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
this.notifier.invokingService(inputMessage);
ExecutorService executor = Executors.newSingleThreadExecutor();
this.result = executor.submit(new Callable<Boolean>() {
@SuppressWarnings("boxing")
public Boolean call() {
try {
boolean success = GenericInvoker.this.invoker.invoke();
if (success) {
// Send notification
WSIFMessage outputMessage = GenericInvoker.this.invoker.getOutputs();
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
// serialize the message XML.
logger.info("outputMessage: " + outputMessage);
GenericInvoker.this.notifier.serviceFinished(outputMessage);
} else {
WSIFMessage faultMessage = GenericInvoker.this.invoker.getFault();
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
// serialize the message XML.
logger.info("received fault: " + faultMessage);
GenericInvoker.this.notifier.receivedFault(faultMessage);