You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2011/12/13 17:35:52 UTC

svn commit: r1213773 [3/3] - in /incubator/airavata/trunk/modules: commons/utils/src/main/java/org/apache/airavata/common/utils/ xbaya-gui/src/main/java/org/apache/airavata/xbaya/ xbaya-gui/src/main/java/org/apache/airavata/xbaya/component/dynamic/ xba...

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java?rev=1213773&r1=1213772&r2=1213773&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java Tue Dec 13 16:35:51 2011
@@ -99,8 +99,6 @@ public class GenericInvoker implements I
      *            The URL of WSDL of the service to invoke
      * @param nodeID
      *            The ID of the service
-     * @param gfacURL
-     *            The URL of GFac service.
      * @param notifier
      *            The notification sender
      */
@@ -179,7 +177,8 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setup()
+     *
+     * @throws XBayaException
      */
     public void setup() throws XBayaException {
         try {
@@ -213,7 +212,7 @@ public class GenericInvoker implements I
             String message = "Error in processing the WSDL: " + this.serviceInformation;
             this.notifier.invocationFailed(message, e);
             throw new XBayaException(message, e);
-        } catch (Error e) {
+        }catch (Error e) {
             logger.error(e.getMessage(), e);
             String message = "Unexpected error: " + this.serviceInformation;
             this.notifier.invocationFailed(message, e);
@@ -260,7 +259,10 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setOperation(java.lang.String)
+     *
+     * @param operationName
+     *            The name of the operation
+     * @throws XBayaException
      */
     public void setOperation(String operationName) throws XBayaException {
         try {
@@ -284,7 +286,12 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#setInput(java.lang.String, java.lang.Object)
+     *
+     * @param name
+     *            The name of the input parameter
+     * @param value
+     *            The value of the input parameter
+     * @throws XBayaException
      */
     public void setInput(String name, Object value) throws XBayaException {
         try {
@@ -313,7 +320,9 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#invoke()
+     *
+     * @return
+     * @throws XBayaException
      */
     public synchronized boolean invoke() throws XBayaException {
         try {
@@ -399,7 +408,8 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#waitToFinish()
+     *
+     * @throws XBayaException
      */
     @SuppressWarnings("boxing")
     public synchronized void waitToFinish() throws XBayaException {
@@ -444,7 +454,11 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutput(java.lang.String)
+     *
+     * @param name
+     *            The name of the output parameter
+     * @return
+     * @throws XBayaException
      */
     public Object getOutput(String name) throws XBayaException {
         try {
@@ -475,7 +489,9 @@ public class GenericInvoker implements I
     }
 
     /**
-     * @see org.apache.airavata.xbaya.invoker.WorkflowInvoker#getOutputs()
+     *
+     * @return
+     * @throws XBayaException
      */
     public WSIFMessage getOutputs() throws XBayaException {
         return this.invoker.getOutputs();

Added: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java?rev=1213773&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java (added)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java Tue Dec 13 16:35:51 2011
@@ -0,0 +1,311 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+*/
+package org.apache.airavata.xbaya.util;
+
+import org.apache.airavata.xbaya.XBayaException;
+import org.apache.airavata.xbaya.XBayaRuntimeException;
+import org.apache.airavata.xbaya.graph.DataPort;
+import org.apache.airavata.xbaya.graph.Node;
+import org.apache.airavata.xbaya.graph.amazon.InstanceNode;
+import org.apache.airavata.xbaya.graph.system.*;
+import org.apache.airavata.xbaya.interpretor.SystemComponentInvoker;
+import org.apache.airavata.xbaya.interpretor.WorkFlowInterpreterException;
+import org.apache.airavata.xbaya.invoker.GenericInvoker;
+import org.apache.airavata.xbaya.invoker.Invoker;
+import org.apache.airavata.xbaya.invoker.WorkflowInvokerWrapperForGFacInvoker;
+import org.xmlpull.infoset.XmlElement;
+import xsul5.XmlConstants;
+
+import java.util.*;
+
+public class InterpreterUtil {
+    /**
+     * This method returns the input values for given foreach node
+     * @param forEachNode
+     * @param listOfValues
+     * @param invokerMap
+     * @return
+     * @throws XBayaException
+     */
+    public static Object getInputsForForEachNode(final ForEachNode forEachNode,
+			final LinkedList<String> listOfValues, Map<Node, Invoker> invokerMap) throws XBayaException {
+        List<DataPort> inputPorts = forEachNode.getInputPorts();
+
+        Object returnValForProvenance = null;
+        for(DataPort inputPort:inputPorts){
+
+
+            Node forEachInputNode = inputPort.getFromNode();
+            // if input node for for-each is WSNode
+		if (forEachInputNode instanceof InputNode) {
+			for (DataPort dataPort : forEachNode.getInputPorts()) {
+				returnValForProvenance = InterpreterUtil
+						.findInputFromPort(dataPort, invokerMap);
+				if (null == returnValForProvenance) {
+					throw new WorkFlowInterpreterException(
+							"Unable to find input for the node:"
+									+ forEachNode.getID());
+				}
+				String[] vals = returnValForProvenance.toString().split(",");
+				listOfValues.addAll(Arrays.asList(vals));
+			}
+		} else {
+			Invoker workflowInvoker = invokerMap
+					.get(forEachInputNode);
+			if (workflowInvoker != null) {
+				if (workflowInvoker instanceof GenericInvoker) {
+
+					returnValForProvenance = ((GenericInvoker) workflowInvoker)
+							.getOutputs();
+					String message = returnValForProvenance.toString();
+
+					XmlElement msgElmt = XmlConstants.BUILDER
+							.parseFragmentFromString(message);
+					Iterator children = msgElmt.children().iterator();
+					while (children.hasNext()) {
+						Object object = children.next();
+						// foreachWSNode.getInputPort(0).getType()
+						if (object instanceof XmlElement) {
+							listOfValues.add(XmlConstants.BUILDER
+									.serializeToString(object));
+							// TODO fix for simple type - Done
+						}
+					}
+				} else if (workflowInvoker instanceof WorkflowInvokerWrapperForGFacInvoker) {
+					String outputName = forEachInputNode.getOutputPort(0)
+							.getName();
+					returnValForProvenance = workflowInvoker
+							.getOutput(outputName);
+					org.xmlpull.v1.builder.XmlElement msgElmt = (org.xmlpull.v1.builder.XmlElement) returnValForProvenance;
+					Iterator children = msgElmt.children();
+					while (children.hasNext()) {
+						Object object = children.next();
+						if (object instanceof org.xmlpull.v1.builder.XmlElement) {
+							org.xmlpull.v1.builder.XmlElement child = (org.xmlpull.v1.builder.XmlElement) object;
+							Iterator valItr = child.children();
+							if (valItr.hasNext()) {
+								Object object2 = valItr.next();
+								if (object2 instanceof String) {
+									listOfValues.add(object2.toString());
+								}
+							}
+						}
+					}
+				} else if (workflowInvoker instanceof SystemComponentInvoker) {
+					String outputName = forEachInputNode.getOutputPort(0)
+							.getName();
+					returnValForProvenance = workflowInvoker
+							.getOutput(outputName);
+					XmlElement msgElmt = XmlConstants.BUILDER
+							.parseFragmentFromString("<temp>"
+									+ returnValForProvenance + "</temp>");
+					Iterator valItr = msgElmt.children().iterator();
+					while (valItr.hasNext()) {
+						Object object2 = valItr.next();
+						if (object2 instanceof XmlElement) {
+							listOfValues.add(((XmlElement) object2).children()
+									.iterator().next().toString());
+						}
+					}
+				}
+			} else {
+				throw new WorkFlowInterpreterException(
+						"Did not find inputs from WS to foreach");
+			}
+		}
+        }
+		return returnValForProvenance;
+	}
+
+    /**
+     *
+     * @param inputPort
+     * @param invokerMap
+     * @return
+     * @throws XBayaException
+     */
+	public static Object  findInputFromPort(DataPort inputPort, Map<Node,Invoker>  invokerMap) throws XBayaException {
+		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
+							+ ","
+							+ ((XmlElement) object2).children().iterator()
+									.next().toString();
+				}
+			}
+
+            if (((String) outputVal).length() == 0) {
+                throw new XBayaException("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;
+
+	}
+
+	/**
+	 * @param node
+	 * @return
+	 */
+	public static Node findEndForEachFor(ForEachNode node) {
+
+		Collection<Node> toNodes = node.getOutputPort(0).getToNodes();
+		if(toNodes.size() != 1){
+			throw new XBayaRuntimeException("ForEach output does not contain single out-edge");
+		}
+		Node middleNode = toNodes.iterator().next();
+		List<DataPort> outputPorts = middleNode.getOutputPorts();
+		for (DataPort dataPort : outputPorts) {
+			if(dataPort.getToNodes().size() == 1){
+				Node possibleEndForEachNode = dataPort.getToNodes().get(0);
+				if(possibleEndForEachNode instanceof EndForEachNode){
+					return possibleEndForEachNode;
+				}
+			}
+		}
+		throw new XBayaRuntimeException("EndForEachNode not found");
+	}
+
+    public static Integer[] getNumberOfInputsForForEachNode(final ForEachNode forEachNode,
+                                                            Map<Node,Invoker> invokerMap) throws XBayaException {
+        List<DataPort> inputPorts = forEachNode.getInputPorts();
+        Integer[] inputNumbers = new Integer[inputPorts.size()];
+        for(DataPort forEachInputPort:inputPorts){
+            // if input node for for-each is WSNode
+            Node forEachInputNode = forEachInputPort.getFromNode();
+            int index = 0;
+            Object returnValForProvenance = null;
+            if (forEachInputNode instanceof InputNode) {
+                returnValForProvenance = InterpreterUtil
+                        .findInputFromPort(forEachInputPort, invokerMap);
+                if (null == returnValForProvenance) {
+                    throw new WorkFlowInterpreterException(
+                            "Unable to find input for the node:"
+                                    + forEachNode.getID());
+                }
+                String[] vals = returnValForProvenance.toString().split(",");
+                inputNumbers[inputPorts.indexOf(forEachInputPort)] = vals.length;
+        } else {
+			Invoker workflowInvoker = invokerMap
+					.get(forEachInputNode);
+			if (workflowInvoker != null) {
+				if (workflowInvoker instanceof GenericInvoker) {
+
+					returnValForProvenance = ((GenericInvoker) workflowInvoker)
+							.getOutputs();
+					String message = returnValForProvenance.toString();
+
+					XmlElement msgElmt = XmlConstants.BUILDER
+							.parseFragmentFromString(message);
+					Iterator children = msgElmt.children().iterator();
+					while (children.hasNext()) {
+						Object object = children.next();
+						// foreachWSNode.getInputPort(0).getType()
+						if (object instanceof XmlElement) {
+							index++;
+						}
+					}
+				} else if (workflowInvoker instanceof WorkflowInvokerWrapperForGFacInvoker) {
+
+                    String outputName = forEachInputNode.getOutputPort(0).getName();
+					returnValForProvenance = workflowInvoker
+							.getOutput(outputName);
+					org.xmlpull.v1.builder.XmlElement msgElmt = (org.xmlpull.v1.builder.XmlElement) returnValForProvenance;
+					Iterator children = msgElmt.children();
+					while (children.hasNext()) {
+						Object object = children.next();
+						if (object instanceof org.xmlpull.v1.builder.XmlElement) {
+							org.xmlpull.v1.builder.XmlElement child = (org.xmlpull.v1.builder.XmlElement) object;
+							Iterator valItr = child.children();
+							if (valItr.hasNext()) {
+								Object object2 = valItr.next();
+								if (object2 instanceof String) {
+									index++;
+								}
+							}
+						}
+					}
+                        inputNumbers[inputPorts.indexOf(forEachInputPort)] = index;
+				} else if (workflowInvoker instanceof SystemComponentInvoker) {
+
+					String outputName = forEachInputNode.getOutputPort(0)
+							.getName();
+					returnValForProvenance = workflowInvoker
+							.getOutput(outputName);
+					XmlElement msgElmt = XmlConstants.BUILDER
+							.parseFragmentFromString("<temp>"
+									+ returnValForProvenance + "</temp>");
+					Iterator valItr = msgElmt.children().iterator();
+					while (valItr.hasNext()) {
+						Object object2 = valItr.next();
+						if (object2 instanceof XmlElement) {
+							index++;
+						}
+					}
+                        inputNumbers[inputPorts.indexOf(forEachInputPort)] = index;
+				}
+
+            } else {
+				throw new WorkFlowInterpreterException(
+						"Did not find inputs from WS to foreach");
+			}
+        }
+    }
+        return inputNumbers;
+    }
+}

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/WorkflowTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/WorkflowTest.java?rev=1213773&r1=1213772&r2=1213773&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/WorkflowTest.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/test/java/org/apache/airavata/xbaya/interpreter/WorkflowTest.java Tue Dec 13 16:35:51 2011
@@ -1,29 +1,30 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
 package org.apache.airavata.xbaya.interpreter;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.nio.MappedByteBuffer;
@@ -49,73 +50,73 @@ import org.junit.Test;
 
 public class WorkflowTest implements HeaderConstants {
 
-    @Test
-    public void testScheduleDynamically() throws IOException, URISyntaxException, XBayaException {
-
-        Workflow workflow = new Workflow(readWorkflow("SimpleEcho.xwf"));
-        ListenerManager manager = axis2ServiceStarter();
-        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
-        WorkflowInterpreter interpretor = new WorkflowInterpreter(getConfiguration(), UUID.randomUUID().toString(),
-                workflow, "NA", "NA", true);
-        interpretor.scheduleDynamically();
-        manager.stop();
-    }
-
-    private XBayaConfiguration getConfiguration() throws URISyntaxException {
-        NameValue[] configurations = new NameValue[6];
-        configurations[0] = new NameValue();
-        configurations[0].setName(HEADER_ELEMENT_GFAC);
-        configurations[0].setValue(XBayaConstants.DEFAULT_GFAC_URL.toString());
-        configurations[1] = new NameValue();
-        configurations[1].setName(HEADER_ELEMENT_REGISTRY);
-        configurations[1].setValue(XBayaConstants.REGISTRY_URL.toASCIIString());
-        configurations[2] = new NameValue();
-        configurations[2].setName(HEADER_ELEMENT_PROXYSERVER);
-        configurations[2].setValue(XBayaConstants.DEFAULT_MYPROXY_SERVER);
-
-        configurations[3] = new NameValue();
-        configurations[3].setName(HEADER_ELEMENT_MSGBOX);
-        configurations[3].setValue(XBayaConstants.DEFAULT_MESSAGE_BOX_URL.toString());
-
-        configurations[4] = new NameValue();
-        configurations[4].setName(HEADER_ELEMENT_DSC);
-        configurations[4].setValue(XBayaConstants.DEFAULT_DSC_URL.toString());
-
-        configurations[5] = new NameValue();
-        configurations[5].setName(HEADER_ELEMENT_BROKER);
-        configurations[5].setValue(XBayaConstants.DEFAULT_BROKER_URL.toString());
-        return WorkflowInterpretorSkeleton.getConfiguration(configurations);
-    }
-
-    private String readWorkflow(String workflowFileNameInClasspath) throws IOException, URISyntaxException {
-
-        URL url = this.getClass().getClassLoader().getSystemResource(workflowFileNameInClasspath);
-        FileInputStream stream = new FileInputStream(new File(url.toURI()));
-        try {
-            FileChannel fc = stream.getChannel();
-            MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
-            /* Instead of using default, pass in a decoder. */
-            return Charset.defaultCharset().decode(bb).toString();
-        } finally {
-            stream.close();
-        }
-
-    }
-
-    private ListenerManager axis2ServiceStarter() throws AxisFault {
-        try {
-            ConfigurationContext configContext = ConfigurationContextFactory
-                    .createBasicConfigurationContext("axis2_default.xml");
-            AxisService service = AxisService.createService(EchoService.class.getName(),
-                    configContext.getAxisConfiguration());
-            configContext.deployService(service);
-            ListenerManager manager = new ListenerManager();
-            manager.init(configContext);
-            manager.start();
-            return manager;
-        } catch (Exception e) {
-            throw AxisFault.makeFault(e);
-        }
-    }
+//      @Test
+//    public void testScheduleDynamically() throws IOException, URISyntaxException, XBayaException {
+//
+//        Workflow workflow = new Workflow(readWorkflow("SimpleEcho.xwf"));
+//        ListenerManager manager = axis2ServiceStarter();
+//        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
+//        WorkflowInterpreter interpretor = new WorkflowInterpreter(getConfiguration(), UUID.randomUUID().toString(),
+//                workflow, "NA", "NA");
+//        interpretor.scheduleDynamically();
+//        manager.stop();
+//    }
+//
+//    private XBayaConfiguration getConfiguration() throws URISyntaxException {
+//        NameValue[] configurations = new NameValue[6];
+//        configurations[0] = new NameValue();
+//        configurations[0].setName(HEADER_ELEMENT_GFAC);
+//        configurations[0].setValue(XBayaConstants.DEFAULT_GFAC_URL.toString());
+//        configurations[1] = new NameValue();
+//        configurations[1].setName(HEADER_ELEMENT_REGISTRY);
+//        configurations[1].setValue(XBayaConstants.REGISTRY_URL.toASCIIString());
+//        configurations[2] = new NameValue();
+//        configurations[2].setName(HEADER_ELEMENT_PROXYSERVER);
+//        configurations[2].setValue(XBayaConstants.DEFAULT_MYPROXY_SERVER);
+//
+//        configurations[3] = new NameValue();
+//        configurations[3].setName(HEADER_ELEMENT_MSGBOX);
+//        configurations[3].setValue(XBayaConstants.DEFAULT_MESSAGE_BOX_URL.toString());
+//
+//        configurations[4] = new NameValue();
+//        configurations[4].setName(HEADER_ELEMENT_DSC);
+//        configurations[4].setValue(XBayaConstants.DEFAULT_DSC_URL.toString());
+//
+//        configurations[5] = new NameValue();
+//        configurations[5].setName(HEADER_ELEMENT_BROKER);
+//        configurations[5].setValue(XBayaConstants.DEFAULT_BROKER_URL.toString());
+//        return WorkflowInterpretorSkeleton.getConfiguration(configurations);
+//    }
+//
+//    private String readWorkflow(String workflowFileNameInClasspath) throws IOException, URISyntaxException {
+//
+//        URL url = this.getClass().getClassLoader().getSystemResource(workflowFileNameInClasspath);
+//        FileInputStream stream = new FileInputStream(new File(url.toURI()));
+//        try {
+//            FileChannel fc = stream.getChannel();
+//            MappedByteBuffer bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, fc.size());
+//            /* Instead of using default, pass in a decoder. */
+//            return Charset.defaultCharset().decode(bb).toString();
+//        } finally {
+//            stream.close();
+//        }
+//
+//    }
+//
+//    private ListenerManager axis2ServiceStarter() throws AxisFault {
+//        try {
+//            ConfigurationContext configContext = ConfigurationContextFactory
+//                    .createBasicConfigurationContext("axis2_default.xml");
+//            AxisService service = AxisService.createService(EchoService.class.getName(),
+//                    configContext.getAxisConfiguration());
+//            configContext.deployService(service);
+//            ListenerManager manager = new ListenerManager();
+//            manager.init(configContext);
+//            manager.start();
+//            return manager;
+//        } catch (Exception e) {
+//            throw AxisFault.makeFault(e);
+//        }
+//    }
 
 }