You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by pa...@apache.org on 2011/08/29 23:03:21 UTC
svn commit: r1163002 - in
/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya:
component/dynamic/ graph/dynamic/ graph/dynamic/gui/ interpretor/ invoker/
invoker/factory/ jython/lib/ jython/lib/invoker/ jython/script/ te...
Author: patanachai
Date: Mon Aug 29 21:03:20 2011
New Revision: 1163002
URL: http://svn.apache.org/viewvc?rev=1163002&view=rev
Log:
Clean up Invoker
Added:
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/AsynchronousInvoker.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/AsynchronousInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/GFacInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GenericInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/Invoker.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/Invoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/SimpleInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/WorkflowInvokerWrapperForGFacInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java
- copied, changed from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/InvokerFactory.java
Modified:
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/dynamic/DynamicInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/DynamicServiceCreator.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SystemComponentInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/TempInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GenericInvoker.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/SecureGFacCreator.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/script/JythonScript.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/GFacServiceCreaterTestCase.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/jython/JythonLibraryTest.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/workflow/WorkflowInvoker.java
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/dynamic/DynamicInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/dynamic/DynamicInvoker.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/dynamic/DynamicInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/dynamic/DynamicInvoker.java Mon Aug 29 21:03:20 2011
@@ -26,11 +26,12 @@ import java.net.URL;
import java.net.URLClassLoader;
import org.apache.airavata.xbaya.XBayaException;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
+import org.apache.airavata.xbaya.invoker.Invoker;
import xsul.wsif.WSIFMessage;
+import xsul.xwsif_runtime.WSIFClient;
-public class DynamicInvoker implements WorkflowInvoker {
+public class DynamicInvoker implements Invoker {
private URL jarUrl;
@@ -57,7 +58,7 @@ public class DynamicInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutput(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutput(java.lang.String)
*/
public Object getOutput(String name) throws XBayaException {
waitToFinish();
@@ -65,9 +66,9 @@ public class DynamicInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#invoke()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#invoke()
*/
- public void invoke() throws XBayaException {
+ public boolean invoke() throws XBayaException {
try {
Class<?> targetClass = Class.forName(this.className);
Object obj = targetClass.newInstance();
@@ -90,10 +91,11 @@ public class DynamicInvoker implements W
} catch (Exception e) {
throw new XBayaException(e);
}
+ return true;
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
*/
public void setInput(String name, Object value) throws XBayaException {
// TODO Auto-generated method stub
@@ -101,14 +103,14 @@ public class DynamicInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setOperation(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setOperation(java.lang.String)
*/
public void setOperation(String operationName) throws XBayaException {
this.operationName = operationName;
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setup()
*/
public void setup() throws XBayaException {
Class[] parameters = new Class[] { URL.class };
@@ -126,7 +128,7 @@ public class DynamicInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#waitToFinish()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#waitToFinish()
*/
public void waitToFinish() throws XBayaException {
while (this.result == null) {
@@ -141,7 +143,7 @@ public class DynamicInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutputs()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutputs()
*/
public WSIFMessage getOutputs() throws XBayaException {
waitToFinish();
@@ -149,4 +151,19 @@ public class DynamicInvoker implements W
}
+ @Override
+ public WSIFClient getClient() {
+ return null;
+ }
+
+ @Override
+ public WSIFMessage getInputs() throws XBayaException {
+ return null;
+ }
+
+ @Override
+ public WSIFMessage getFault() throws XBayaException {
+ return null;
+ }
+
}
\ No newline at end of file
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/DynamicServiceCreator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/DynamicServiceCreator.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/DynamicServiceCreator.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/DynamicServiceCreator.java Mon Aug 29 21:03:20 2011
@@ -27,8 +27,8 @@ import java.net.URI;
import javax.xml.namespace.QName;
import org.apache.airavata.xbaya.XBayaException;
-import org.apache.airavata.xbaya.jython.lib.invoker.Invoker;
-import org.apache.airavata.xbaya.jython.lib.invoker.InvokerFactory;
+import org.apache.airavata.xbaya.invoker.Invoker;
+import org.apache.airavata.xbaya.invoker.factory.InvokerFactory;
import xsul.wsdl.WsdlDefinitions;
import xsul.wsdl.WsdlResolver;
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java Mon Aug 29 21:03:20 2011
@@ -442,15 +442,15 @@ public class DynamicWorkflowRunnerWindow
WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(
DynamicWorkflowRunnerWindow.this.engine, topicString);
try {
- MonitorConfiguration notifConfig = DynamicWorkflowRunnerWindow.this.engine.getMonitor()
- .getConfiguration();
- notifConfig.setTopic(topicString);
- DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();
+ //MonitorConfiguration notifConfig = DynamicWorkflowRunnerWindow.this.engine.getMonitor()
+ // .getConfiguration();
+ //notifConfig.setTopic(topicString);
+ //DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();
- DynamicWorkflowRunnerWindow.this.engine.getGUI().addDynamicExecutionToolsToToolbar();
+ //DynamicWorkflowRunnerWindow.this.engine.getGUI().addDynamicExecutionToolsToToolbar();
- if (resourceMapping != null)
- workflowInterpreter.setResourceMapping(resourceMapping);
+ //if (resourceMapping != null)
+ // workflowInterpreter.setResourceMapping(resourceMapping);
workflowInterpreter.scheduleDynamically();
} catch (XBayaException e) {
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SystemComponentInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SystemComponentInvoker.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SystemComponentInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/SystemComponentInvoker.java Mon Aug 29 21:03:20 2011
@@ -24,11 +24,13 @@ package org.apache.airavata.xbaya.interp
import java.util.Hashtable;
import java.util.Map;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
+import org.apache.airavata.xbaya.XBayaException;
+import org.apache.airavata.xbaya.invoker.Invoker;
import xsul.wsif.WSIFMessage;
+import xsul.xwsif_runtime.WSIFClient;
-public class SystemComponentInvoker implements WorkflowInvoker {
+public class SystemComponentInvoker implements Invoker {
private Map<String, Object> outputs = new Hashtable<String, Object>();
@@ -42,7 +44,7 @@ public class SystemComponentInvoker impl
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutput(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutput(java.lang.String)
*/
@Override
public Object getOutput(String name) {
@@ -59,7 +61,7 @@ public class SystemComponentInvoker impl
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutputs()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutputs()
*/
@Override
public WSIFMessage getOutputs() {
@@ -67,21 +69,18 @@ public class SystemComponentInvoker impl
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#invoke()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#invoke()
*/
@Override
- public void invoke() {
- // TODO Auto-generated method stub
-
+ public boolean invoke() {
+ return true;
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
*/
@Override
public void setInput(String name, Object value) {
- // TODO Auto-generated method stub
-
}
/**
@@ -89,16 +88,27 @@ public class SystemComponentInvoker impl
*/
@Override
public void setOperation(String operationName) {
- // TODO Auto-generated method stub
-
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setup()
*/
@Override
public void setup() {
- // TODO Auto-generated method stub
+ }
+
+ @Override
+ public WSIFClient getClient() {
+ return null;
+ }
+ @Override
+ public WSIFMessage getInputs() throws XBayaException {
+ return null;
+ }
+
+ @Override
+ public WSIFMessage getFault() throws XBayaException {
+ return null;
}
}
\ No newline at end of file
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java Mon Aug 29 21:03:20 2011
@@ -86,10 +86,10 @@ import org.apache.airavata.xbaya.graph.w
import org.apache.airavata.xbaya.graph.ws.WSPort;
import org.apache.airavata.xbaya.gui.Cancelable;
import org.apache.airavata.xbaya.gui.WaitDialog;
-import org.apache.airavata.xbaya.jython.lib.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.Invoker;
+import org.apache.airavata.xbaya.invoker.WorkflowInvokerWrapperForGFacInvoker;
import org.apache.airavata.xbaya.jython.lib.NotificationSender;
-import org.apache.airavata.xbaya.jython.lib.invoker.SecureGFacInvoker;
-import org.apache.airavata.xbaya.jython.lib.invoker.WorkflowInvokerWrapperForGFacInvoker;
import org.apache.airavata.xbaya.monitor.MonitorConfiguration;
import org.apache.airavata.xbaya.monitor.MonitorException;
import org.apache.airavata.xbaya.monitor.gui.MonitorEventHandler.NodeState;
@@ -101,12 +101,10 @@ import org.apache.airavata.xbaya.securit
import org.apache.airavata.xbaya.util.AmazonUtil;
import org.apache.airavata.xbaya.util.WSDLUtil;
import org.apache.airavata.xbaya.wf.Workflow;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
import org.ietf.jgss.GSSCredential;
import org.xmlpull.infoset.XmlElement;
import org.xmlpull.infoset.impl.XmlElementWithViewsImpl;
-import xsul.invoker.gsi.GsiInvoker;
import xsul.lead.LeadContextHeader;
import xsul.lead.LeadResourceMapping;
import xsul5.XmlConstants;
@@ -125,7 +123,7 @@ public class WorkflowInterpreter {
private Map<Node, Integer> retryCounter = new HashMap<Node, Integer>();
- private Map<Node, WorkflowInvoker> invokerMap = new HashMap<Node, WorkflowInvoker>();
+ private Map<Node, Invoker> invokerMap = new HashMap<Node, Invoker>();
private NotificationSender notifier;
@@ -244,7 +242,7 @@ public class WorkflowInterpreter {
keywords[i] = ((InputNode) node).getConfiguredName();
values[i] = ((InputNode) node).getDefaultValue();
}
- this.notifier.workflowStarted(values, keywords);
+ //this.notifier.workflowStarted(values, keywords);
while (this.workflow.getExecutionState() != XBayaExecutionState.STOPPED) {
if (getRemainNodesDynamically() == 0) {
if (this.mode == GUI_MODE) {
@@ -286,8 +284,7 @@ public class WorkflowInterpreter {
if (readyNodes.size() == 0) {
try {
Thread.sleep(400);
- } catch (InterruptedException
- e) {
+ } catch (InterruptedException e) {
e.printStackTrace();
}
}
@@ -459,7 +456,8 @@ public class WorkflowInterpreter {
Object inputVal = findInputFromPort(node.getInputPort(0));
String instanceId = inputVal.toString();
-// this.notifier.resourceMapping(instanceId, "Terminating EC2 Instance:" + instanceId);
+ // this.notifier.resourceMapping(instanceId,
+ // "Terminating EC2 Instance:" + instanceId);
/*
* Terminate instance
@@ -481,12 +479,12 @@ public class WorkflowInterpreter {
} else if (fromNode instanceof ConstantNode) {
outputVal = ((ConstantNode) fromNode).getValue();
} else if (fromNode instanceof EndifNode) {
- WorkflowInvoker fromInvoker = this.invokerMap.get(fromNode);
+ Invoker fromInvoker = this.invokerMap.get(fromNode);
outputVal = fromInvoker.getOutput(inputPort.getFromPort().getID());
} else if (fromNode instanceof InstanceNode) {
return ((InstanceNode) fromNode).getOutputInstanceId();
} else {
- WorkflowInvoker fromInvoker = this.invokerMap.get(fromNode);
+ Invoker fromInvoker = this.invokerMap.get(fromNode);
if (fromInvoker != null)
outputVal = fromInvoker.getOutput(inputPort.getFromPort().getName());
}
@@ -537,7 +535,7 @@ public class WorkflowInterpreter {
private void handleWSComponent(Node node) throws XBayaException {
WSComponent wsComponent = ((WSComponent) node.getComponent());
QName portTypeQName = wsComponent.getPortTypeQName();
- WorkflowInvoker invoker = this.invokerMap.get(node);
+ Invoker invoker = this.invokerMap.get(node);
if (invoker == null) {
final WSNode wsNode = (WSNode) node;
String wsdlLocation = this.getEPR(wsNode);
@@ -592,8 +590,8 @@ public class WorkflowInterpreter {
}
/*
- * If there is a instance control component connects to this component send information in soap
- * header
+ * If there is a instance control component connects to this
+ * component send information in soap header
*/
for (Node n : wsNode.getControlInPort().getFromNodes()) {
if (n instanceof InstanceNode) {
@@ -624,12 +622,12 @@ public class WorkflowInterpreter {
} else {
invoker = new GenericInvoker(portTypeQName, WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(wsNode
.getComponent().getWSDL()), node.getID(), this.configuration.getMessageBoxURL().toString(),
- gfacURLString, this.notifier, this.configuration, null);
+ gfacURLString, this.notifier);
}
} else {
- if(wsdlLocation.endsWith("/")){
- wsdlLocation = wsdlLocation.substring(0,wsdlLocation.length() -1);
+ if (wsdlLocation.endsWith("/")) {
+ wsdlLocation = wsdlLocation.substring(0, wsdlLocation.length() - 1);
}
if (!wsdlLocation.endsWith("?wsdl")) {
wsdlLocation += "?wsdl";
@@ -637,7 +635,7 @@ public class WorkflowInterpreter {
invoker = new GenericInvoker(portTypeQName, wsdlLocation, node.getID(), this.configuration
.getMessageBoxURL().toString(), gfacURLString, this.notifier);
}
- invoker.setup();
+ invoker.setup();
this.invokerMap.put(node, invoker);
invoker.setOperation(wsComponent.getOperationName());
}
@@ -645,7 +643,7 @@ public class WorkflowInterpreter {
// find inputs
List<DataPort> inputPorts = node.getInputPorts();
ODEClient odeClient = new ODEClient();
- List<WSComponentPort> inputComponents = odeClient.getInputs(this.workflow);
+ List<WSComponentPort> inputComponents = odeClient.getInputs(this.workflow);
for (DataPort port : inputPorts) {
Object inputVal = findInputFromPort(port);
@@ -681,7 +679,8 @@ public class WorkflowInterpreter {
Object inputVal = findInputFromPort(dataPort);
/*
- * Set type after get input value, and override inputValue if output type is array
+ * Set type after get input value, and override inputValue if output
+ * type is array
*/
Node fromNode = dataPort.getFromNode();
QName type = null;
@@ -691,7 +690,7 @@ public class WorkflowInterpreter {
type = ((ConstantNode) fromNode).getType();
} else if ((dataPort.getFromPort() instanceof WSPort)
&& BasicTypeMapping.isArrayType(((WSPort) dataPort.getFromPort()).getComponentPort().getElement())) {
- WorkflowInvoker fromInvoker = this.invokerMap.get(fromNode);
+ Invoker fromInvoker = this.invokerMap.get(fromNode);
inputVal = BasicTypeMapping.getOutputArray(XmlConstants.BUILDER.parseFragmentFromString(fromInvoker
.getOutputs().toString()), dataPort.getFromPort().getName(), BasicTypeMapping
.getSimpleTypeIndex(((DataPort) dataPort.getFromPort()).getType()));
@@ -747,7 +746,7 @@ public class WorkflowInterpreter {
Node forEachInputNode = forEachNode.getInputPort(0).getFromNode();
// if input node for for-each is WSNode
if (forEachInputNode instanceof WSNode) {
- WorkflowInvoker workflowInvoker = this.invokerMap.get(forEachInputNode);
+ Invoker workflowInvoker = this.invokerMap.get(forEachInputNode);
if (workflowInvoker != null) {
if (workflowInvoker instanceof GenericInvoker) {
/*
@@ -859,7 +858,8 @@ public class WorkflowInterpreter {
Boolean result = (Boolean) xpath.evaluate(booleanExpression, booleanExpression, XPathConstants.BOOLEAN);
/*
- * Set control port to make execution flow continue according to condition
+ * Set control port to make execution flow continue according to
+ * condition
*/
for (ControlPort controlPort : node.getControlOutPorts()) {
if (controlPort.getName().equals(IfComponent.TRUE_PORT_NAME)) {
@@ -906,8 +906,8 @@ public class WorkflowInterpreter {
WSComponent wsComponent = foreachWSNode.getComponent();
QName portTypeQName = wsComponent.getPortTypeQName();
- WorkflowInvoker invoker = null;
- LinkedList<WorkflowInvoker> invokerList = new LinkedList<WorkflowInvoker>();
+ Invoker invoker = null;
+ LinkedList<Invoker> invokerList = new LinkedList<Invoker>();
for (Iterator<String> iterator = listOfValues.iterator(); iterator.hasNext();) {
String input = iterator.next();
String wsdlLocation = getEPR(foreachWSNode);
@@ -935,8 +935,7 @@ public class WorkflowInterpreter {
new MonitorConfiguration(this.configuration.getBrokerURL(), this.topic, true,
this.configuration.getMessageBoxURL()), foreachWSNode.getID(), null);
} else {
- leadCtxHeader = WSDLUtil.buildLeadContextHeader(this.workflow,
- this.configuration,
+ leadCtxHeader = WSDLUtil.buildLeadContextHeader(this.workflow, this.configuration,
new MonitorConfiguration(this.configuration.getBrokerURL(), this.topic, true,
this.configuration.getMessageBoxURL()), foreachWSNode.getID(), null);
}
@@ -949,8 +948,9 @@ public class WorkflowInterpreter {
leadCtxHeader.setWorkflowId(new URI(this.workflow.getName()));
/*
- * We do this so that the wsdl resolver can is setup wsdlresolver.getInstance is static so once
- * this is done rest of the loading should work.
+ * We do this so that the wsdl resolver can is setup
+ * wsdlresolver.getInstance is static so once this is
+ * done rest of the loading should work.
*/
XBayaSecurity.init();
@@ -966,8 +966,8 @@ public class WorkflowInterpreter {
}
/*
- * If there is a instance control component connects to this component send information in soap
- * header
+ * If there is a instance control component connects to this
+ * component send information in soap header
*/
for (Node n : foreachWSNode.getControlInPort().getFromNodes()) {
if (n instanceof InstanceNode) {
@@ -998,7 +998,7 @@ public class WorkflowInterpreter {
invoker = new GenericInvoker(portTypeQName,
WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(foreachWSNode.getComponent().getWSDL()),
foreachWSNode.getID(), this.configuration.getMessageBoxURL().toString(), gfacURLString,
- this.notifier, this.configuration, null);
+ this.notifier);
}
} else {
@@ -1038,8 +1038,8 @@ public class WorkflowInterpreter {
}
String outputStr = "";
- for (Iterator<WorkflowInvoker> iterator = invokerList.iterator(); iterator.hasNext();) {
- WorkflowInvoker workflowInvoker = iterator.next();
+ for (Iterator<Invoker> iterator = invokerList.iterator(); iterator.hasNext();) {
+ Invoker workflowInvoker = iterator.next();
Object output = workflowInvoker.getOutput(foreachWSNode.getOutputPort(0).getName());
outputStr += "\n<value>" + output + "</value>";
}
@@ -1123,7 +1123,8 @@ public class WorkflowInterpreter {
}
} else if (component instanceof EndifComponent) {
/*
- * EndIfComponent can run if number of input equals to number of output that it expects
+ * EndIfComponent can run if number of input equals to number of
+ * output that it expects
*/
int expectedOutput = node.getOutputPorts().size();
int actualInput = 0;
@@ -1181,7 +1182,8 @@ public class WorkflowInterpreter {
this.retryCounter.put(node2, Integer.valueOf(++rerunTimes));
list.add(node2);
} else {
- // if some component fail so many times, stop the workflow
+ // if some component fail so many times, stop the
+ // workflow
if (this.mode == GUI_MODE) {
this.notifyPause();
} else {
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/AsynchronousInvoker.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/AsynchronousInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/AsynchronousInvoker.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/AsynchronousInvoker.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/AsynchronousInvoker.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/AsynchronousInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/AsynchronousInvoker.java Mon Aug 29 21:03:20 2011
@@ -19,7 +19,7 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib.invoker;
+package org.apache.airavata.xbaya.invoker;
import org.apache.airavata.xbaya.XBayaException;
@@ -56,11 +56,11 @@ public class AsynchronousInvoker extends
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.SimpleInvoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.SimpleInvoker#setup()
*/
@Override
- public WsdlDefinitions setup() throws XBayaException {
- WsdlDefinitions definitions = super.setup();
+ public void setup() throws XBayaException {
+ super.setup();
// TODO put header to invoke asynchronously
WSIFAsyncResponsesCorrelator correlator;
@@ -73,7 +73,5 @@ public class AsynchronousInvoker extends
logger.finest("using message box at " + this.messageBoxURL);
}
this.client.useAsyncMessaging(correlator);
-
- return definitions;
}
}
\ No newline at end of file
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/GFacInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/GFacInvoker.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/GFacInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java Mon Aug 29 21:03:20 2011
@@ -19,23 +19,21 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib.invoker;
+package org.apache.airavata.xbaya.invoker;
-import java.net.URISyntaxException;
+import java.net.URI;
import java.util.UUID;
import javax.xml.namespace.QName;
import org.apache.airavata.xbaya.XBayaException;
-import org.apache.airavata.xbaya.jython.lib.GFacServiceCreator;
+import org.apache.airavata.xbaya.invoker.factory.InvokerFactory;
import org.apache.airavata.xbaya.lead.NotificationHandler;
import org.apache.airavata.xbaya.util.WSDLUtil;
-import org.xmlpull.v1.builder.Iterable;
-import org.xmlpull.v1.builder.XmlElement;
import xsul.lead.LeadContextHeader;
import xsul.wsdl.WsdlDefinitions;
-import xsul.wsdl.WsdlPortType;
+import xsul.wsdl.WsdlResolver;
import xsul.wsif.WSIFMessage;
import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
import xsul.xwsif_runtime.WSIFClient;
@@ -49,29 +47,12 @@ public class GFacInvoker implements Invo
private String messageBoxURL;
- private WsdlDefinitions abstractDefinitions;
-
private QName portTypeQName;
- private GFacServiceCreator creator;
-
private Invoker invoker;
private LeadContextHeader leadContext;
- private boolean noShutDown = false;
-
- // FIXME: Should not invoke gfac without a context header, deprecating this method
- // /**
- // * Constructs a GFacInvoker.
- // *
- // * @param definitions
- // * @param messageBoxURL
- // */
- // public GFacInvoker(WsdlDefinitions definitions, String messageBoxURL) {
- // this(definitions, null, null, messageBoxURL);
- // }
-
/**
* Constructs a GFacInvoker.
*
@@ -81,101 +62,55 @@ public class GFacInvoker implements Invo
* @param context
*/
public GFacInvoker(QName portTypeQName, String gfacURL, String messageBoxURL, LeadContextHeader context) {
- this(portTypeQName, gfacURL, messageBoxURL, context, false);
- }
-
- /**
- * Constructs a GFacInvoker.
- *
- * @param portTypeQName
- * @param gfacURL
- * @param messageBoxURL
- * @param context
- * @param noShutDown
- */
- public GFacInvoker(QName portTypeQName, String gfacURL, String messageBoxURL, LeadContextHeader context,
- boolean noShutDown) {
- this(null, portTypeQName, gfacURL, messageBoxURL);
- this.leadContext = context;
- this.noShutDown = noShutDown;
- }
-
- /**
- * Constructs a GFacInvoker.
- *
- * @param definitions
- * @param portTypeQName
- * @param gfacURL
- * @param messageBoxURL
- */
- public GFacInvoker(WsdlDefinitions definitions, QName portTypeQName, String gfacURL, String messageBoxURL) {
- this.abstractDefinitions = definitions;
this.portTypeQName = portTypeQName;
this.gfacURL = gfacURL;
this.messageBoxURL = messageBoxURL;
+ this.leadContext = context;
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#setup()
*/
- public WsdlDefinitions setup() throws XBayaException {
+ public void setup() throws XBayaException {
- String wsdlLoc = null;
if (this.gfacURL == null) {
- XmlElement factoryServicesElement = this.abstractDefinitions.element(null, "factoryServices");
- if (factoryServicesElement != null) {
- XmlElement factoryService = factoryServicesElement.element(null, "factoryService");
- if (factoryService != null) {
- String location = factoryService.getAttributeValue(null, "location");
- String portType = factoryService.getAttributeValue(null, "portType");
- logger.finest("location: " + location);
- logger.finest("portType: " + portType);
- wsdlLoc = WSDLUtil.appendWSDLQuary(location);
- }
- }
- } else {
- wsdlLoc = WSDLUtil.appendWSDLQuary(this.gfacURL);
- }
-
- if (wsdlLoc == null) {
String message = "The location of the Generic Factory is not specified.";
throw new XBayaException(message);
}
- try {
- this.creator = new GFacServiceCreator(wsdlLoc);
- } catch (URISyntaxException e) {
- String message = "The location of the Generic Factory is in a wrong format";
- throw new XBayaException(message, e);
- }
- if (this.creator == null) {
- String message = "Cannot find the location of the Generic Factory in the WSDL";
+ if (this.portTypeQName == null) {
+ String message = "Error in finding the service name";
throw new XBayaException(message);
}
- if (this.portTypeQName == null) {
- try {
- Iterable portTypes = this.abstractDefinitions.getPortTypes();
- WsdlPortType portType = (WsdlPortType) portTypes.iterator().next();
- String portTypeName = portType.getPortTypeName();
- String targetNamespace = this.abstractDefinitions.getTargetNamespace();
- this.portTypeQName = new QName(targetNamespace, portTypeName);
- } catch (RuntimeException e) {
- String message = "Error in finding QName of the service in the WSDL";
- throw new XBayaException(message, e);
+ try {
+
+ URI uri = new URI(this.gfacURL);
+ String path = uri.getPath();
+ if (path != null && path.contains("/")) {
+ path = path.substring(path.lastIndexOf('/') + 1) + portTypeQName.getLocalPart() + "/getWSDL";
}
- }
+ uri = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), path, uri.getQuery(),
+ uri.getFragment());
- WsdlDefinitions definitions = this.creator.createService(this.portTypeQName);
+ logger.info("getWSDL service:" + uri.toString());
+
+ WsdlDefinitions definitions = WsdlResolver.getInstance().loadWsdl(uri);
- // FIXME: Should pass the last argument of leadcontextheader
- this.invoker = InvokerFactory.createInvoker(this.portTypeQName, definitions, null, this.messageBoxURL, null);
+ // FIXME: Should pass the last argument of leadcontextheader
+ this.invoker = InvokerFactory
+ .createInvoker(this.portTypeQName, definitions, null, this.messageBoxURL, null);
+ this.invoker.setup();
+ } catch (XBayaException xe) {
+ throw xe;
+ } catch (Exception e) {
+ throw new XBayaException(e.getMessage(), e);
+ }
- return this.invoker.setup();
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getClient()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getClient()
*/
public WSIFClient getClient() {
return this.invoker.getClient();
@@ -183,7 +118,7 @@ public class GFacInvoker implements Invo
/**
* @throws XBayaException
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#setOperation(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.Invoker#setOperation(java.lang.String)
*/
public void setOperation(String operationName) throws XBayaException {
this.invoker.setOperation(operationName);
@@ -191,14 +126,15 @@ public class GFacInvoker implements Invo
/**
* @throws XBayaException
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#setInput(java.lang.String, java.lang.Object)
+ * @see org.apache.airavata.xbaya.invoker.Invoker#setInput(java.lang.String,
+ * java.lang.Object)
*/
public void setInput(String name, Object value) throws XBayaException {
this.invoker.setInput(name, value);
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getInputs()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getInputs()
*/
public WSIFMessage getInputs() throws XBayaException {
return this.invoker.getInputs();
@@ -206,7 +142,7 @@ public class GFacInvoker implements Invo
/**
* @throws XBayaException
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#invoke()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#invoke()
*/
public boolean invoke() throws XBayaException {
@@ -222,29 +158,11 @@ public class GFacInvoker implements Invo
// This handler has to be end to get the entire soap message.
NotificationHandler notificationHandler = new NotificationHandler(this.leadContext);
client.addHandler(notificationHandler);
- boolean success = this.invoker.invoke();
-
- // Try to shutdown the service
-
- if (!noShutDown) {
- new Thread() {
- @Override
- public void run() {
- try {
- GFacInvoker.this.creator.shutdownService();
- } catch (XBayaException e) {
- // Ignore the error.
- logger.caught(e);
- }
- }
- }.start();
- }
-
- return success;
+ return this.invoker.invoke();
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getOutputs()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getOutputs()
*/
public WSIFMessage getOutputs() throws XBayaException {
return this.invoker.getOutputs();
@@ -252,7 +170,7 @@ public class GFacInvoker implements Invo
/**
* @throws XBayaException
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getOutput(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getOutput(java.lang.String)
*/
public Object getOutput(String name) throws XBayaException {
return this.invoker.getOutput(name);
@@ -260,7 +178,7 @@ public class GFacInvoker implements Invo
/**
* @throws XBayaException
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getFault()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getFault()
*/
public WSIFMessage getFault() throws XBayaException {
return this.invoker.getFault();
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GenericInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GenericInvoker.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GenericInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java Mon Aug 29 21:03:20 2011
@@ -19,7 +19,7 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib;
+package org.apache.airavata.xbaya.invoker;
import java.io.File;
import java.net.URI;
@@ -36,14 +36,13 @@ import java.util.concurrent.TimeoutExcep
import javax.xml.namespace.QName;
-import org.apache.airavata.xbaya.XBayaConfiguration;
import org.apache.airavata.xbaya.XBayaException;
import org.apache.airavata.xbaya.XBayaRuntimeException;
-import org.apache.airavata.xbaya.jython.lib.invoker.Invoker;
-import org.apache.airavata.xbaya.jython.lib.invoker.InvokerFactory;
+import org.apache.airavata.xbaya.invoker.factory.InvokerFactory;
+import org.apache.airavata.xbaya.jython.lib.NotificationSender;
+import org.apache.airavata.xbaya.jython.lib.ServiceNotificationSender;
import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
import org.apache.airavata.xbaya.util.XMLUtil;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
import org.xmlpull.v1.builder.XmlElement;
import xsul.invoker.gsi.GsiInvoker;
@@ -57,7 +56,7 @@ import xsul.xhandler_soap_sticky_header.
import xsul.xwsif_runtime.WSIFClient;
import xsul5.MLogger;
-public class GenericInvoker implements WorkflowInvoker {
+public class GenericInvoker implements Invoker {
private static final MLogger logger = MLogger.getLogger();
@@ -93,8 +92,6 @@ public class GenericInvoker implements W
private WsdlDefinitions wsdlDefinitionObject;
- private XBayaConfiguration configuration;
-
private GsiInvoker secureInvokerFroRetrivingWSDL;
/**
@@ -190,32 +187,23 @@ public class GenericInvoker implements W
this.failerSent = false;
}
- public GenericInvoker(QName portTypeQName, WsdlDefinitions wsdl, String nodeID, String messageBoxURL,
- String gfacURL, NotificationSender notifier, XBayaConfiguration configuration, GsiInvoker secureInvoker) {
- this(portTypeQName, wsdl, nodeID, messageBoxURL, gfacURL, notifier);
- this.configuration = configuration;
- this.secureInvokerFroRetrivingWSDL = secureInvoker;
- }
-
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setup()
*/
public void setup() throws XBayaException {
try {
WsdlDefinitions definitions = null;
if (this.wsdlLocation != null && !this.wsdlLocation.equals("")) {
WsdlResolver resolver = WsdlResolver.getInstance();
- if (-1 != this.wsdlLocation.indexOf("https") && null != secureInvokerFroRetrivingWSDL) {
- resolver.setSecureInvoker(this.secureInvokerFroRetrivingWSDL);
- }
definitions = resolver.loadWsdl(new File(".").toURI(), new URI(this.wsdlLocation));
} else {
definitions = this.wsdlDefinitionObject;
}
- setup(definitions);
-
+ setup(definitions);
+
logger.exiting();
+
} catch (XBayaException e) {
logger.caught(e);
// An appropriate message has been set in the exception.
@@ -259,10 +247,6 @@ public class GenericInvoker implements W
}
StickySoapHeaderHandler handler = new StickySoapHeaderHandler("use-lead-header", leadContext);
- // if(this.configuration != null){
- // leadContext.setMyleadAgentUrl(configuration.getMyLeadAgentURL());
- // leadContext.setXRegistryUrl(configuration.getXRegistryURL());
- // }
// Create Invoker
this.invoker = InvokerFactory.createInvoker(this.portTypeQName, definitions, this.gfacURL, this.messageBoxURL,
@@ -272,10 +256,6 @@ public class GenericInvoker implements W
client.addHandler(handler);
WsdlResolver resolver = WsdlResolver.getInstance();
- if (-1 != this.gfacURL.toString().indexOf("https") && null != secureInvokerFroRetrivingWSDL) {
- resolver.setSecureInvoker(this.secureInvokerFroRetrivingWSDL);
- }
-
// Get the concrete WSDL from invoker.setup() and set it to the
// notifier.
if (this.wsdlLocation != null) {
@@ -287,7 +267,7 @@ public class GenericInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setOperation(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setOperation(java.lang.String)
*/
public void setOperation(String operationName) throws XBayaException {
@@ -315,7 +295,7 @@ public class GenericInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
*/
public void setInput(String name, Object value) throws XBayaException {
logger.entering(new Object[] { name, value });
@@ -346,16 +326,16 @@ public class GenericInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#invoke()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#invoke()
*/
- public synchronized void invoke() throws XBayaException {
+ public synchronized boolean invoke() throws XBayaException {
logger.entering();
try {
WSIFMessage inputMessage = this.invoker.getInputs();
logger.finest("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
- this.notifier.invokingService(inputMessage);
+ //this.notifier.invokingService(inputMessage);
ExecutorService executor = Executors.newSingleThreadExecutor();
this.result = executor.submit(new Callable<Boolean>() {
@@ -412,7 +392,7 @@ public class GenericInvoker implements W
} catch (TimeoutException e) {
// The job is probably running fine.
// The normal case.
- return;
+ return true;
} catch (ExecutionException e) {
// The service-failed notification should have been sent
// already.
@@ -433,10 +413,11 @@ public class GenericInvoker implements W
this.notifier.invocationFailed(message, e);
throw new XBayaException(message, e);
}
+ return true;
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#waitToFinish()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#waitToFinish()
*/
@SuppressWarnings("boxing")
public synchronized void waitToFinish() throws XBayaException {
@@ -483,7 +464,7 @@ public class GenericInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutput(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutput(java.lang.String)
*/
public Object getOutput(String name) throws XBayaException {
logger.entering(new Object[] { name });
@@ -516,10 +497,25 @@ public class GenericInvoker implements W
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutputs()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutputs()
*/
public WSIFMessage getOutputs() throws XBayaException {
return this.invoker.getOutputs();
}
+ @Override
+ public WSIFClient getClient() {
+ return null;
+ }
+
+ @Override
+ public WSIFMessage getInputs() throws XBayaException {
+ return null;
+ }
+
+ @Override
+ public WSIFMessage getFault() throws XBayaException {
+ return null;
+ }
+
}
\ No newline at end of file
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/Invoker.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/Invoker.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/Invoker.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/Invoker.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/Invoker.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/Invoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/Invoker.java Mon Aug 29 21:03:20 2011
@@ -19,11 +19,10 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib.invoker;
+package org.apache.airavata.xbaya.invoker;
import org.apache.airavata.xbaya.XBayaException;
-import xsul.wsdl.WsdlDefinitions;
import xsul.wsif.WSIFMessage;
import xsul.xwsif_runtime.WSIFClient;
@@ -32,11 +31,9 @@ public interface Invoker {
/**
* Sets up the service.
*
- * @return The WSDL definitions
- *
* @throws XBayaException
*/
- public WsdlDefinitions setup() throws XBayaException;
+ public void setup() throws XBayaException;
/**
* @return The WSIFClient.
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/SimpleInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/SimpleInvoker.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/SimpleInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java Mon Aug 29 21:03:20 2011
@@ -19,7 +19,7 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib.invoker;
+package org.apache.airavata.xbaya.invoker;
import java.util.Iterator;
@@ -64,14 +64,13 @@ public class SimpleInvoker implements In
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#setup()
*/
- public WsdlDefinitions setup() throws XBayaException {
+ public void setup() throws XBayaException {
try {
WSIFService service = WSIFServiceFactory.newInstance().getService(this.definitions);
WSIFPort port = service.getPort();
- this.client = WSIFRuntime.getDefault().newClientFor(port);
- return this.definitions;
+ this.client = WSIFRuntime.getDefault().newClientFor(port);
} catch (RuntimeException e) {
String message = "The WSDL is in the wrong format";
throw new XBayaException(message, e);
@@ -79,14 +78,14 @@ public class SimpleInvoker implements In
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getClient()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getClient()
*/
public WSIFClient getClient() {
return this.client;
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#setOperation(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.Invoker#setOperation(java.lang.String)
*/
public void setOperation(String operationName) throws XBayaException {
try {
@@ -102,7 +101,7 @@ public class SimpleInvoker implements In
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#setInput(java.lang.String, java.lang.Object)
+ * @see org.apache.airavata.xbaya.invoker.Invoker#setInput(java.lang.String, java.lang.Object)
*/
public void setInput(String name, Object value) throws XBayaException {
try {
@@ -125,14 +124,14 @@ public class SimpleInvoker implements In
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getInputs()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getInputs()
*/
public WSIFMessage getInputs() {
return this.inputMessage;
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#invoke()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#invoke()
*/
public boolean invoke() throws XBayaException {
try {
@@ -146,14 +145,14 @@ public class SimpleInvoker implements In
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getOutputs()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getOutputs()
*/
public WSIFMessage getOutputs() {
return this.outputMessage;
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getOutput(java.lang.String)
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getOutput(java.lang.String)
*/
public Object getOutput(String name) throws XBayaException {
try {
@@ -187,7 +186,7 @@ public class SimpleInvoker implements In
}
/**
- * @see org.apache.airavata.xbaya.jython.lib.invoker.Invoker#getFault()
+ * @see org.apache.airavata.xbaya.invoker.Invoker#getFault()
*/
public WSIFMessage getFault() {
return this.faultMessage;
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/WorkflowInvokerWrapperForGFacInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/WorkflowInvokerWrapperForGFacInvoker.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/WorkflowInvokerWrapperForGFacInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java Mon Aug 29 21:03:20 2011
@@ -19,7 +19,7 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib.invoker;
+package org.apache.airavata.xbaya.invoker;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
@@ -35,18 +35,16 @@ import org.apache.airavata.xbaya.XBayaEx
import org.apache.airavata.xbaya.XBayaRuntimeException;
import org.apache.airavata.xbaya.jython.lib.ServiceNotificationSender;
import org.apache.airavata.xbaya.util.XMLUtil;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
import org.xmlpull.v1.builder.XmlElement;
import xsul.lead.LeadContextHeader;
import xsul.wsif.WSIFMessage;
import xsul5.MLogger;
-public class WorkflowInvokerWrapperForGFacInvoker implements WorkflowInvoker {
+public class WorkflowInvokerWrapperForGFacInvoker extends GFacInvoker {
private static final MLogger logger = MLogger.getLogger();
- private GFacInvoker invoker;
private ServiceNotificationSender notifier;
private String serviceInformation;
@@ -57,41 +55,18 @@ public class WorkflowInvokerWrapperForGF
public WorkflowInvokerWrapperForGFacInvoker(QName portTypeQName, String gfacURL, String messageBoxURL,
LeadContextHeader leadcontext, ServiceNotificationSender serviceNotificationSender) {
- this.invoker = new GFacInvoker(portTypeQName, gfacURL, messageBoxURL, leadcontext, true);
+ super(portTypeQName, gfacURL, messageBoxURL, leadcontext);
this.notifier = serviceNotificationSender;
this.serviceInformation = portTypeQName.toString();
}
/**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setup()
+ * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#invoke()
*/
- public void setup() throws XBayaException {
-
- this.invoker.setup();
- }
-
- /**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setOperation(java.lang.String)
- */
- public void setOperation(String operationName) throws XBayaException {
- this.invoker.setOperation(operationName);
- }
-
- /**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
- */
- public void setInput(String name, Object value) throws XBayaException {
-
- this.invoker.setInput(name, value);
- }
-
- /**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#invoke()
- */
- public synchronized void invoke() throws XBayaException {
+ public synchronized boolean invoke() throws XBayaException {
try {
- WSIFMessage inputMessage = this.invoker.getInputs();
+ WSIFMessage inputMessage = super.getInputs();
logger.finest("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
this.notifier.invokingService(inputMessage);
@@ -100,17 +75,17 @@ public class WorkflowInvokerWrapperForGF
@SuppressWarnings("boxing")
public Boolean call() {
try {
- boolean success = WorkflowInvokerWrapperForGFacInvoker.this.invoker.invoke();
+ boolean success = WorkflowInvokerWrapperForGFacInvoker.super.invoke();
if (success) {
// Send notification
- WSIFMessage outputMessage = WorkflowInvokerWrapperForGFacInvoker.this.invoker.getOutputs();
+ WSIFMessage outputMessage = WorkflowInvokerWrapperForGFacInvoker.super.getOutputs();
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
// serialize the message XML.
logger.finest("outputMessage: " + outputMessage);
WorkflowInvokerWrapperForGFacInvoker.this.notifier.serviceFinished(outputMessage);
} else {
- WSIFMessage faultMessage = WorkflowInvokerWrapperForGFacInvoker.this.invoker.getFault();
+ WSIFMessage faultMessage = WorkflowInvokerWrapperForGFacInvoker.super.getFault();
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
// serialize the message XML.
@@ -151,7 +126,7 @@ public class WorkflowInvokerWrapperForGF
} catch (TimeoutException e) {
// The job is probably running fine.
// The normal case.
- return;
+ return true;
} catch (ExecutionException e) {
// The service-failed notification should have been sent
// already.
@@ -173,17 +148,18 @@ public class WorkflowInvokerWrapperForGF
throw new XBayaException(message, e);
}
- boolean success = this.invoker.invoke();
+ boolean success = super.invoke();
if (!success) {
try {
throw new Exception("Failed invoking GFac");
} catch (Exception e) {
- notifier.invocationFailed(this.invoker.getFault().toString(), e);
+ notifier.invocationFailed(super.getFault().toString(), e);
}
} else {
- notifier.serviceFinished(this.invoker.getOutputs());
- }
+ notifier.serviceFinished(super.getOutputs());
+ }
+ return success;
}
public synchronized void waitToFinish() throws XBayaException {
@@ -200,7 +176,7 @@ public class WorkflowInvokerWrapperForGF
// Wait for the job to finish.
Boolean success = this.result.get();
if (success == false) {
- WSIFMessage faultMessage = this.invoker.getFault();
+ WSIFMessage faultMessage = super.getFault();
String message = "Error in a service: ";
// An implementation of WSIFMessage,
// WSIFMessageElement, implements toString(), which
@@ -233,7 +209,7 @@ public class WorkflowInvokerWrapperForGF
logger.entering(new Object[] { name });
try {
waitToFinish();
- Object output = this.invoker.getOutput(name);
+ Object output = super.getOutput(name);
if (output instanceof XmlElement) {
logger.finest("output: " + XMLUtil.xmlElementToString((XmlElement) output));
}
@@ -259,45 +235,4 @@ public class WorkflowInvokerWrapperForGF
}
}
- // /**
- // * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutput(java.lang.String)
- // */
- // public Object getOutput(String name) throws XBayaException {
- // 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.getOutputs();
- // 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;
- // }
- // }
- // // 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 XBayaException(message, e);
- // }
- // }
-
- /**
- * @see org.apache.airavata.xbaya.workflow.WorkflowInvoker#getOutputs()
- */
- public WSIFMessage getOutputs() throws XBayaException {
- return this.invoker.getOutputs();
- }
-
}
\ No newline at end of file
Copied: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java (from r1162943, incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/InvokerFactory.java)
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java?p2=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java&p1=incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/InvokerFactory.java&r1=1162943&r2=1163002&rev=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/invoker/InvokerFactory.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java Mon Aug 29 21:03:20 2011
@@ -19,11 +19,15 @@
*
*/
-package org.apache.airavata.xbaya.jython.lib.invoker;
+package org.apache.airavata.xbaya.invoker.factory;
import javax.xml.namespace.QName;
import org.apache.airavata.xbaya.XBayaException;
+import org.apache.airavata.xbaya.invoker.AsynchronousInvoker;
+import org.apache.airavata.xbaya.invoker.GFacInvoker;
+import org.apache.airavata.xbaya.invoker.Invoker;
+import org.apache.airavata.xbaya.invoker.SimpleInvoker;
import org.apache.airavata.xbaya.util.WSDLUtil;
import xsul.lead.LeadContextHeader;
@@ -31,8 +35,6 @@ import xsul.wsdl.WsdlDefinitions;
public class InvokerFactory {
- // private final static MLogger logger = MLogger.getLogger();
-
/**
* @param portTypeQName
* @param definitions
@@ -46,9 +48,6 @@ public class InvokerFactory {
Invoker invoker = null;
if (definitions != null && definitions.getServices().iterator().hasNext()) {
- // The WSDL has a service information. Assume that the service is
- // running.
-
// check if this web service supports asynchronous invocation
if (WSDLUtil.isAsynchronousSupported(WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(definitions))) {
invoker = new AsynchronousInvoker(definitions, messageBoxURL);
@@ -56,18 +55,7 @@ public class InvokerFactory {
invoker = new SimpleInvoker(definitions);
}
} else if (gfacURL != null && gfacURL.length() != 0) {
- // Use the gfacURL set by user first because currently AWSDLs
- // created by GFac has wrong GFac URL.
invoker = new GFacInvoker(portTypeQName, gfacURL, messageBoxURL, leadContext);
- // } else if (definitions != null) {
- // // TODO Remove this case because AWSDL created by GFac won't
- // include
- // // the URL of GFac anymore.
- // XmlElement factoryServicesElement = definitions.element(null,
- // "factoryServices");
- // if (factoryServicesElement != null) {
- // invoker = new GFacInvoker(definitions, messageBoxURL);
- // }
}
if (invoker == null) {
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/script/JythonScript.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/script/JythonScript.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/script/JythonScript.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/script/JythonScript.java Mon Aug 29 21:03:20 2011
@@ -47,7 +47,7 @@ import org.apache.airavata.xbaya.graph.s
import org.apache.airavata.xbaya.graph.system.OutputNode;
import org.apache.airavata.xbaya.graph.util.GraphUtil;
import org.apache.airavata.xbaya.graph.ws.WSNode;
-import org.apache.airavata.xbaya.jython.lib.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.GenericInvoker;
import org.apache.airavata.xbaya.jython.lib.NotificationSender;
import org.apache.airavata.xbaya.util.StringUtil;
import org.apache.airavata.xbaya.wf.Workflow;
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/GFacServiceCreaterTestCase.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/GFacServiceCreaterTestCase.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/GFacServiceCreaterTestCase.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/GFacServiceCreaterTestCase.java Mon Aug 29 21:03:20 2011
@@ -33,8 +33,9 @@ import org.apache.airavata.xbaya.compone
import org.apache.airavata.xbaya.component.registry.ComponentRegistryException;
import org.apache.airavata.xbaya.file.XBayaPathConstants;
import org.apache.airavata.xbaya.graph.GraphException;
+import org.apache.airavata.xbaya.invoker.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.Invoker;
import org.apache.airavata.xbaya.jython.lib.GFacServiceCreator;
-import org.apache.airavata.xbaya.jython.lib.GenericInvoker;
import org.apache.airavata.xbaya.jython.lib.NotificationSender;
import org.apache.airavata.xbaya.jython.script.JythonScript;
import org.apache.airavata.xbaya.test.util.WorkflowCreator;
@@ -42,7 +43,6 @@ import org.apache.airavata.xbaya.util.IO
import org.apache.airavata.xbaya.util.WSDLUtil;
import org.apache.airavata.xbaya.util.XMLUtil;
import org.apache.airavata.xbaya.wf.Workflow;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
import xsul5.MLogger;
@@ -71,7 +71,7 @@ public class GFacServiceCreaterTestCase
*/
public void testService() throws XBayaException {
NotificationSender notifier = new NotificationSender(this.configuration.getBrokerURL(), "test-topic2");
- WorkflowInvoker invoker = new GenericInvoker(QName.valueOf(TEST_SERVICE_QNAME), TEST_AWSDL, "test-node", null,
+ Invoker invoker = new GenericInvoker(QName.valueOf(TEST_SERVICE_QNAME), TEST_AWSDL, "test-node", null,
this.configuration.getGFacURL().toString(), notifier);
invoker.setup();
invoker.setOperation("Run");
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/jython/JythonLibraryTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/jython/JythonLibraryTest.java?rev=1163002&r1=1163001&r2=1163002&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/jython/JythonLibraryTest.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/jython/JythonLibraryTest.java Mon Aug 29 21:03:20 2011
@@ -25,11 +25,11 @@ import junit.framework.TestCase;
import org.apache.airavata.xbaya.XBayaConstants;
import org.apache.airavata.xbaya.XBayaException;
-import org.apache.airavata.xbaya.jython.lib.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.Invoker;
import org.apache.airavata.xbaya.jython.lib.NotificationSender;
import org.apache.airavata.xbaya.test.service.adder.AdderService;
import org.apache.airavata.xbaya.test.service.multiplier.MultiplierService;
-import org.apache.airavata.xbaya.workflow.WorkflowInvoker;
import xsul5.MLogger;
@@ -49,7 +49,7 @@ public class JythonLibraryTest extends T
NotificationSender notifier = new NotificationSender(XBayaConstants.DEFAULT_BROKER_URL.toString(), "test-topic");
- WorkflowInvoker invoker = new GenericInvoker(null, adderWSDLLoc, "adder", null, null, notifier);
+ Invoker invoker = new GenericInvoker(null, adderWSDLLoc, "adder", null, null, notifier);
invoker.setup();
invoker.setOperation("add");
invoker.setInput("x", 2);
@@ -78,7 +78,7 @@ public class JythonLibraryTest extends T
NotificationSender notifier = new NotificationSender(XBayaConstants.DEFAULT_BROKER_URL.toString(), "test-topic");
- WorkflowInvoker adderInvoker1 = new GenericInvoker(null, adderWSDLLoc, "adder", null, null, notifier);
+ Invoker adderInvoker1 = new GenericInvoker(null, adderWSDLLoc, "adder", null, null, notifier);
adderInvoker1.setup();
adderInvoker1.setOperation("add");
adderInvoker1.setInput("x", 2);
@@ -88,7 +88,7 @@ public class JythonLibraryTest extends T
Object output1 = adderInvoker1.getOutput("z");
logger.info("output1 = " + output1);
- WorkflowInvoker adderInvoker2 = new GenericInvoker(null, adderWSDLLoc, "adder", null, null, notifier);
+ Invoker adderInvoker2 = new GenericInvoker(null, adderWSDLLoc, "adder", null, null, notifier);
adderInvoker2.setup();
adderInvoker2.setOperation("add");
adderInvoker2.setInput("x", 4);
@@ -98,7 +98,7 @@ public class JythonLibraryTest extends T
Object output2 = adderInvoker2.getOutput("z");
logger.info("output2 = " + output2);
- WorkflowInvoker multiplierInvoker = new GenericInvoker(null, multiplierWSDLLoc, "multiplier", null, null,
+ Invoker multiplierInvoker = new GenericInvoker(null, multiplierWSDLLoc, "multiplier", null, null,
notifier);
multiplierInvoker.setup();
multiplierInvoker.setOperation("multiply");