public static Invoker createInvoker(QName portTypeQName, WsdlDefinitions definitions, String gfacURL, String messageBoxURL, WorkflowContextHeaderBuilder builder, boolean differ) throws WorkflowException { Invoker invoker = null; if (definitions != null && definitions.getServices().iterator().hasNext()) { // check if this web service supports asynchronous invocation if (WSDLUtil.isAsynchronousSupported(WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(definitions))) { invoker = new AsynchronousInvoker(definitions, messageBoxURL); } else { invoker = new SimpleInvoker(definitions); } } else if (gfacURL != null && gfacURL.length() != 0) { invoker = new GFacInvoker(portTypeQName, gfacURL, messageBoxURL, builder); } if (invoker == null) { String message = "Cannot find an appropriate way to invoke the service"; throw new WorkflowException(message); } return invoker; } }
/** * @param portTypeQName * @param definitions * @param gfacURL * @param messageBoxURL * @return The invoker * @throws WorkflowException */ public static Invoker createInvoker(QName portTypeQName, WsdlDefinitions definitions, String gfacURL, String messageBoxURL, LeadContextHeader leadContext) throws WorkflowException { Invoker invoker = null; if (definitions != null && definitions.getServices().iterator().hasNext()) { // check if this web service supports asynchronous invocation if (WSDLUtil.isAsynchronousSupported(WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(definitions))) { invoker = new AsynchronousInvoker(definitions, messageBoxURL); } else { invoker = new SimpleInvoker(definitions); } } else if (gfacURL != null && gfacURL.length() != 0) { invoker = new GFacInvoker(portTypeQName, gfacURL, messageBoxURL, leadContext); } if (invoker == null) { String message = "Cannot find an appropriate way to invoke the service"; throw new WorkflowException(message); } return invoker; }