http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/GFacRegistryClient.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/GFacRegistryClient.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/GFacRegistryClient.java index ab8ac4f..fd8308e 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/GFacRegistryClient.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/GFacRegistryClient.java @@ -28,9 +28,9 @@ import java.util.Iterator; import org.apache.airavata.workflow.model.component.ComponentRegistryException; import org.xmlpull.v1.builder.Iterable; import org.xmlpull.v1.builder.XmlElement; - -import xsul.wsif.WSIFMessage; -import xsul.wsif.impl.WSIFMessageElement; +// +//import xsul.wsif.WSIFMessage; +//import xsul.wsif.impl.WSIFMessageElement; public class GFacRegistryClient { @@ -76,94 +76,94 @@ public class GFacRegistryClient { this.client = new SimpleWSClient(); } - /** - * @param appDescAsStr - * @throws ComponentRegistryException - */ - public void registerAppDesc(String appDescAsStr) throws ComponentRegistryException { - this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { DESC_AS_STRING, appDescAsStr } }, - "registerAppDesc"); - } - - /** - * @param wsdlAsStr - * @param lifetimeAsSeconds - * @throws ComponentRegistryException - */ - public void registerConcreteWsdl(String wsdlAsStr, int lifetimeAsSeconds) throws ComponentRegistryException { - this.client.sendSOAPMessage(this.wsdlURL, - new String[][] { { DESC_AS_STRING, wsdlAsStr }, { LIFE_TIME, String.valueOf(lifetimeAsSeconds) } }, - "registerConcreteWsdl"); - - } - - /** - * @param wsdlQName - * @return The concrete WSDL - * @throws ComponentRegistryException - */ - public String getConcreteWsdl(String wsdlQName) throws ComponentRegistryException { - WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } }, - "getConcreateWsdl"); - return (String) response.getObjectPart(DESC_AS_STRING); - } - - /** - * @param wsdlQName - * @throws ComponentRegistryException - */ - public void removeConcreteWsdl(String wsdlQName) throws ComponentRegistryException { - this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } }, "removeConcreteWsdl"); - - } - - /** - * @param serviceName - * @return The list of concreate WSDL QNames. - * @throws ComponentRegistryException - */ - public String[] findService(String serviceName) throws ComponentRegistryException { - WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, serviceName } }, - SEARCH_SERVICE_INSTANCE); - return findArrayValue(RESULTS, (WSIFMessageElement) response).toArray(new String[] {}); - } - - /** - * @param serviceName - * @return The list of abstract WSDL QNames. - * @throws ComponentRegistryException - */ - public String[] findServiceDesc(String serviceName) throws ComponentRegistryException { - WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, serviceName } }, - SEARCH_SERVIE); - return findArrayValue(RESULTS, (WSIFMessageElement) response).toArray(new String[] {}); - } - - /** - * @param wsdlQName - * @return The AWSDL. - * @throws ComponentRegistryException - */ - public String getAbstractWsdl(String wsdlQName) throws ComponentRegistryException { - WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } }, - GET_ABSTRACT_WSDL); - return (String) response.getObjectPart(DESC_AS_STRING); - } - - private static ArrayList<String> findArrayValue(String name, WSIFMessageElement response) { - XmlElement param = response.element(null, name); - if (param != null) { - Iterable it = param.elements(null, "value"); - if (it != null) { - ArrayList<String> values = new ArrayList<String>(); - - Iterator arrayValues = it.iterator(); - while (arrayValues.hasNext()) { - values.add(((XmlElement) arrayValues.next()).requiredTextContent()); - } - return values; - } - } - return null; - } +// /** +// * @param appDescAsStr +// * @throws ComponentRegistryException +// */ +// public void registerAppDesc(String appDescAsStr) throws ComponentRegistryException { +// this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { DESC_AS_STRING, appDescAsStr } }, +// "registerAppDesc"); +// } +// +// /** +// * @param wsdlAsStr +// * @param lifetimeAsSeconds +// * @throws ComponentRegistryException +// */ +// public void registerConcreteWsdl(String wsdlAsStr, int lifetimeAsSeconds) throws ComponentRegistryException { +// this.client.sendSOAPMessage(this.wsdlURL, +// new String[][] { { DESC_AS_STRING, wsdlAsStr }, { LIFE_TIME, String.valueOf(lifetimeAsSeconds) } }, +// "registerConcreteWsdl"); +// +// } +// +// /** +// * @param wsdlQName +// * @return The concrete WSDL +// * @throws ComponentRegistryException +// */ +// public String getConcreteWsdl(String wsdlQName) throws ComponentRegistryException { +// WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } }, +// "getConcreateWsdl"); +// return (String) response.getObjectPart(DESC_AS_STRING); +// } +// +// /** +// * @param wsdlQName +// * @throws ComponentRegistryException +// */ +// public void removeConcreteWsdl(String wsdlQName) throws ComponentRegistryException { +// this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } }, "removeConcreteWsdl"); +// +// } +// +// /** +// * @param serviceName +// * @return The list of concreate WSDL QNames. +// * @throws ComponentRegistryException +// */ +// public String[] findService(String serviceName) throws ComponentRegistryException { +// WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, serviceName } }, +// SEARCH_SERVICE_INSTANCE); +// return findArrayValue(RESULTS, (WSIFMessageElement) response).toArray(new String[] {}); +// } +// +// /** +// * @param serviceName +// * @return The list of abstract WSDL QNames. +// * @throws ComponentRegistryException +// */ +// public String[] findServiceDesc(String serviceName) throws ComponentRegistryException { +// WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, serviceName } }, +// SEARCH_SERVIE); +// return findArrayValue(RESULTS, (WSIFMessageElement) response).toArray(new String[] {}); +// } +// +// /** +// * @param wsdlQName +// * @return The AWSDL. +// * @throws ComponentRegistryException +// */ +// public String getAbstractWsdl(String wsdlQName) throws ComponentRegistryException { +// WSIFMessage response = this.client.sendSOAPMessage(this.wsdlURL, new String[][] { { QNAME, wsdlQName } }, +// GET_ABSTRACT_WSDL); +// return (String) response.getObjectPart(DESC_AS_STRING); +// } +// +// private static ArrayList<String> findArrayValue(String name, WSIFMessageElement response) { +// XmlElement param = response.element(null, name); +// if (param != null) { +// Iterable it = param.elements(null, "value"); +// if (it != null) { +// ArrayList<String> values = new ArrayList<String>(); +// +// Iterator arrayValues = it.iterator(); +// while (arrayValues.hasNext()) { +// values.add(((XmlElement) arrayValues.next()).requiredTextContent()); +// } +// return values; +// } +// } +// return null; +// } }
http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/SimpleWSClient.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/SimpleWSClient.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/SimpleWSClient.java index fd5c049..242c2b2 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/SimpleWSClient.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/gfac/SimpleWSClient.java @@ -31,13 +31,13 @@ import org.slf4j.LoggerFactory; import org.xmlpull.v1.builder.XmlElement; import org.xmlpull.v1.builder.XmlInfosetBuilder; -import xsul.XmlConstants; -import xsul.wsif.WSIFMessage; -import xsul.wsif.WSIFOperation; -import xsul.wsif.WSIFPort; -import xsul.wsif.impl.WSIFMessageElement; -import xsul.xwsif_runtime.WSIFClient; -import xsul.xwsif_runtime.WSIFRuntime; +//import xsul.XmlConstants; +//import xsul.wsif.WSIFMessage; +//import xsul.wsif.WSIFOperation; +//import xsul.wsif.WSIFPort; +//import xsul.wsif.impl.WSIFMessageElement; +//import xsul.xwsif_runtime.WSIFClient; +//import xsul.xwsif_runtime.WSIFRuntime; /** * This is a Simple Web Service client for easy SOAP Messages creation @@ -47,88 +47,88 @@ public class SimpleWSClient { private static final Logger logger = LoggerFactory.getLogger(SimpleWSClient.class); - private static final XmlInfosetBuilder builder = XmlConstants.BUILDER; +// private static final XmlInfosetBuilder builder = XmlConstants.BUILDER; private String requestNS = GFacRegistryClient.GFAC_NAMESPACE; - /** - * @param url - * @param args - * @param opName - * @return The output - * @throws ComponentRegistryException - */ - public WSIFMessage sendSOAPMessage(String url, Object[][] args, String opName) throws ComponentRegistryException { - WSIFClient wclient = WSIFRuntime.newClient(url); - return sendSOAPMessage(wclient, args, opName); - } - - /** - * @param wclient - * @param args - * @param opName - * @return The output - * @throws ComponentRegistryException - */ - public WSIFMessage sendSOAPMessage(WSIFClient wclient, Object[][] args, String opName) - throws ComponentRegistryException { - - WSIFPort port = wclient.getPort(); - - WSIFOperation operation = port.createOperation(opName); - WSIFMessage outputMessage = operation.createOutputMessage(); - WSIFMessage faultMessage = operation.createFaultMessage(); - String messageName = operation.createInputMessage().getName(); - XmlElement inputMsgElem = builder.newFragment(this.requestNS, messageName); - - for (int i = 0; i < args.length; i++) { - createMessage((String) args[i][0], args[i][1], inputMsgElem); - } - - WSIFMessageElement inputMessage = new WSIFMessageElement(inputMsgElem); - - boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage); - if (success) { - logger.debug("" + outputMessage); - return outputMessage; - } else { - throw new ComponentRegistryException("Excpetion at server " + faultMessage); - } - } +// /** +// * @param url +// * @param args +// * @param opName +// * @return The output +// * @throws ComponentRegistryException +// */ +// public WSIFMessage sendSOAPMessage(String url, Object[][] args, String opName) throws ComponentRegistryException { +// WSIFClient wclient = WSIFRuntime.newClient(url); +// return sendSOAPMessage(wclient, args, opName); +// } +// +// /** +// * @param wclient +// * @param args +// * @param opName +// * @return The output +// * @throws ComponentRegistryException +// */ +// public WSIFMessage sendSOAPMessage(WSIFClient wclient, Object[][] args, String opName) +// throws ComponentRegistryException { +// +// WSIFPort port = wclient.getPort(); +// +// WSIFOperation operation = port.createOperation(opName); +// WSIFMessage outputMessage = operation.createOutputMessage(); +// WSIFMessage faultMessage = operation.createFaultMessage(); +// String messageName = operation.createInputMessage().getName(); +// XmlElement inputMsgElem = builder.newFragment(this.requestNS, messageName); +// +// for (int i = 0; i < args.length; i++) { +// createMessage((String) args[i][0], args[i][1], inputMsgElem); +// } +// +// WSIFMessageElement inputMessage = new WSIFMessageElement(inputMsgElem); +// +// boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage); +// if (success) { +// logger.debug("" + outputMessage); +// return outputMessage; +// } else { +// throw new ComponentRegistryException("Excpetion at server " + faultMessage); +// } +// } private void createMessage(String paramName, Object value, XmlElement inputMsgElem) throws ComponentRegistryException { - XmlElement paramsElem = builder.newFragment(this.requestNS, paramName); - if (value instanceof String) { - paramsElem.addChild(value); - } else if (value instanceof Collection) { - Collection list = (Collection) value; - Iterator arrayValues = list.iterator(); - while (arrayValues.hasNext()) { - XmlElement item = builder.newFragment("value"); - item.addChild(arrayValues.next()); - paramsElem.addChild(item); - } - } else if (value instanceof ArrayList) { - Collection list = (Collection) value; - Iterator arrayValues = list.iterator(); - while (arrayValues.hasNext()) { - XmlElement item = builder.newFragment("value"); - item.addChild(arrayValues.next()); - paramsElem.addChild(item); - } - } else if (value instanceof String[]) { - String[] list = (String[]) value; - for (int i = 0; i < list.length; i++) { - XmlElement item = builder.newFragment("value"); - item.addChild(list[i]); - paramsElem.addChild(item); - } - } else { - throw new ComponentRegistryException("Simple WS Client can not handle the value of type " + value); - } - - inputMsgElem.addElement(paramsElem); +// XmlElement paramsElem = builder.newFragment(this.requestNS, paramName); +// if (value instanceof String) { +// paramsElem.addChild(value); +// } else if (value instanceof Collection) { +// Collection list = (Collection) value; +// Iterator arrayValues = list.iterator(); +// while (arrayValues.hasNext()) { +// XmlElement item = builder.newFragment("value"); +// item.addChild(arrayValues.next()); +// paramsElem.addChild(item); +// } +// } else if (value instanceof ArrayList) { +// Collection list = (Collection) value; +// Iterator arrayValues = list.iterator(); +// while (arrayValues.hasNext()) { +// XmlElement item = builder.newFragment("value"); +// item.addChild(arrayValues.next()); +// paramsElem.addChild(item); +// } +// } else if (value instanceof String[]) { +// String[] list = (String[]) value; +// for (int i = 0; i < list.length; i++) { +// XmlElement item = builder.newFragment("value"); +// item.addChild(list[i]); +// paramsElem.addChild(item); +// } +// } else { +// throw new ComponentRegistryException("Simple WS Client can not handle the value of type " + value); +// } +// +// inputMsgElem.addElement(paramsElem); } } http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/SystemComponentInvoker.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/SystemComponentInvoker.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/SystemComponentInvoker.java index 4b9ef7e..14a4205 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/SystemComponentInvoker.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/SystemComponentInvoker.java @@ -29,8 +29,8 @@ import org.apache.airavata.workflow.model.exceptions.WorkflowException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import xsul.wsif.WSIFMessage; -import xsul.xwsif_runtime.WSIFClient; +//import xsul.wsif.WSIFMessage; +//import xsul.xwsif_runtime.WSIFClient; public class SystemComponentInvoker implements Invoker { @@ -66,52 +66,52 @@ public class SystemComponentInvoker implements Invoker { /** * @see org.apache.airavata.workflow.engine.invoker.Invoker#getOutputs() */ - @Override - public WSIFMessage getOutputs() { - return null; - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#invoke() - */ +// @Override +// public WSIFMessage getOutputs() { +// return null; +// } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#invoke() +// */ @Override public boolean invoke() { return true; } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#setInput(java.lang.String, java.lang.Object) - */ - @Override - public void setInput(String name, Object value) { - } - - /** - * @see org.apache.airavata.xbaya.wXPath Operatorsorkflow.Invoker#setOperation(java.lang.String) - */ - @Override - public void setOperation(String operationName) { - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#setup() - */ +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#setInput(java.lang.String, java.lang.Object) +// */ +// @Override +// public void setInput(String name, Object value) { +// } +// +// /** +// * @see org.apache.airavata.xbaya.wXPath Operatorsorkflow.Invoker#setOperation(java.lang.String) +// */ +// @Override +// public void setOperation(String operationName) { +// } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#setup() +// */ @Override public void setup() { } - - @Override - public WSIFClient getClient() { - return null; - } - - @Override - public WSIFMessage getInputs() throws WorkflowException { - return null; - } - - @Override - public WSIFMessage getFault() throws WorkflowException { - return null; - } +// +// @Override +// public WSIFClient getClient() { +// return null; +// } +// +// @Override +// public WSIFMessage getInputs() throws WorkflowException { +// return null; +// } +// +// @Override +// public WSIFMessage getFault() throws WorkflowException { +// return null; +// } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java index 59fe8d0..5c604d5 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/interpretor/WorkflowInterpreter.java @@ -820,18 +820,18 @@ public class WorkflowInterpreter implements AbstractActivityListener{ } } - if (!(node2 instanceof OutputNode)) { - listOfValues.removeAll(listOfValues); - String output = (String) systemInvoker.getOutput(node1.getOutputPort(0).getName()); - XmlElement xmlElement = XMLUtil.stringToXmlElement("<result>" + output + "</result>"); - Iterator iterator1 = xmlElement.children().iterator(); - while (iterator1.hasNext()) { - Object next1 = iterator1.next(); - if (next1 instanceof XmlElement) { - listOfValues.add((String) ((XmlElement) next1).children().iterator().next()); - } - } - } +// if (!(node2 instanceof OutputNode)) { +// listOfValues.removeAll(listOfValues); +// String output = (String) systemInvoker.getOutput(node1.getOutputPort(0).getName()); +// XmlElement xmlElement = XMLUtil.stringToXmlElement("<result>" + output + "</result>"); +// Iterator iterator1 = xmlElement.children().iterator(); +// while (iterator1.hasNext()) { +// Object next1 = iterator1.next(); +// if (next1 instanceof XmlElement) { +// listOfValues.add((String) ((XmlElement) next1).children().iterator().next()); +// } +// } +// } } } } http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/AsynchronousInvoker.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/AsynchronousInvoker.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/AsynchronousInvoker.java index 5a9e527..2d66041 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/AsynchronousInvoker.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/AsynchronousInvoker.java @@ -26,11 +26,11 @@ import org.apache.airavata.workflow.model.exceptions.WorkflowException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import xsul.wsdl.WsdlDefinitions; -import xsul.wsif.WSIFMessage; -import xsul.wsif.WSIFOperation; -import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator; -import xsul.xwsif_runtime_async_http.XsulSoapHttpWsaResponsesCorrelator; +//import xsul.wsdl.WsdlDefinitions; +//import xsul.wsif.WSIFMessage; +//import xsul.wsif.WSIFOperation; +//import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator; +//import xsul.xwsif_runtime_async_http.XsulSoapHttpWsaResponsesCorrelator; public class AsynchronousInvoker extends SimpleInvoker { @@ -43,9 +43,9 @@ public class AsynchronousInvoker extends SimpleInvoker { * * @param definitions */ - public AsynchronousInvoker(WsdlDefinitions definitions) { - this(definitions, null); - } +// public AsynchronousInvoker(WsdlDefinitions definitions) { +// this(definitions, null); +// } /** * Constructs an AsynchronousInvoker. @@ -53,10 +53,10 @@ public class AsynchronousInvoker extends SimpleInvoker { * @param definitions * @param messageBoxURL */ - public AsynchronousInvoker(WsdlDefinitions definitions, String messageBoxURL) { - super(definitions); - this.messageBoxURL = messageBoxURL; - } +// public AsynchronousInvoker(WsdlDefinitions definitions, String messageBoxURL) { +// super(definitions); +// this.messageBoxURL = messageBoxURL; +// } /** * @see org.apache.airavata.workflow.engine.invoker.SimpleInvoker#setup() @@ -65,13 +65,13 @@ public class AsynchronousInvoker extends SimpleInvoker { public void setup() throws WorkflowException { super.setup(); /* Set the output message to null to set teh output from async Listener */ - WSIFAsyncResponsesCorrelator correlator; - if (this.messageBoxURL == null || this.messageBoxURL.length() == 0) { - correlator = new XsulSoapHttpWsaResponsesCorrelator(); - String serverLoc = ((XsulSoapHttpWsaResponsesCorrelator) correlator).getServerLocation(); - logger.debug("using async correlator at " + serverLoc); - this.client.useAsyncMessaging(correlator); - } +// WSIFAsyncResponsesCorrelator correlator; +// if (this.messageBoxURL == null || this.messageBoxURL.length() == 0) { +// correlator = new XsulSoapHttpWsaResponsesCorrelator(); +// String serverLoc = ((XsulSoapHttpWsaResponsesCorrelator) correlator).getServerLocation(); +// logger.debug("using async correlator at " + serverLoc); +// this.client.useAsyncMessaging(correlator); +// } // else { // correlator = new MsgBoxWsaResponsesCorrelator(this.messageBoxURL,this); // logger.debug("using message box at " + this.messageBoxURL); @@ -79,37 +79,37 @@ public class AsynchronousInvoker extends SimpleInvoker { } public boolean invoke() throws WorkflowException { - final WSIFOperation operation = this.getOperation(); - final WSIFMessage inputMessage = this.getInputMessage(); - this.setOutputMessage(null); +//// final WSIFOperation operation = this.getOperation(); +//// final WSIFMessage inputMessage = this.getInputMessage(); +//// this.setOutputMessage(null); try { - new Thread() { - @Override - public void run() { - try { - operation.executeInputOnlyOperation(inputMessage); - } catch (Exception e) { - // Ignore the error. - logger.error("Error invoking GFac Service",e); - } - } - }.start(); - - while(this.getOutputMessage() == null){ - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - logger.error("Error Waiting for the response from backend"); - } - } - // Gfac operation failed, so xbaya side throws this exception - if("ErrorResponse".equals(XMLUtil.stringToXmlElement3(this.getOutputMessage().toString()).getName())){ - // Here we do not throw an exception, because if we throw an exception Interpreter will catch it and do the unsubscription, - // which is not needed because if there's an gfac side error gfac will send a failure and unsubscription will be done in monitoring - // so if we send an exception we are attempting to do two unsubscriptions which will cause a one unsubscription to fail. - return false; - } - +// new Thread() { +// @Override +// public void run() { +// try { +// operation.executeInputOnlyOperation(inputMessage); +// } catch (Exception e) { +// // Ignore the error. +// logger.error("Error invoking GFac Service",e); +// } +// } +// }.start(); +// +// while(this.getOutputMessage() == null){ +// try { +// Thread.sleep(1000); +// } catch (InterruptedException e) { +// logger.error("Error Waiting for the response from backend"); +// } +// } +// // Gfac operation failed, so xbaya side throws this exception +// if("ErrorResponse".equals(XMLUtil.stringToXmlElement3(this.getOutputMessage().toString()).getName())){ +// // Here we do not throw an exception, because if we throw an exception Interpreter will catch it and do the unsubscription, +// // which is not needed because if there's an gfac side error gfac will send a failure and unsubscription will be done in monitoring +// // so if we send an exception we are attempting to do two unsubscriptions which will cause a one unsubscription to fail. +// return false; +// } +// return true; } catch (RuntimeException e) { String message = "Error in invoking a service."; http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/DynamicInvoker.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/DynamicInvoker.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/DynamicInvoker.java index dac8965..be5407c 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/DynamicInvoker.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/DynamicInvoker.java @@ -29,8 +29,8 @@ import org.apache.airavata.workflow.model.exceptions.WorkflowException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import xsul.wsif.WSIFMessage; -import xsul.xwsif_runtime.WSIFClient; +//import xsul.wsif.WSIFMessage; +//import xsul.xwsif_runtime.WSIFClient; public class DynamicInvoker implements Invoker { @@ -143,27 +143,27 @@ public class DynamicInvoker implements Invoker { } /** - * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutputs() - */ - public WSIFMessage getOutputs() throws WorkflowException { - waitToFinish(); - return (WSIFMessage) this.result; - - } - - @Override - public WSIFClient getClient() { - return null; - } - - @Override - public WSIFMessage getInputs() throws WorkflowException { - return null; - } - - @Override - public WSIFMessage getFault() throws WorkflowException { - return null; - } +// * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutputs() +// */ +// public WSIFMessage getOutputs() throws WorkflowException { +// waitToFinish(); +// return (WSIFMessage) this.result; +// +// } +// +// @Override +// public WSIFClient getClient() { +// return null; +// } +// +// @Override +// public WSIFMessage getInputs() throws WorkflowException { +// return null; +// } +// +// @Override +// public WSIFMessage getFault() throws WorkflowException { +// return null; +// } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/Invoker.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/Invoker.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/Invoker.java index cdd47e7..2e70daf 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/Invoker.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/Invoker.java @@ -23,8 +23,8 @@ package org.apache.airavata.workflow.engine.invoker; import org.apache.airavata.workflow.model.exceptions.WorkflowException; -import xsul.wsif.WSIFMessage; -import xsul.xwsif_runtime.WSIFClient; +//import xsul.wsif.WSIFMessage; +//import xsul.xwsif_runtime.WSIFClient; public interface Invoker { @@ -38,7 +38,7 @@ public interface Invoker { /** * @return The WSIFClient. */ - public WSIFClient getClient(); +// public WSIFClient getClient(); /** * Sets the operation name to invoke. @@ -47,27 +47,27 @@ public interface Invoker { * The name of the operation * @throws WorkflowException */ - public void setOperation(String operationName) throws WorkflowException; - - /** - * Sets an input parameter - * - * @param name - * The name of the input parameter - * @param value - * The value of the input parameter - * @throws WorkflowException - */ - public void setInput(String name, Object value) throws WorkflowException; - - /** - * Returns the all input parameters - * - * @return The input parameters - * @throws WorkflowException - */ - public WSIFMessage getInputs() throws WorkflowException; - +// public void setOperation(String operationName) throws WorkflowException; +// +// /** +// * Sets an input parameter +// * +// * @param name +// * The name of the input parameter +// * @param value +// * The value of the input parameter +// * @throws WorkflowException +// */ +// public void setInput(String name, Object value) throws WorkflowException; +// +// /** +// * Returns the all input parameters +// * +// * @return The input parameters +// * @throws WorkflowException +// */ +//// public WSIFMessage getInputs() throws WorkflowException; +// /** * Invokes the service. * @@ -75,23 +75,23 @@ public interface Invoker { * @throws WorkflowException */ public boolean invoke() throws WorkflowException; - - /** - * Returns the all output parameters - * - * @return The output parameters - * @throws WorkflowException - */ - public WSIFMessage getOutputs() throws WorkflowException; - - /** - * Returns the output of a specified name. - * - * @param name - * The name of the output parameter - * @return The value of the output - * @throws WorkflowException - */ +// +// /** +// * Returns the all output parameters +// * +// * @return The output parameters +// * @throws WorkflowException +// */ +//// public WSIFMessage getOutputs() throws WorkflowException; +// +// /** +// * Returns the output of a specified name. +// * +// * @param name +// * The name of the output parameter +// * @return The value of the output +// * @throws WorkflowException +// */ public Object getOutput(String name) throws WorkflowException; /** @@ -100,6 +100,6 @@ public interface Invoker { * @return The fault message * @throws WorkflowException */ - public WSIFMessage getFault() throws WorkflowException; +// public WSIFMessage getFault() throws WorkflowException; } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/SimpleInvoker.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/SimpleInvoker.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/SimpleInvoker.java index 5c9fd03..e205459 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/SimpleInvoker.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/invoker/SimpleInvoker.java @@ -29,232 +29,233 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xmlpull.v1.builder.XmlElement; -import xsul.wsdl.WsdlDefinitions; -import xsul.wsif.WSIFMessage; -import xsul.wsif.WSIFOperation; -import xsul.wsif.WSIFPort; -import xsul.wsif.WSIFService; -import xsul.wsif.WSIFServiceFactory; -import xsul.wsif.spi.WSIFProviderManager; -import xsul.xwsif_runtime.WSIFClient; -import xsul.xwsif_runtime.WSIFRuntime; +//import xsul.wsdl.WsdlDefinitions; +//import xsul.wsif.WSIFMessage; +//import xsul.wsif.WSIFOperation; +//import xsul.wsif.WSIFPort; +//import xsul.wsif.WSIFService; +//import xsul.wsif.WSIFServiceFactory; +//import xsul.wsif.spi.WSIFProviderManager; +//import xsul.xwsif_runtime.WSIFClient; +//import xsul.xwsif_runtime.WSIFRuntime; public class SimpleInvoker implements Invoker { private static final Logger log = LoggerFactory.getLogger(SimpleInvoker.class); - protected WSIFClient client; - - private WsdlDefinitions definitions; - - private WSIFOperation operation; - - private WSIFMessage inputMessage; - - private volatile WSIFMessage outputMessage; - - private WSIFMessage faultMessage; - - private boolean lock = false; - - static { - WSIFProviderManager.getInstance().addProvider(new xsul.wsif_xsul_soap_http.Provider()); - } - - /** - * Constructs a SimpleInvoker. - * - * @param definitions - */ - public SimpleInvoker(WsdlDefinitions definitions) { - this.definitions = definitions; - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#setup() - */ +// protected WSIFClient client; +// +// private WsdlDefinitions definitions; +// +// private WSIFOperation operation; +// +// private WSIFMessage inputMessage; +// +// private volatile WSIFMessage outputMessage; +// +// private WSIFMessage faultMessage; +// +// private boolean lock = false; +// +// static { +// WSIFProviderManager.getInstance().addProvider(new xsul.wsif_xsul_soap_http.Provider()); +// } + +// /** +// * Constructs a SimpleInvoker. +// * +// * @param definitions +// */ +// public SimpleInvoker(WsdlDefinitions definitions) { +// this.definitions = definitions; +// } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#setup() +// */ public void setup() throws WorkflowException { - try { - WSIFService service = WSIFServiceFactory.newInstance().getService(this.definitions); - WSIFPort port = service.getPort(); - this.client = WSIFRuntime.getDefault().newClientFor(port); - this.client.setAsyncResponseTimeoutInMs(999999999); - } catch (RuntimeException e) { - String message = "The WSDL is in the wrong format"; - throw new WorkflowException(message, e); - } - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#getClient() - */ - public WSIFClient getClient() { - return this.client; - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#setOperation(java.lang.String) - */ - public void setOperation(String operationName) throws WorkflowException { - try { - WSIFPort port = this.client.getPort(); - this.operation = port.createOperation(operationName); - this.inputMessage = this.operation.createInputMessage(); - this.outputMessage = this.operation.createOutputMessage(); - this.faultMessage = this.operation.createFaultMessage(); - } catch (RuntimeException e) { - String message = "The WSDL does not conform to the invoking service."; - throw new WorkflowException(message, e); - } - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#setInput(java.lang.String, java.lang.Object) - */ - public void setInput(String name, Object value) throws WorkflowException { - try { - if (value instanceof XmlElement) { - // If the value is a complex type, change the name of the - // element to the correct one. - XmlElement valueElement = (XmlElement) value; - valueElement.setName(name); - } else if (value instanceof String) { - if(XMLUtil.isXML((String)value)){ - XmlElement valueElement = XMLUtil.stringToXmlElement3((String) value); - valueElement.setName(name); - value = valueElement; - } - // Simple case. - } else { - // convert int, doule to string. - value = "" + value; - } - this.inputMessage.setObjectPart(name, value); - } catch (RuntimeException e) { - String message = "Error in setting an input. name: " + name + " value: " + value; - throw new WorkflowException(message, e); - } +// try { +// WSIFService service = WSIFServiceFactory.newInstance().getService(this.definitions); +// WSIFPort port = service.getPort(); +// this.client = WSIFRuntime.getDefault().newClientFor(port); +// this.client.setAsyncResponseTimeoutInMs(999999999); +// } catch (RuntimeException e) { +// String message = "The WSDL is in the wrong format"; +// throw new WorkflowException(message, e); +// } } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#getInputs() - */ - public WSIFMessage getInputs() { - return this.inputMessage; - } - +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#getClient() +// */ +// public WSIFClient getClient() { +// return this.client; +// } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#setOperation(java.lang.String) +// */ +// public void setOperation(String operationName) throws WorkflowException { +// try { +// WSIFPort port = this.client.getPort(); +// this.operation = port.createOperation(operationName); +// this.inputMessage = this.operation.createInputMessage(); +// this.outputMessage = this.operation.createOutputMessage(); +// this.faultMessage = this.operation.createFaultMessage(); +// } catch (RuntimeException e) { +// String message = "The WSDL does not conform to the invoking service."; +// throw new WorkflowException(message, e); +// } +// } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#setInput(java.lang.String, java.lang.Object) +// */ +// public void setInput(String name, Object value) throws WorkflowException { +// try { +// if (value instanceof XmlElement) { +// // If the value is a complex type, change the name of the +// // element to the correct one. +// XmlElement valueElement = (XmlElement) value; +// valueElement.setName(name); +// } else if (value instanceof String) { +// if(XMLUtil.isXML((String)value)){ +// XmlElement valueElement = XMLUtil.stringToXmlElement3((String) value); +// valueElement.setName(name); +// value = valueElement; +// } +// // Simple case. +// } else { +// // convert int, doule to string. +// value = "" + value; +// } +// this.inputMessage.setObjectPart(name, value); +// } catch (RuntimeException e) { +// String message = "Error in setting an input. name: " + name + " value: " + value; +// throw new WorkflowException(message, e); +// } +// } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#getInputs() +// */ +// public WSIFMessage getInputs() { +// return this.inputMessage; +// } +// /** * @see org.apache.airavata.workflow.engine.invoker.Invoker#invoke() */ public boolean invoke() throws WorkflowException { try { - boolean success = this.operation.executeRequestResponseOperation(this.inputMessage, this.outputMessage, - this.faultMessage); - while(this.outputMessage == null){ - - } - return success; +// boolean success = this.operation.executeRequestResponseOperation(this.inputMessage, this.outputMessage, +// this.faultMessage); +// while(this.outputMessage == null){ +// +// } + return true; } catch (RuntimeException e) { String message = "Error in invoking a service."; throw new WorkflowException(message, e); } } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#getOutputs() - */ - public WSIFMessage getOutputs() { - if (lock) { - try { - wait(); - } catch (InterruptedException e) { - log.error(e.getMessage(), e); - } - } - return this.outputMessage; - } - - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#getOutput(java.lang.String) - */ +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#getOutputs() +// */ +// public WSIFMessage getOutputs() { +// if (lock) { +// try { +// wait(); +// } catch (InterruptedException e) { +// log.error(e.getMessage(), e); +// } +// } +// return this.outputMessage; +// } +// +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#getOutput(java.lang.String) +// */ public Object getOutput(String name) throws WorkflowException { - try { +// try { // This code doesn't work when the output is a complex type. // Object output = this.outputMessage.getObjectPart(name); // return output; - XmlElement outputElement = (XmlElement) this.outputMessage; - XmlElement valueElement = outputElement.element(null, name); - Iterator childIt = valueElement.children(); - int numberOfChildren = 0; - while (childIt.hasNext()) { - childIt.next(); - numberOfChildren++; - } - if (numberOfChildren == 1) { - Object child = valueElement.children().next(); - if (child instanceof String) { - // Value is a simple type. Return the string. - String value = (String) child; - return value; - } - if (child instanceof XmlElement) { - log.debug("output: " + XMLUtil.xmlElementToString((XmlElement) child)); - Object child1 = ((XmlElement) child).children().next(); - if (child1 instanceof String) { - // Value is a simple type. Return the string. - String value = (String) child1; - return value; - } - } - } - // Value is a complex type. Return the whole XmlElement so that we - // can set it to the next service as it is. - return valueElement; - } catch (RuntimeException e) { - String message = "Error in getting output. name: " + name; - throw new WorkflowException(message, e); - } - } - - /** - * @see org.apache.airavata.workflow.engine.invoker.Invoker#getFault() - */ - public WSIFMessage getFault() { - return this.faultMessage; - } - - public WsdlDefinitions getDefinitions() { - return definitions; - } - - public WSIFOperation getOperation() { - return operation; - } - - public WSIFMessage getInputMessage() { - return inputMessage; - } - - public synchronized WSIFMessage getOutputMessage() { - return outputMessage; - } - - public WSIFMessage getFaultMessage() { - return faultMessage; - } - - public synchronized void setOutputMessage(WSIFMessage outputMessage) { - log.debug("Setting output message"); - this.outputMessage = outputMessage; - } - - public void setLock(boolean lock) { - this.lock = lock; - } - - public boolean isLock() { - return lock; +// XmlElement outputElement = (XmlElement) this.outputMessage; +// XmlElement valueElement = outputElement.element(null, name); +// Iterator childIt = valueElement.children(); +// int numberOfChildren = 0; +// while (childIt.hasNext()) { +// childIt.next(); +// numberOfChildren++; +// } +// if (numberOfChildren == 1) { +// Object child = valueElement.children().next(); +// if (child instanceof String) { +// // Value is a simple type. Return the string. +// String value = (String) child; +// return value; +// } +// if (child instanceof XmlElement) { +// log.debug("output: " + XMLUtil.xmlElementToString((XmlElement) child)); +// Object child1 = ((XmlElement) child).children().next(); +// if (child1 instanceof String) { +// // Value is a simple type. Return the string. +// String value = (String) child1; +// return value; +// } +// } +// } +// // Value is a complex type. Return the whole XmlElement so that we +// // can set it to the next service as it is. +// return valueElement; +// } catch (RuntimeException e) { +// String message = "Error in getting output. name: " + name; +// throw new WorkflowException(message, e); +// } + return null; } +// +// /** +// * @see org.apache.airavata.workflow.engine.invoker.Invoker#getFault() +// */ +// public WSIFMessage getFault() { +// return this.faultMessage; +// } +// +// public WsdlDefinitions getDefinitions() { +// return definitions; +// } +// +// public WSIFOperation getOperation() { +// return operation; +// } +// +// public WSIFMessage getInputMessage() { +// return inputMessage; +// } +// +// public synchronized WSIFMessage getOutputMessage() { +// return outputMessage; +// } +// +// public WSIFMessage getFaultMessage() { +// return faultMessage; +// } +// +// public synchronized void setOutputMessage(WSIFMessage outputMessage) { +// log.debug("Setting output message"); +// this.outputMessage = outputMessage; +// } +// +// public void setLock(boolean lock) { +// this.lock = lock; +// } +// +// public boolean isLock() { +// return lock; +// } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/InterpreterUtil.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/InterpreterUtil.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/InterpreterUtil.java index 6d56c44..c88f6ab 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/InterpreterUtil.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/InterpreterUtil.java @@ -51,7 +51,7 @@ import org.apache.airavata.workflow.model.graph.ws.WSGraph; import org.apache.airavata.workflow.model.graph.ws.WSPort; import org.xmlpull.infoset.XmlElement; -import xsul5.XmlConstants; +//import xsul5.XmlConstants; //import org.apache.airavata.xbaya.ui.monitor.MonitorEventHandler; //import org.apache.airavata.xbaya.ui.monitor.MonitorEventHandler.NodeState; @@ -97,61 +97,61 @@ public class InterpreterUtil { */ public static Object findInputFromPort(DataPort inputPort, Map<Node, Invoker> invokerMap) throws WorkflowException { Object outputVal = null; - Node fromNode = inputPort.getFromNode(); - if (fromNode instanceof InputNode) { - outputVal = ((InputNode) fromNode).getDefaultValue(); - } else if (fromNode instanceof ConstantNode) { - outputVal = ((ConstantNode) fromNode).getValue(); - } else if (fromNode instanceof DifferedInputNode && ((DifferedInputNode) fromNode).isConfigured()) { - outputVal = ((DifferedInputNode) fromNode).getDefaultValue(); - } else if (fromNode instanceof EndifNode || fromNode instanceof DoWhileNode || fromNode instanceof EndDoWhileNode) { - Invoker fromInvoker = invokerMap.get(fromNode); - outputVal = fromInvoker.getOutput(inputPort.getFromPort().getID()); - } else if (fromNode instanceof InstanceNode) { - return ((InstanceNode) fromNode).getOutputInstanceId(); - } else if (fromNode instanceof EndForEachNode) { - outputVal = ""; - Invoker workflowInvoker = invokerMap.get(fromNode); - String outputName = ""; - if (inputPort instanceof SystemDataPort) { - outputName = ((SystemDataPort) inputPort).getWSComponentPort().getName(); - - } else if (inputPort instanceof WSPort) { - outputName = ((SystemDataPort) fromNode.getInputPort(fromNode.getOutputPorts().indexOf(inputPort.getEdge(0).getFromPort()))) - .getWSComponentPort().getName(); - } - XmlElement msgElmt = XmlConstants.BUILDER.parseFragmentFromString("<temp>" + workflowInvoker.getOutput(outputName) + "</temp>"); - Iterator valItr = msgElmt.children().iterator(); - while (valItr.hasNext()) { - Object object2 = valItr.next(); - if (object2 instanceof XmlElement) { - - if (((XmlElement) object2).children().iterator().hasNext()) { - outputVal = outputVal + StringUtil.DELIMETER + StringUtil.quoteString(((XmlElement) object2).children().iterator().next().toString()); - } - } - } - - if (((String) outputVal).length() == 0) { - throw new WorkflowException("Empty Output Generated"); - } - outputVal = ((String) outputVal).substring(1, ((String) outputVal).length()); - } else { - Invoker fromInvoker = invokerMap.get(fromNode); - try { - if (fromInvoker != null) - outputVal = fromInvoker.getOutput(inputPort.getFromPort().getName()); - - } catch (Exception e) { - // if the value is still null look it up from the inputport name - // because the value is set to the input port name at some point - // there is no harm in doing this - if (null == outputVal) { - outputVal = fromInvoker.getOutput(inputPort.getName()); - } - } - - } +// Node fromNode = inputPort.getFromNode(); +// if (fromNode instanceof InputNode) { +// outputVal = ((InputNode) fromNode).getDefaultValue(); +// } else if (fromNode instanceof ConstantNode) { +// outputVal = ((ConstantNode) fromNode).getValue(); +// } else if (fromNode instanceof DifferedInputNode && ((DifferedInputNode) fromNode).isConfigured()) { +// outputVal = ((DifferedInputNode) fromNode).getDefaultValue(); +// } else if (fromNode instanceof EndifNode || fromNode instanceof DoWhileNode || fromNode instanceof EndDoWhileNode) { +// Invoker fromInvoker = invokerMap.get(fromNode); +//// outputVal = fromInvoker.getOutput(inputPort.getFromPort().getID()); +// } else if (fromNode instanceof InstanceNode) { +// return ((InstanceNode) fromNode).getOutputInstanceId(); +// } else if (fromNode instanceof EndForEachNode) { +// outputVal = ""; +// Invoker workflowInvoker = invokerMap.get(fromNode); +// String outputName = ""; +// if (inputPort instanceof SystemDataPort) { +// outputName = ((SystemDataPort) inputPort).getWSComponentPort().getName(); +// +// } else if (inputPort instanceof WSPort) { +// outputName = ((SystemDataPort) fromNode.getInputPort(fromNode.getOutputPorts().indexOf(inputPort.getEdge(0).getFromPort()))) +// .getWSComponentPort().getName(); +// } +// XmlElement msgElmt = XmlConstants.BUILDER.parseFragmentFromString("<temp>" + workflowInvoker.getOutput(outputName) + "</temp>"); +// Iterator valItr = msgElmt.children().iterator(); +// while (valItr.hasNext()) { +// Object object2 = valItr.next(); +// if (object2 instanceof XmlElement) { +// +// if (((XmlElement) object2).children().iterator().hasNext()) { +// outputVal = outputVal + StringUtil.DELIMETER + StringUtil.quoteString(((XmlElement) object2).children().iterator().next().toString()); +// } +// } +// } +// +// if (((String) outputVal).length() == 0) { +// throw new WorkflowException("Empty Output Generated"); +// } +// outputVal = ((String) outputVal).substring(1, ((String) outputVal).length()); +// } else { +// Invoker fromInvoker = invokerMap.get(fromNode); +// try { +// if (fromInvoker != null) +// outputVal = fromInvoker.getOutput(inputPort.getFromPort().getName()); +// +// } catch (Exception e) { +// // if the value is still null look it up from the inputport name +// // because the value is set to the input port name at some point +// // there is no harm in doing this +// if (null == outputVal) { +// outputVal = fromInvoker.getOutput(inputPort.getName()); +// } +// } +// +// } return outputVal; } http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java index 5921166..994684b 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/util/XBayaUtil.java @@ -37,7 +37,7 @@ import org.apache.airavata.workflow.model.graph.system.InputNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xmlpull.infoset.XmlElement; -import xsul5.XmlConstants; +//import xsul5.XmlConstants; import java.net.HttpURLConnection; import java.net.SocketTimeoutException; @@ -111,52 +111,52 @@ public class XBayaUtil { */ public static Object findInputFromPort(DataPort inputPort, Map<Node, Invoker> invokerMap) throws WorkflowException { Object outputVal = null; - Node fromNode = inputPort.getFromNode(); - if (fromNode instanceof InputNode) { - outputVal = ((InputNode) fromNode).getDefaultValue(); - } else if (fromNode instanceof ConstantNode) { - outputVal = ((ConstantNode) fromNode).getValue(); - } else if (fromNode instanceof EndifNode) { - Invoker fromInvoker = invokerMap.get(fromNode); - outputVal = fromInvoker.getOutput(inputPort.getFromPort().getID()); - } else if (fromNode instanceof InstanceNode) { - return ((InstanceNode) fromNode).getOutputInstanceId(); - } else if (fromNode instanceof EndForEachNode) { - outputVal = ""; - Invoker workflowInvoker = invokerMap.get(fromNode); - String outputName = fromNode.getOutputPort(0).getName(); - XmlElement msgElmt = XmlConstants.BUILDER - .parseFragmentFromString("<temp>" - + workflowInvoker.getOutput(outputName) + "</temp>"); - Iterator valItr = msgElmt.children().iterator(); - while (valItr.hasNext()) { - Object object2 = valItr.next(); - if (object2 instanceof XmlElement) { - outputVal = outputVal - + StringUtil.DELIMETER - + StringUtil.quoteString(((XmlElement) object2).children().iterator() - .next().toString()); - } - } - outputVal = ((String) outputVal).substring(1, - ((String) outputVal).length()); - } else { - Invoker fromInvoker = invokerMap.get(fromNode); - try { - if (fromInvoker != null) - outputVal = fromInvoker.getOutput(inputPort.getFromPort() - .getName()); - - } catch (Exception e) { - // if the value is still null look it up from the inputport name - // because the value is set to the input port name at some point - // there is no harm in doing this - if (null == outputVal) { - outputVal = fromInvoker.getOutput(inputPort.getName()); - } - } - - } +// Node fromNode = inputPort.getFromNode(); +// if (fromNode instanceof InputNode) { +// outputVal = ((InputNode) fromNode).getDefaultValue(); +// } else if (fromNode instanceof ConstantNode) { +// outputVal = ((ConstantNode) fromNode).getValue(); +// } else if (fromNode instanceof EndifNode) { +// Invoker fromInvoker = invokerMap.get(fromNode); +// outputVal = fromInvoker.getOutput(inputPort.getFromPort().getID()); +// } else if (fromNode instanceof InstanceNode) { +// return ((InstanceNode) fromNode).getOutputInstanceId(); +// } else if (fromNode instanceof EndForEachNode) { +// outputVal = ""; +// Invoker workflowInvoker = invokerMap.get(fromNode); +// String outputName = fromNode.getOutputPort(0).getName(); +// XmlElement msgElmt = XmlConstants.BUILDER +// .parseFragmentFromString("<temp>" +// + workflowInvoker.getOutput(outputName) + "</temp>"); +// Iterator valItr = msgElmt.children().iterator(); +// while (valItr.hasNext()) { +// Object object2 = valItr.next(); +// if (object2 instanceof XmlElement) { +// outputVal = outputVal +// + StringUtil.DELIMETER +// + StringUtil.quoteString(((XmlElement) object2).children().iterator() +// .next().toString()); +// } +// } +// outputVal = ((String) outputVal).substring(1, +// ((String) outputVal).length()); +// } else { +// Invoker fromInvoker = invokerMap.get(fromNode); +// try { +// if (fromInvoker != null) +// outputVal = fromInvoker.getOutput(inputPort.getFromPort() +// .getName()); +// +// } catch (Exception e) { +// // if the value is still null look it up from the inputport name +// // because the value is set to the input port name at some point +// // there is no harm in doing this +// if (null == outputVal) { +// outputVal = fromInvoker.getOutput(inputPort.getName()); +// } +// } +// +// } return outputVal; } http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/workflow/proxy/WorkflowContext.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/workflow/proxy/WorkflowContext.java b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/workflow/proxy/WorkflowContext.java index a5ab394..0b045b2 100644 --- a/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/workflow/proxy/WorkflowContext.java +++ b/modules/workflow-model/workflow-engine/src/main/java/org/apache/airavata/workflow/engine/workflow/proxy/WorkflowContext.java @@ -27,13 +27,13 @@ import org.apache.airavata.workflow.model.wf.Workflow; import org.ietf.jgss.GSSCredential; import org.ietf.jgss.GSSException; -import xsul.lead.LeadContextHeader; +//import xsul.lead.LeadContextHeader; public interface WorkflowContext { public void prepare(WorkflowClient client, Workflow workflow) throws GSSException, URISyntaxException; - public LeadContextHeader getHeader(); +// public LeadContextHeader getHeader(); public GSSCredential getCredentials(); http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-component/pom.xml ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-component/pom.xml b/modules/workflow-model/workflow-model-component/pom.xml index b39c54b..5a6072e 100644 --- a/modules/workflow-model/workflow-model-component/pom.xml +++ b/modules/workflow-model/workflow-model-component/pom.xml @@ -64,12 +64,7 @@ <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> - <dependency> - <groupId>org.ogce</groupId> - <artifactId>xsul</artifactId> - <version>${xsul.version}</version> - </dependency> - <dependency> + <dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-common-utils</artifactId> <version>${project.version}</version> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/pom.xml ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/pom.xml b/modules/workflow-model/workflow-model-core/pom.xml index eb2153c..bbe670d 100644 --- a/modules/workflow-model/workflow-model-core/pom.xml +++ b/modules/workflow-model/workflow-model-core/pom.xml @@ -43,17 +43,17 @@ <dependencies> - <dependency> + <!-- dependency> <groupId>org.ogce</groupId> <artifactId>gpel-client</artifactId> <version>${gpel.version}</version> - </dependency> + </dependency> --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> - <dependency> + <!-- dependency> <groupId>org.ogce</groupId> <artifactId>xsul</artifactId> <version>${xsul.version}</version> @@ -63,7 +63,7 @@ <artifactId>bcprov-jdk16</artifactId> </exclusion> </exclusions> - </dependency> + </dependency> --> <dependency> <groupId>org.apache.airavata</groupId> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java index 7d532fd..f0ed076 100644 --- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java +++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java @@ -26,7 +26,7 @@ import org.apache.airavata.workflow.model.component.ws.WSComponent; import org.apache.airavata.workflow.model.graph.Graph; import org.apache.airavata.workflow.model.graph.GraphException; import org.apache.airavata.workflow.model.graph.subworkflow.SubWorkflowNode; -import org.apache.airavata.workflow.model.ode.ODEClient; +//import org.apache.airavata.workflow.model.ode.ODEClient; import org.apache.airavata.workflow.model.wf.Workflow; public class SubWorkflowComponent extends WSComponent { @@ -40,7 +40,7 @@ public class SubWorkflowComponent extends WSComponent { } public static SubWorkflowComponent getInstance(Workflow workflow) throws ComponentException { - new ODEClient().getInputs(workflow); +// new ODEClient().getInputs(workflow); return new SubWorkflowComponent(workflow); } http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/url/URLComponentRegistry.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/url/URLComponentRegistry.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/url/URLComponentRegistry.java index 01bfcd1..df56cc4 100644 --- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/url/URLComponentRegistry.java +++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/url/URLComponentRegistry.java @@ -33,8 +33,8 @@ import org.apache.airavata.workflow.model.component.ComponentRegistryException; import org.apache.airavata.workflow.model.component.ws.WSComponent; import org.apache.airavata.workflow.model.component.ws.WSComponentFactory; -import xsul.wsdl.WsdlDefinitions; -import xsul.wsdl.WsdlResolver; +//import xsul.wsdl.WsdlDefinitions; +//import xsul.wsdl.WsdlResolver; public class URLComponentRegistry extends ComponentRegistry { @@ -78,10 +78,10 @@ public class URLComponentRegistry extends ComponentRegistry { private void loadComponents(List<ComponentReference> tree) throws ComponentException { // XXX need to use wsdlResolver from xsul, not xsul5, to handle // security. - WsdlResolver wsdlResolver = WsdlResolver.getInstance(); - WsdlDefinitions definitions = wsdlResolver.loadWsdl(this.url); - List<WSComponent> components = WSComponentFactory.createComponents(WSDLUtil - .wsdlDefinitions3ToWsdlDefintions5(definitions)); +// WsdlResolver wsdlResolver = WsdlResolver.getInstance(); +// WsdlDefinitions definitions = wsdlResolver.loadWsdl(this.url); + //FIXME: to load WSDL + List<WSComponent> components = null; //WSComponentFactory.createComponents(WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(definitions)); String urlString = this.url.toString(); String name = urlString.substring(urlString.lastIndexOf('/') + 1); URLComponentReference componentReference = new URLComponentReference(name, components); http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentApplication.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentApplication.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentApplication.java index 98c9486..1ebc006 100644 --- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentApplication.java +++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentApplication.java @@ -50,7 +50,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xmlpull.infoset.XmlNamespace; -import xsul5.XmlConstants; +//import xsul5.XmlConstants; @XmlRootElement(name = "Application") @XmlType(propOrder = {"applicationId", "name", "description", "inputParameters", "outputParameters"}) http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java index c7a1305..e64bc99 100644 --- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java +++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java @@ -61,10 +61,10 @@ public class WSComponentFactory { } } - public static List<WSComponent> createComponents( - xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5) { - return null; - } +// public static List<WSComponent> createComponents( +// xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5) { +// return null; +// } public static List<WSComponent> createComponents(String compString) { // TODO Auto-generated method stub http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java index 976a777..083aa89 100644 --- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java +++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentRegistry.java @@ -38,9 +38,9 @@ import org.apache.airavata.workflow.model.component.url.URLComponentReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import xsul.wsdl.WsdlDefinitions; -import xsul.wsdl.WsdlException; -import xsul.wsdl.WsdlResolver; +//import xsul.wsdl.WsdlDefinitions; +//import xsul.wsdl.WsdlException; +//import xsul.wsdl.WsdlResolver; public class WSComponentRegistry extends ComponentRegistry { @@ -58,25 +58,25 @@ public class WSComponentRegistry extends ComponentRegistry { try { URI url = new URI("http://129.79.49.210:8080/axis2/services/AmazonEC2Webservice?wsdl"); - WsdlResolver wsdlResolver = WsdlResolver.getInstance(); - WsdlDefinitions definitions = wsdlResolver.loadWsdl(url); - List<WSComponent> components = WSComponentFactory.createComponents(WSDLUtil - .wsdlDefinitions3ToWsdlDefintions5(definitions)); - - this.componentMap = new LinkedHashMap<String, Component>(); - - for (Component component : components) { - this.componentMap.put(component.getName(), component); - } +// WsdlResolver wsdlResolver = WsdlResolver.getInstance(); +// WsdlDefinitions definitions = wsdlResolver.loadWsdl(url); +// List<WSComponent> components = WSComponentFactory.createComponents(WSDLUtil +// .wsdlDefinitions3ToWsdlDefintions5(definitions)); +// +// this.componentMap = new LinkedHashMap<String, Component>(); +// +// for (Component component : components) { +// this.componentMap.put(component.getName(), component); +// } String urlString = url.toString(); String name = urlString.substring(urlString.lastIndexOf('/') + 1); - treeLeaf = new URLComponentReference(name, components); +// treeLeaf = new URLComponentReference(name, components); // } catch (ComponentException e) { // e.printStackTrace(); - } catch (WsdlException e) { - log.error(e.getMessage(), e); +// } catch (WsdlException e) { +// log.error(e.getMessage(), e); } catch (URISyntaxException e) { log.error(e.getMessage(), e); } http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java index fd90c69..0b92bf7 100644 --- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java +++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WorkflowComponent.java @@ -22,30 +22,24 @@ package org.apache.airavata.workflow.model.component.ws; import java.net.URI; -import java.net.URISyntaxException; -import javax.xml.namespace.QName; - -import org.apache.airavata.common.exception.UtilsException; -import org.apache.airavata.common.utils.WSDLUtil; import org.apache.airavata.workflow.model.component.ComponentException; import org.apache.airavata.workflow.model.graph.Graph; import org.apache.airavata.workflow.model.graph.GraphException; import org.apache.airavata.workflow.model.graph.ws.WorkflowNode; import org.apache.airavata.workflow.model.wf.Workflow; -import org.gpel.GpelConstants; -import org.xmlpull.infoset.XmlElement; -import org.xmlpull.infoset.XmlNamespace; +//import org.gpel.GpelConstants; +//import org.xmlpull.infoset.XmlNamespace; -import xsul5.wsdl.WsdlDefinitions; -import xsul5.wsdl.WsdlPortType; +//import xsul5.wsdl.WsdlDefinitions; +//import xsul5.wsdl.WsdlPortType; public class WorkflowComponent extends WSComponent { /** * GPEL_NAMESPACE */ - public static final XmlNamespace GPEL_NAMESPACE = GpelConstants.GPEL_NS; +// public static final XmlNamespace GPEL_NAMESPACE = GpelConstants.GPEL_NS; /** * workflowTemplateID @@ -84,28 +78,28 @@ public class WorkflowComponent extends WSComponent { return this.templateID; } - /** - * Constructs a WorkflowComponent. - * - * This method is used when loading a workflow component from an xwf file. - * - * @param wsdl - * @param portTypeQName - * @param operationName - * @throws ComponentException - */ - public WorkflowComponent(WsdlDefinitions wsdl, QName portTypeQName, String operationName) throws ComponentException { -// super(wsdl, portTypeQName, operationName); -// try { -// // Get template ID from WSDL -// WsdlPortType portType = this.wsdl.getPortType(portTypeQName.getLocalPart()); -// XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG); -// String templateIDString = templateIDElement.requiredText(); -// this.templateID = new URI(templateIDString); -// } catch (URISyntaxException e) { -// throw new ComponentException(e); -// } - } +// /** +// * Constructs a WorkflowComponent. +// * +// * This method is used when loading a workflow component from an xwf file. +// * +// * @param wsdl +// * @param portTypeQName +// * @param operationName +// * @throws ComponentException +// */ +// public WorkflowComponent(WsdlDefinitions wsdl, QName portTypeQName, String operationName) throws ComponentException { +//// super(wsdl, portTypeQName, operationName); +//// try { +//// // Get template ID from WSDL +//// WsdlPortType portType = this.wsdl.getPortType(portTypeQName.getLocalPart()); +//// XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG); +//// String templateIDString = templateIDElement.requiredText(); +//// this.templateID = new URI(templateIDString); +//// } catch (URISyntaxException e) { +//// throw new ComponentException(e); +//// } +// } /** * @param workflowClient @@ -140,28 +134,28 @@ public class WorkflowComponent extends WSComponent { return node; } - /** - * @param definitions - * @return workflow template ID if the specified WSDL definition is for a workflow; null otherwise. - * @throws ComponentException - */ - public static URI getWorkflowTemplateID(WsdlDefinitions definitions) throws ComponentException { - try { - // Get template ID from WSDL - WsdlPortType portType = WSDLUtil.getFirstPortType(definitions); - XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG); - if (templateIDElement == null) { - // Not a workflow - return null; - } else { - String templateIDString = templateIDElement.requiredText(); - URI templateID = new URI(templateIDString); - return templateID; - } - } catch (URISyntaxException e) { - throw new ComponentException(e); - } catch (UtilsException e) { - throw new ComponentException(e); - } - } +// /** +// * @param definitions +// * @return workflow template ID if the specified WSDL definition is for a workflow; null otherwise. +// * @throws ComponentException +// */ +// public static URI getWorkflowTemplateID(WsdlDefinitions definitions) throws ComponentException { +// try { +// // Get template ID from WSDL +// WsdlPortType portType = WSDLUtil.getFirstPortType(definitions); +// XmlElement templateIDElement = portType.xml().element(GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG); +// if (templateIDElement == null) { +// // Not a workflow +// return null; +// } else { +// String templateIDString = templateIDElement.requiredText(); +// URI templateID = new URI(templateIDString); +// return templateID; +// } +// } catch (URISyntaxException e) { +// throw new ComponentException(e); +// } catch (UtilsException e) { +// throw new ComponentException(e); +// } +// } } \ No newline at end of file
