You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2011/10/22 21:30:07 UTC

svn commit: r1187758 [11/15] - in /incubator/airavata/trunk: ./ modules/commons/gfac-schema/src/main/java/org/apache/airavata/commons/gfac/type/app/ modules/commons/registry-api/src/main/java/org/apache/airavata/registry/api/ modules/commons/registry-a...

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaLinkButton.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaLinkButton.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaLinkButton.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaLinkButton.java Sat Oct 22 19:29:52 2011
@@ -18,278 +18,268 @@ import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.metal.MetalButtonUI;
 
 public class XBayaLinkButton extends JButton {
-	/**
+    /**
 	 * 
 	 */
-	private static final long serialVersionUID = -4827125226349868996L;
+    private static final long serialVersionUID = -4827125226349868996L;
 
-	public static final int ALWAYS_UNDERLINE = 0;
+    public static final int ALWAYS_UNDERLINE = 0;
 
-	public static final int HOVER_UNDERLINE = 1;
+    public static final int HOVER_UNDERLINE = 1;
 
-	public static final int NEVER_UNDERLINE = 2;
+    public static final int NEVER_UNDERLINE = 2;
 
-	public static final int SYSTEM_DEFAULT = 3;
-
-	private int linkBehavior;
-
-	private Color linkColor;
-
-	private Color colorPressed;
-
-	private Color visitedLinkColor;
-
-	private Color disabledLinkColor;
-
-	private URL buttonURL;
-
-	private Action defaultAction;
-
-	private boolean isLinkVisited;
-
-	public static void main(String[] a) {
-		JFrame f = new JFrame();
-		f.getContentPane().setLayout(new GridLayout(0, 2));
-		f.getContentPane().add(new XBayaLinkButton("www.java2s.com"));
-		f.getContentPane().add(
-				new XBayaLinkButton(
-						"www.java2s.com/ExampleCode/CatalogExampleCode.htm"));
-		f.setSize(600, 200);
-		f.setVisible(true);
-	}
-
-	public XBayaLinkButton() {
-		this(null, null, null);
-	}
-
-	public XBayaLinkButton(Action action) {
-		this();
-		setAction(action);
-	}
-
-	public XBayaLinkButton(Icon icon) {
-		this(null, icon, null);
-	}
-
-	public XBayaLinkButton(String s) {
-		this(s, null, null);
-	}
-
-	public XBayaLinkButton(URL url) {
-		this(null, null, url);
-	}
-
-	public XBayaLinkButton(String s, URL url) {
-		this(s, null, url);
-	}
-
-	public XBayaLinkButton(Icon icon, URL url) {
-		this(null, icon, url);
-	}
-
-	public XBayaLinkButton(String text, Icon icon, URL url) {
-		super(text, icon);
-		linkBehavior = SYSTEM_DEFAULT;
-		linkColor = Color.blue;
-		colorPressed = Color.red;
-		visitedLinkColor = new Color(128, 0, 128);
-		if (text == null && url != null)
-			setText(url.toExternalForm());
-		setLinkURL(url);
-		setCursor(Cursor.getPredefinedCursor(12));
-		setBorderPainted(false);
-		setContentAreaFilled(false);
-		setRolloverEnabled(true);
-		addActionListener(defaultAction);
-	}
-
-	public void updateUI() {
-		setUI(BasicLinkButtonUI.createUI(this));
-	}
-
-	public String getUIClassID() {
-		return "LinkButtonUI";
-	}
-
-	protected void setupToolTipText() {
-		String tip = null;
-		if (buttonURL != null)
-			tip = buttonURL.toExternalForm();
-		setToolTipText(tip);
-	}
-
-	public void setLinkBehavior(int bnew) {
-		checkLinkBehaviour(bnew);
-		int old = linkBehavior;
-		linkBehavior = bnew;
-		firePropertyChange("linkBehavior", old, bnew);
-		repaint();
-	}
-
-	private void checkLinkBehaviour(int beha) {
-		if (beha != ALWAYS_UNDERLINE && beha != HOVER_UNDERLINE
-				&& beha != NEVER_UNDERLINE && beha != SYSTEM_DEFAULT)
-			throw new IllegalArgumentException("Not a legal LinkBehavior");
-		else
-			return;
-	}
-
-	public int getLinkBehavior() {
-		return linkBehavior;
-	}
-
-	public void setLinkColor(Color color) {
-		Color colorOld = linkColor;
-		linkColor = color;
-		firePropertyChange("linkColor", colorOld, color);
-		repaint();
-	}
-
-	public Color getLinkColor() {
-		return linkColor;
-	}
-
-	public void setActiveLinkColor(Color colorNew) {
-		Color colorOld = colorPressed;
-		colorPressed = colorNew;
-		firePropertyChange("activeLinkColor", colorOld, colorNew);
-		repaint();
-	}
-
-	public Color getActiveLinkColor() {
-		return colorPressed;
-	}
-
-	public void setDisabledLinkColor(Color color) {
-		Color colorOld = disabledLinkColor;
-		disabledLinkColor = color;
-		firePropertyChange("disabledLinkColor", colorOld, color);
-		if (!isEnabled())
-			repaint();
-	}
-
-	public Color getDisabledLinkColor() {
-		return disabledLinkColor;
-	}
-
-	public void setVisitedLinkColor(Color colorNew) {
-		Color colorOld = visitedLinkColor;
-		visitedLinkColor = colorNew;
-		firePropertyChange("visitedLinkColor", colorOld, colorNew);
-		repaint();
-	}
-
-	public Color getVisitedLinkColor() {
-		return visitedLinkColor;
-	}
-
-	public URL getLinkURL() {
-		return buttonURL;
-	}
-
-	public void setLinkURL(URL url) {
-		URL urlOld = buttonURL;
-		buttonURL = url;
-		setupToolTipText();
-		firePropertyChange("linkURL", urlOld, url);
-		revalidate();
-		repaint();
-	}
-
-	public void setLinkVisited(boolean flagNew) {
-		boolean flagOld = isLinkVisited;
-		isLinkVisited = flagNew;
-		firePropertyChange("linkVisited", flagOld, flagNew);
-		repaint();
-	}
-
-	public boolean isLinkVisited() {
-		return isLinkVisited;
-	}
-
-	public void setDefaultAction(Action actionNew) {
-		Action actionOld = defaultAction;
-		defaultAction = actionNew;
-		firePropertyChange("defaultAction", actionOld, actionNew);
-	}
-
-	public Action getDefaultAction() {
-		return defaultAction;
-	}
-
-	protected String paramString() {
-		String str;
-		if (linkBehavior == ALWAYS_UNDERLINE)
-			str = "ALWAYS_UNDERLINE";
-		else if (linkBehavior == HOVER_UNDERLINE)
-			str = "HOVER_UNDERLINE";
-		else if (linkBehavior == NEVER_UNDERLINE)
-			str = "NEVER_UNDERLINE";
-		else
-			str = "SYSTEM_DEFAULT";
-		String colorStr = linkColor == null ? "" : linkColor.toString();
-		String colorPressStr = colorPressed == null ? "" : colorPressed
-				.toString();
-		String disabledLinkColorStr = disabledLinkColor == null ? ""
-				: disabledLinkColor.toString();
-		String visitedLinkColorStr = visitedLinkColor == null ? ""
-				: visitedLinkColor.toString();
-		String buttonURLStr = buttonURL == null ? "" : buttonURL.toString();
-		String isLinkVisitedStr = isLinkVisited ? "true" : "false";
-		return super.paramString() + ",linkBehavior=" + str + ",linkURL="
-				+ buttonURLStr + ",linkColor=" + colorStr + ",activeLinkColor="
-				+ colorPressStr + ",disabledLinkColor=" + disabledLinkColorStr
-				+ ",visitedLinkColor=" + visitedLinkColorStr
-				+ ",linkvisitedString=" + isLinkVisitedStr;
-	}
+    public static final int SYSTEM_DEFAULT = 3;
+
+    private int linkBehavior;
+
+    private Color linkColor;
+
+    private Color colorPressed;
+
+    private Color visitedLinkColor;
+
+    private Color disabledLinkColor;
+
+    private URL buttonURL;
+
+    private Action defaultAction;
+
+    private boolean isLinkVisited;
+
+    public static void main(String[] a) {
+        JFrame f = new JFrame();
+        f.getContentPane().setLayout(new GridLayout(0, 2));
+        f.getContentPane().add(new XBayaLinkButton("www.java2s.com"));
+        f.getContentPane().add(new XBayaLinkButton("www.java2s.com/ExampleCode/CatalogExampleCode.htm"));
+        f.setSize(600, 200);
+        f.setVisible(true);
+    }
+
+    public XBayaLinkButton() {
+        this(null, null, null);
+    }
+
+    public XBayaLinkButton(Action action) {
+        this();
+        setAction(action);
+    }
+
+    public XBayaLinkButton(Icon icon) {
+        this(null, icon, null);
+    }
+
+    public XBayaLinkButton(String s) {
+        this(s, null, null);
+    }
+
+    public XBayaLinkButton(URL url) {
+        this(null, null, url);
+    }
+
+    public XBayaLinkButton(String s, URL url) {
+        this(s, null, url);
+    }
+
+    public XBayaLinkButton(Icon icon, URL url) {
+        this(null, icon, url);
+    }
+
+    public XBayaLinkButton(String text, Icon icon, URL url) {
+        super(text, icon);
+        linkBehavior = SYSTEM_DEFAULT;
+        linkColor = Color.blue;
+        colorPressed = Color.red;
+        visitedLinkColor = new Color(128, 0, 128);
+        if (text == null && url != null)
+            setText(url.toExternalForm());
+        setLinkURL(url);
+        setCursor(Cursor.getPredefinedCursor(12));
+        setBorderPainted(false);
+        setContentAreaFilled(false);
+        setRolloverEnabled(true);
+        addActionListener(defaultAction);
+    }
+
+    public void updateUI() {
+        setUI(BasicLinkButtonUI.createUI(this));
+    }
+
+    public String getUIClassID() {
+        return "LinkButtonUI";
+    }
+
+    protected void setupToolTipText() {
+        String tip = null;
+        if (buttonURL != null)
+            tip = buttonURL.toExternalForm();
+        setToolTipText(tip);
+    }
+
+    public void setLinkBehavior(int bnew) {
+        checkLinkBehaviour(bnew);
+        int old = linkBehavior;
+        linkBehavior = bnew;
+        firePropertyChange("linkBehavior", old, bnew);
+        repaint();
+    }
+
+    private void checkLinkBehaviour(int beha) {
+        if (beha != ALWAYS_UNDERLINE && beha != HOVER_UNDERLINE && beha != NEVER_UNDERLINE && beha != SYSTEM_DEFAULT)
+            throw new IllegalArgumentException("Not a legal LinkBehavior");
+        else
+            return;
+    }
+
+    public int getLinkBehavior() {
+        return linkBehavior;
+    }
+
+    public void setLinkColor(Color color) {
+        Color colorOld = linkColor;
+        linkColor = color;
+        firePropertyChange("linkColor", colorOld, color);
+        repaint();
+    }
+
+    public Color getLinkColor() {
+        return linkColor;
+    }
+
+    public void setActiveLinkColor(Color colorNew) {
+        Color colorOld = colorPressed;
+        colorPressed = colorNew;
+        firePropertyChange("activeLinkColor", colorOld, colorNew);
+        repaint();
+    }
+
+    public Color getActiveLinkColor() {
+        return colorPressed;
+    }
+
+    public void setDisabledLinkColor(Color color) {
+        Color colorOld = disabledLinkColor;
+        disabledLinkColor = color;
+        firePropertyChange("disabledLinkColor", colorOld, color);
+        if (!isEnabled())
+            repaint();
+    }
+
+    public Color getDisabledLinkColor() {
+        return disabledLinkColor;
+    }
+
+    public void setVisitedLinkColor(Color colorNew) {
+        Color colorOld = visitedLinkColor;
+        visitedLinkColor = colorNew;
+        firePropertyChange("visitedLinkColor", colorOld, colorNew);
+        repaint();
+    }
+
+    public Color getVisitedLinkColor() {
+        return visitedLinkColor;
+    }
+
+    public URL getLinkURL() {
+        return buttonURL;
+    }
+
+    public void setLinkURL(URL url) {
+        URL urlOld = buttonURL;
+        buttonURL = url;
+        setupToolTipText();
+        firePropertyChange("linkURL", urlOld, url);
+        revalidate();
+        repaint();
+    }
+
+    public void setLinkVisited(boolean flagNew) {
+        boolean flagOld = isLinkVisited;
+        isLinkVisited = flagNew;
+        firePropertyChange("linkVisited", flagOld, flagNew);
+        repaint();
+    }
+
+    public boolean isLinkVisited() {
+        return isLinkVisited;
+    }
+
+    public void setDefaultAction(Action actionNew) {
+        Action actionOld = defaultAction;
+        defaultAction = actionNew;
+        firePropertyChange("defaultAction", actionOld, actionNew);
+    }
+
+    public Action getDefaultAction() {
+        return defaultAction;
+    }
+
+    protected String paramString() {
+        String str;
+        if (linkBehavior == ALWAYS_UNDERLINE)
+            str = "ALWAYS_UNDERLINE";
+        else if (linkBehavior == HOVER_UNDERLINE)
+            str = "HOVER_UNDERLINE";
+        else if (linkBehavior == NEVER_UNDERLINE)
+            str = "NEVER_UNDERLINE";
+        else
+            str = "SYSTEM_DEFAULT";
+        String colorStr = linkColor == null ? "" : linkColor.toString();
+        String colorPressStr = colorPressed == null ? "" : colorPressed.toString();
+        String disabledLinkColorStr = disabledLinkColor == null ? "" : disabledLinkColor.toString();
+        String visitedLinkColorStr = visitedLinkColor == null ? "" : visitedLinkColor.toString();
+        String buttonURLStr = buttonURL == null ? "" : buttonURL.toString();
+        String isLinkVisitedStr = isLinkVisited ? "true" : "false";
+        return super.paramString() + ",linkBehavior=" + str + ",linkURL=" + buttonURLStr + ",linkColor=" + colorStr
+                + ",activeLinkColor=" + colorPressStr + ",disabledLinkColor=" + disabledLinkColorStr
+                + ",visitedLinkColor=" + visitedLinkColorStr + ",linkvisitedString=" + isLinkVisitedStr;
+    }
 }
 
 class BasicLinkButtonUI extends MetalButtonUI {
-	private static final BasicLinkButtonUI ui = new BasicLinkButtonUI();
+    private static final BasicLinkButtonUI ui = new BasicLinkButtonUI();
 
-	public BasicLinkButtonUI() {
-	}
+    public BasicLinkButtonUI() {
+    }
 
-	public static ComponentUI createUI(JComponent jcomponent) {
-		return ui;
-	}
-
-	protected void paintText(Graphics g, JComponent com, Rectangle rect,
-			String s) {
-		XBayaLinkButton bn = (XBayaLinkButton) com;
-		ButtonModel bnModel = bn.getModel();
-		if (bnModel.isEnabled()) {
-			if (bnModel.isPressed())
-				bn.setForeground(bn.getActiveLinkColor());
-			else if (bn.isLinkVisited())
-				bn.setForeground(bn.getVisitedLinkColor());
-
-			else
-				bn.setForeground(bn.getLinkColor());
-		} else {
-			if (bn.getDisabledLinkColor() != null)
-				bn.setForeground(bn.getDisabledLinkColor());
-		}
-		super.paintText(g, com, rect, s);
-		int behaviour = bn.getLinkBehavior();
-		boolean drawLine = false;
-		if (behaviour == XBayaLinkButton.HOVER_UNDERLINE) {
-			if (bnModel.isRollover())
-				drawLine = true;
-		} else if (behaviour == XBayaLinkButton.ALWAYS_UNDERLINE
-				|| behaviour == XBayaLinkButton.SYSTEM_DEFAULT)
-			drawLine = true;
-		if (!drawLine)
-			return;
-		FontMetrics fm = g.getFontMetrics();
-		int x = rect.x + getTextShiftOffset();
-		int y = (rect.y + fm.getAscent() + fm.getDescent() + getTextShiftOffset()) - 1;
-		if (bnModel.isEnabled()) {
-			g.setColor(bn.getForeground());
-			g.drawLine(x, y, (x + rect.width) - 1, y);
-		} else {
-			g.setColor(bn.getBackground().brighter());
-			g.drawLine(x, y, (x + rect.width) - 1, y);
-		}
-	}
+    public static ComponentUI createUI(JComponent jcomponent) {
+        return ui;
+    }
+
+    protected void paintText(Graphics g, JComponent com, Rectangle rect, String s) {
+        XBayaLinkButton bn = (XBayaLinkButton) com;
+        ButtonModel bnModel = bn.getModel();
+        if (bnModel.isEnabled()) {
+            if (bnModel.isPressed())
+                bn.setForeground(bn.getActiveLinkColor());
+            else if (bn.isLinkVisited())
+                bn.setForeground(bn.getVisitedLinkColor());
+
+            else
+                bn.setForeground(bn.getLinkColor());
+        } else {
+            if (bn.getDisabledLinkColor() != null)
+                bn.setForeground(bn.getDisabledLinkColor());
+        }
+        super.paintText(g, com, rect, s);
+        int behaviour = bn.getLinkBehavior();
+        boolean drawLine = false;
+        if (behaviour == XBayaLinkButton.HOVER_UNDERLINE) {
+            if (bnModel.isRollover())
+                drawLine = true;
+        } else if (behaviour == XBayaLinkButton.ALWAYS_UNDERLINE || behaviour == XBayaLinkButton.SYSTEM_DEFAULT)
+            drawLine = true;
+        if (!drawLine)
+            return;
+        FontMetrics fm = g.getFontMetrics();
+        int x = rect.x + getTextShiftOffset();
+        int y = (rect.y + fm.getAscent() + fm.getDescent() + getTextShiftOffset()) - 1;
+        if (bnModel.isEnabled()) {
+            g.setColor(bn.getForeground());
+            g.drawLine(x, y, (x + rect.width) - 1, y);
+        } else {
+            g.setColor(bn.getBackground().brighter());
+            g.drawLine(x, y, (x + rect.width) - 1, y);
+        }
+    }
 }

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaMenu.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaMenu.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaMenu.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/gui/XBayaMenu.java Sat Oct 22 19:29:52 2011
@@ -65,7 +65,7 @@ public class XBayaMenu implements XBayaC
 
     private MonitorMenu monitorMenu;
 
-//    private MyProxyMenu myProxyMenu;
+    // private MyProxyMenu myProxyMenu;
 
     private RegisterApplicationsMenu registerApplications;
 
@@ -83,7 +83,7 @@ public class XBayaMenu implements XBayaC
         this.amazonEC2Menu = new AmazonEC2Menu(this.engine);
         this.componentMenu = new ComponentMenu(this.engine);
         this.monitorMenu = new MonitorMenu(this.engine);
-//        this.myProxyMenu = new MyProxyMenu(this.engine);
+        // this.myProxyMenu = new MyProxyMenu(this.engine);
         this.registerApplications = new RegisterApplicationsMenu(this.engine);
 
         createMenuBar();
@@ -110,7 +110,7 @@ public class XBayaMenu implements XBayaC
         this.menuBar.add(this.componentMenu.getMenu());
         this.menuBar.add(this.experimentMenu.getMenu());
         this.menuBar.add(this.amazonEC2Menu.getMenu());
-//        this.menuBar.add(this.myProxyMenu.getMenu());
+        // this.menuBar.add(this.myProxyMenu.getMenu());
         this.menuBar.add(this.monitorMenu.getMenu());
         this.menuBar.add(this.registerApplications.getMenu());
 

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/NameValue.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/NameValue.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/NameValue.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/NameValue.java Sat Oct 22 19:29:52 2011
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  *
-*/
+ */
 package org.apache.airavata.xbaya.interpretor;
 
 // http://silktree.cs.indiana.edu:18080/axis2/services/WorkflowInterpretor
@@ -41,14 +41,14 @@ public class NameValue implements org.ap
     protected String localName;
 
     /*
-     * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
-     * be used to determine whether to include this field in the serialized XML
+     * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will be
+     * used to determine whether to include this field in the serialized XML
      */
     protected boolean localNameTracker = false;
 
     /**
      * Auto generated getter method
-     *
+     * 
      * @return java.lang.String
      */
     public String getName() {
@@ -57,7 +57,7 @@ public class NameValue implements org.ap
 
     /**
      * Auto generated setter method
-     *
+     * 
      * @param param
      *            Name
      */
@@ -82,14 +82,14 @@ public class NameValue implements org.ap
     protected String localValue;
 
     /*
-     * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will
-     * be used to determine whether to include this field in the serialized XML
+     * This tracker boolean wil be used to detect whether the user called the set method for this attribute. It will be
+     * used to determine whether to include this field in the serialized XML
      */
     protected boolean localValueTracker = false;
 
     /**
      * Auto generated getter method
-     *
+     * 
      * @return java.lang.String
      */
     public String getValue() {
@@ -98,7 +98,7 @@ public class NameValue implements org.ap
 
     /**
      * Auto generated setter method
-     *
+     * 
      * @param param
      *            Value
      */
@@ -118,7 +118,7 @@ public class NameValue implements org.ap
 
     /**
      * isReaderMTOMAware
-     *
+     * 
      * @return true if the reader supports MTOM
      */
     public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
@@ -134,7 +134,7 @@ public class NameValue implements org.ap
     }
 
     /**
-     *
+     * 
      * @param parentQName
      * @param factory
      * @return org.apache.axiom.om.OMElement
@@ -142,8 +142,7 @@ public class NameValue implements org.ap
     public org.apache.axiom.om.OMElement getOMElement(final javax.xml.namespace.QName parentQName,
             final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException {
 
-        org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(this,
-                parentQName) {
+        org.apache.axiom.om.OMDataSource dataSource = new org.apache.axis2.databinding.ADBDataSource(this, parentQName) {
 
             public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
                     throws javax.xml.stream.XMLStreamException {
@@ -271,9 +270,8 @@ public class NameValue implements org.ap
     /**
      * Util method to write an attribute with the ns prefix
      */
-    private void writeAttribute(String prefix, String namespace, String attName,
-            String attValue, javax.xml.stream.XMLStreamWriter xmlWriter)
-            throws javax.xml.stream.XMLStreamException {
+    private void writeAttribute(String prefix, String namespace, String attName, String attValue,
+            javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
         if (xmlWriter.getPrefix(namespace) == null) {
             xmlWriter.writeNamespace(prefix, namespace);
             xmlWriter.setPrefix(prefix, namespace);
@@ -300,9 +298,8 @@ public class NameValue implements org.ap
     /**
      * Util method to write an attribute without the ns prefix
      */
-    private void writeQNameAttribute(String namespace, String attName,
-            javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter)
-            throws javax.xml.stream.XMLStreamException {
+    private void writeQNameAttribute(String namespace, String attName, javax.xml.namespace.QName qname,
+            javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
 
         String attributeNamespace = qname.getNamespaceURI();
         String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
@@ -377,17 +374,14 @@ public class NameValue implements org.ap
                     }
 
                     if (prefix.trim().length() > 0) {
-                        stringToWrite
-                                .append(prefix)
-                                .append(":")
+                        stringToWrite.append(prefix).append(":")
                                 .append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
                     } else {
                         stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
                                 .convertToString(qnames[i]));
                     }
                 } else {
-                    stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil
-                            .convertToString(qnames[i]));
+                    stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
                 }
             }
             xmlWriter.writeCharacters(stringToWrite.toString());
@@ -418,7 +412,7 @@ public class NameValue implements org.ap
 
     /**
      * databinding method to get an XML representation of this object
-     *
+     * 
      */
     public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
             throws org.apache.axis2.databinding.ADBException {
@@ -451,10 +445,10 @@ public class NameValue implements org.ap
 
         /**
          * static method to create the object Precondition: If this object is an element, the current or next start
-         * element starts this object and any intervening reader events are ignorable If this object is not an
-         * element, it is a complex type and the reader is at the event just after the outer start element
-         * Postcondition: If this object is an element, the reader is positioned at its end element If this object
-         * is a complex type, the reader is positioned at the end element of its outer element
+         * element starts this object and any intervening reader events are ignorable If this object is not an element,
+         * it is a complex type and the reader is at the event just after the outer start element Postcondition: If this
+         * object is an element, the reader is positioned at its end element If this object is a complex type, the
+         * reader is positioned at the end element of its outer element
          */
         public static NameValue parse(javax.xml.stream.XMLStreamReader reader) throws Exception {
             NameValue object = new NameValue();
@@ -466,8 +460,7 @@ public class NameValue implements org.ap
                     reader.next();
 
                 if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type") != null) {
-                    String fullTypeName = reader.getAttributeValue(
-                            "http://www.w3.org/2001/XMLSchema-instance", "type");
+                    String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance", "type");
                     if (fullTypeName != null) {
                         String nsPrefix = null;
                         if (fullTypeName.indexOf(":") > -1) {
@@ -480,7 +473,8 @@ public class NameValue implements org.ap
                         if (!"NameValue".equals(type)) {
                             // find namespace for the prefix
                             String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
-                            return (NameValue) WorkflowInterpretorStub.ExtensionMapper.getTypeObject(nsUri, type, reader);
+                            return (NameValue) WorkflowInterpretorStub.ExtensionMapper.getTypeObject(nsUri, type,
+                                    reader);
                         }
 
                     }

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/StandaloneNotificationSender.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/StandaloneNotificationSender.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/StandaloneNotificationSender.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/StandaloneNotificationSender.java Sat Oct 22 19:29:52 2011
@@ -17,91 +17,88 @@ import org.apache.axis2.addressing.Endpo
 import org.python.core.PyObject;
 
 public class StandaloneNotificationSender implements WorkflowNotifiable {
-	
-	
 
-	private Workflow workflow;
-	private URI workflowID;
+    private Workflow workflow;
+    private URI workflowID;
 
-	public StandaloneNotificationSender(String topic,
-			Workflow workflow) {
-		this.workflow = workflow;
-		this.workflowID = URI.create(StringUtil.convertToJavaIdentifier(topic));
-	}
-
-	@Override
-	public EndpointReference getEventSink() {
-		return new EndpointReference(XBayaConstants.DEFAULT_BROKER_URL.toString());
-	}
-
-	@Override
-	public void workflowStarted(PyObject[] args, String[] keywords) {
-		List<InputNode> inputs = GraphUtil.getInputNodes(this.workflow.getGraph());
-		for (InputNode inputNode : inputs) {
-			inputNode.getGUI().setBodyColor(NodeState.FINISHED.color);
-		}
-		
-	}
-
-	@Override
-	public void workflowStarted(Object[] args, String[] keywords) {
-		List<InputNode> inputs = GraphUtil.getInputNodes(this.workflow.getGraph());
-		for (InputNode inputNode : inputs) {
-			inputNode.getGUI().setBodyColor(NodeState.FINISHED.color);
-		}
-	}
-
-	@Override
-	public void workflowFinished(Object[] args, String[] keywords) {
-		List<OutputNode> outputs = GraphUtil.getOutputNodes(this.workflow.getGraph());
-		for (OutputNode outputNode : outputs) {
-			outputNode.getGUI().setBodyColor(NodeState.EXECUTING.color);
-		}
-
-	}
-
-	@Override
-	public void sendingPartialResults(Object[] args, String[] keywords) {
-		// noop
-
-	}
-
-	@Override
-	public void workflowFinished(PyObject[] args, String[] keywords) {
-		List<OutputNode> outputs = GraphUtil.getOutputNodes(this.workflow.getGraph());
-		for (OutputNode outputNode : outputs) {
-			outputNode.getGUI().setBodyColor(NodeState.EXECUTING.color);
-		}
-
-	}
-
-	@Override
-	public void workflowTerminated() {
-		// noop
-
-	}
-
-	@Override
-	public void workflowFailed(String message) {
-		// noop
-
-	}
-
-	@Override
-	public void workflowFailed(Throwable e) {
-		//noop
-
-	}
-
-	@Override
-	public void workflowFailed(String message, Throwable e) {
-		//noop
-
-	}
-
-	@Override
-	public ServiceNotifiable createServiceNotificationSender(String nodeID) {
-		return new StandaloneServiceNotificationSender(this.workflow, this.workflowID);
-	}
+    public StandaloneNotificationSender(String topic, Workflow workflow) {
+        this.workflow = workflow;
+        this.workflowID = URI.create(StringUtil.convertToJavaIdentifier(topic));
+    }
+
+    @Override
+    public EndpointReference getEventSink() {
+        return new EndpointReference(XBayaConstants.DEFAULT_BROKER_URL.toString());
+    }
+
+    @Override
+    public void workflowStarted(PyObject[] args, String[] keywords) {
+        List<InputNode> inputs = GraphUtil.getInputNodes(this.workflow.getGraph());
+        for (InputNode inputNode : inputs) {
+            inputNode.getGUI().setBodyColor(NodeState.FINISHED.color);
+        }
+
+    }
+
+    @Override
+    public void workflowStarted(Object[] args, String[] keywords) {
+        List<InputNode> inputs = GraphUtil.getInputNodes(this.workflow.getGraph());
+        for (InputNode inputNode : inputs) {
+            inputNode.getGUI().setBodyColor(NodeState.FINISHED.color);
+        }
+    }
+
+    @Override
+    public void workflowFinished(Object[] args, String[] keywords) {
+        List<OutputNode> outputs = GraphUtil.getOutputNodes(this.workflow.getGraph());
+        for (OutputNode outputNode : outputs) {
+            outputNode.getGUI().setBodyColor(NodeState.EXECUTING.color);
+        }
+
+    }
+
+    @Override
+    public void sendingPartialResults(Object[] args, String[] keywords) {
+        // noop
+
+    }
+
+    @Override
+    public void workflowFinished(PyObject[] args, String[] keywords) {
+        List<OutputNode> outputs = GraphUtil.getOutputNodes(this.workflow.getGraph());
+        for (OutputNode outputNode : outputs) {
+            outputNode.getGUI().setBodyColor(NodeState.EXECUTING.color);
+        }
+
+    }
+
+    @Override
+    public void workflowTerminated() {
+        // noop
+
+    }
+
+    @Override
+    public void workflowFailed(String message) {
+        // noop
+
+    }
+
+    @Override
+    public void workflowFailed(Throwable e) {
+        // noop
+
+    }
+
+    @Override
+    public void workflowFailed(String message, Throwable e) {
+        // noop
+
+    }
+
+    @Override
+    public ServiceNotifiable createServiceNotificationSender(String nodeID) {
+        return new StandaloneServiceNotificationSender(this.workflow, this.workflowID);
+    }
 
 }

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/TestWorkflowInterpreter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/TestWorkflowInterpreter.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/TestWorkflowInterpreter.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/TestWorkflowInterpreter.java Sat Oct 22 19:29:52 2011
@@ -105,7 +105,6 @@ public class TestWorkflowInterpreter {
 
         invoker(userName, password, workflowAsString, in, workflow);
 
-
     }
 
     /**
@@ -120,7 +119,7 @@ public class TestWorkflowInterpreter {
         configuration.setMyProxyLifetime(XBayaConstants.DEFAULT_MYPROXY_LIFTTIME);
         configuration.setMyProxyPort(XBayaConstants.DEFAULT_MYPROXY_PORT);
         configuration.setMyProxyServer(XBayaConstants.DEFAULT_MYPROXY_SERVER);
-//        configuration.setXRegistryURL(XBayaConstants.DEFAULT_XREGISTRY_URL);
+        // configuration.setXRegistryURL(XBayaConstants.DEFAULT_XREGISTRY_URL);
         return configuration;
     }
 
@@ -156,16 +155,16 @@ public class TestWorkflowInterpreter {
         WorkflowContext context = null;
         String topic = UUID.randomUUID().toString();
 
-//        context = new GPELWorkflowContext(topic, userName, password);
-//        wfClient = new GPELWorkflowClient(context, workflow);
-//        wfClient.init();
-//        try {
-//            context.prepare(wfClient, workflow);
-//        } catch (GSSException e) {
-//            throw new RuntimeException(e);
-//        } catch (URISyntaxException e) {
-//            throw new RuntimeException(e);
-//        }
+        // context = new GPELWorkflowContext(topic, userName, password);
+        // wfClient = new GPELWorkflowClient(context, workflow);
+        // wfClient.init();
+        // try {
+        // context.prepare(wfClient, workflow);
+        // } catch (GSSException e) {
+        // throw new RuntimeException(e);
+        // } catch (URISyntaxException e) {
+        // throw new RuntimeException(e);
+        // }
 
         return wfClient.invoke(inputs);
 

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=1187758&r1=1187757&r2=1187758&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 Sat Oct 22 19:29:52 2011
@@ -149,94 +149,89 @@ public class WorkflowInterpreter {
 
     private LeadResourceMapping resourceMapping;
 
-private boolean isoffline = false;
-	
-	
-	public WorkflowInterpreter(XBayaConfiguration configuration, String topic,
-			Workflow workflow, String username, String password) {
-		this(configuration, topic, workflow, username, password, false);
-	}
+    private boolean isoffline = false;
 
-	/**
-	 * 
-	 * Constructs a WorkflowInterpreter.
-	 * 
-	 * @param configuration
-	 * @param topic
-	 * @param workflow
-	 * @param username
-	 * @param password
-	 */
-	public WorkflowInterpreter(XBayaConfiguration configuration, String topic,
-			Workflow workflow, String username, String password, boolean offline) {
-		this.isoffline = offline;
-		this.configuration = configuration;
-
-		this.username = username;
-		this.password = password;
-		this.topic = topic;
-		this.workflow = workflow;
-		if (this.isoffline) {
-			this.notifier = new StandaloneNotificationSender(topic, this.workflow);
-		} else {
-			this.notifier = new NotificationSender(this.configuration.getBrokerURL(), topic);
-		}
-		this.mode = SERVER_MODE;
-		this.retryFailed = false;
+    public WorkflowInterpreter(XBayaConfiguration configuration, String topic, Workflow workflow, String username,
+            String password) {
+        this(configuration, topic, workflow, username, password, false);
+    }
 
-	}
+    /**
+     * 
+     * Constructs a WorkflowInterpreter.
+     * 
+     * @param configuration
+     * @param topic
+     * @param workflow
+     * @param username
+     * @param password
+     */
+    public WorkflowInterpreter(XBayaConfiguration configuration, String topic, Workflow workflow, String username,
+            String password, boolean offline) {
+        this.isoffline = offline;
+        this.configuration = configuration;
+
+        this.username = username;
+        this.password = password;
+        this.topic = topic;
+        this.workflow = workflow;
+        if (this.isoffline) {
+            this.notifier = new StandaloneNotificationSender(topic, this.workflow);
+        } else {
+            this.notifier = new NotificationSender(this.configuration.getBrokerURL(), topic);
+        }
+        this.mode = SERVER_MODE;
+        this.retryFailed = false;
 
-	/**
-	 * 
-	 * Constructs a WorkflowInterpreter.
-	 * 
-	 * @param engine
-	 * @param topic
-	 */
-	public WorkflowInterpreter(XBayaEngine engine, String topic) {
-		this(engine, topic, engine.getWorkflow());
-	}
+    }
 
-	/**
-	 * 
-	 * Constructs a WorkflowInterpreter.
-	 * 
-	 * @param engine
-	 * @param topic
-	 * @param workflow
-	 */
-	public WorkflowInterpreter(XBayaEngine engine, String topic,
-			Workflow workflow) {
-		this(engine, topic, workflow, false);
-	}
+    /**
+     * 
+     * Constructs a WorkflowInterpreter.
+     * 
+     * @param engine
+     * @param topic
+     */
+    public WorkflowInterpreter(XBayaEngine engine, String topic) {
+        this(engine, topic, engine.getWorkflow());
+    }
 
-	/**
-	 * 
-	 * Constructs a WorkflowInterpreter.
-	 * 
-	 * @param engine
-	 * @param topic
-	 * @param workflow
-	 * @param subWorkflow
-	 */
-	public WorkflowInterpreter(XBayaEngine engine, String topic,
-			Workflow workflow, boolean subWorkflow) {
-		this.engine = engine;
-		this.configuration = engine.getConfiguration();
-		this.myProxyChecker = new MyProxyChecker(this.engine);
-		this.workflow = workflow;
-		this.isSubWorkflow = subWorkflow;
-		this.mode = GUI_MODE;
-		if (this.isoffline) {
-			this.notifier = new StandaloneNotificationSender(topic, this.workflow);
-		} else {
-			this.notifier = new NotificationSender(this.engine.getMonitor()
-					.getConfiguration().getBrokerURL(), topic);
-		}
-		this.topic = topic;
+    /**
+     * 
+     * Constructs a WorkflowInterpreter.
+     * 
+     * @param engine
+     * @param topic
+     * @param workflow
+     */
+    public WorkflowInterpreter(XBayaEngine engine, String topic, Workflow workflow) {
+        this(engine, topic, workflow, false);
+    }
 
-	}
+    /**
+     * 
+     * Constructs a WorkflowInterpreter.
+     * 
+     * @param engine
+     * @param topic
+     * @param workflow
+     * @param subWorkflow
+     */
+    public WorkflowInterpreter(XBayaEngine engine, String topic, Workflow workflow, boolean subWorkflow) {
+        this.engine = engine;
+        this.configuration = engine.getConfiguration();
+        this.myProxyChecker = new MyProxyChecker(this.engine);
+        this.workflow = workflow;
+        this.isSubWorkflow = subWorkflow;
+        this.mode = GUI_MODE;
+        if (this.isoffline) {
+            this.notifier = new StandaloneNotificationSender(topic, this.workflow);
+        } else {
+            this.notifier = new NotificationSender(this.engine.getMonitor().getConfiguration().getBrokerURL(), topic);
+        }
+        this.topic = topic;
 
+    }
 
     public void setResourceMapping(LeadResourceMapping resourceMapping) {
         this.resourceMapping = resourceMapping;
@@ -613,8 +608,8 @@ private boolean isoffline = false;
                     }
 
                     /*
-                     * 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) {
@@ -702,8 +697,7 @@ private boolean isoffline = false;
             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;
@@ -881,8 +875,7 @@ private boolean isoffline = false;
             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)) {
@@ -971,9 +964,8 @@ private boolean isoffline = false;
                         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();
 
@@ -989,8 +981,8 @@ private boolean isoffline = false;
                     }
 
                     /*
-                     * 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) {
@@ -1146,8 +1138,7 @@ private boolean isoffline = false;
                 }
             } 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;

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreterInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreterInvoker.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreterInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreterInvoker.java Sat Oct 22 19:29:52 2011
@@ -21,47 +21,47 @@
 
 package org.apache.airavata.xbaya.interpretor;
 
-public class WorkflowInterpreterInvoker{
-//        implements HeaderConstants {
-//
-//    public void invoke(Workflow workflow, String serverURL, String userName, String password, String topic)
-//            throws AxisFault, RemoteException, ComponentException {
-//
-//        String workflowAsString = workflow.toXMLText();
-//        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.DEFAULT_XREGISTRY_URL.toString());
-//        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());
-//
-//        LinkedList<NameValue> nameValPairsList = new LinkedList<NameValue>();
-//        List<InputNode> wfInputs = new ODEClient().getInputNodes(workflow);
-//        for (InputNode node : wfInputs) {
-//            NameValue nameValue = new NameValue();
-//            nameValue.setName(node.getName());
-//            nameValue.setValue(node.getDefaultValue().toString());
-//        }
-//
-//        new WorkflowInterpretorStub(serverURL).launchWorkflow(workflowAsString, topic, password, userName,
-//                nameValPairsList.toArray(new NameValue[0]), configurations);
-//
-//    }
+public class WorkflowInterpreterInvoker {
+    // implements HeaderConstants {
+    //
+    // public void invoke(Workflow workflow, String serverURL, String userName, String password, String topic)
+    // throws AxisFault, RemoteException, ComponentException {
+    //
+    // String workflowAsString = workflow.toXMLText();
+    // 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.DEFAULT_XREGISTRY_URL.toString());
+    // 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());
+    //
+    // LinkedList<NameValue> nameValPairsList = new LinkedList<NameValue>();
+    // List<InputNode> wfInputs = new ODEClient().getInputNodes(workflow);
+    // for (InputNode node : wfInputs) {
+    // NameValue nameValue = new NameValue();
+    // nameValue.setName(node.getName());
+    // nameValue.setValue(node.getDefaultValue().toString());
+    // }
+    //
+    // new WorkflowInterpretorStub(serverURL).launchWorkflow(workflowAsString, topic, password, userName,
+    // nameValPairsList.toArray(new NameValue[0]), configurations);
+    //
+    // }
 
 }
\ No newline at end of file

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorEventListener.java Sat Oct 22 19:29:52 2011
@@ -59,275 +59,264 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.xmlpull.infoset.XmlElement;
 
-public class WorkflowInterpretorEventListener implements NotificationHandler,
-		ConsumerNotificationHandler {
+public class WorkflowInterpretorEventListener implements NotificationHandler, ConsumerNotificationHandler {
 
-	private Workflow workflow;
-	private boolean pullMode;
-	private WseMsgBrokerClient wseClient;
-	private URI brokerURL;
-	private String topic;
-	private URI messageBoxURL;
-	private String subscriptionID;
-	private MessagePuller messagePuller;
-
-	private static Logger logger = LoggerFactory.getLogger(WorkflowInterpretorEventListener.class);
-
-	public WorkflowInterpretorEventListener(Workflow workflow,
-			XBayaConfiguration configuration) {
-		this.workflow = workflow;
-		this.brokerURL = configuration.getBrokerURL();
-		this.topic = configuration.getTopic();
-		this.pullMode = true;
-		this.messageBoxURL = configuration.getMessageBoxURL();
-		this.wseClient = new WseMsgBrokerClient();
-		this.wseClient.init(this.brokerURL.toString());
-	}
-
-	public void start() throws MonitorException {
-
-		subscribe();
-	}
-
-	public void stop() throws MonitorException {
-		unsubscribe();
-	}
-
-	private synchronized void subscribe() throws MonitorException {
-		if (this.subscriptionID != null) {
-			throw new IllegalStateException();
-		}
-		try {
-			if (this.pullMode) {
-				EndpointReference messageBoxEPR = this.wseClient
-						.createPullMsgBox(this.messageBoxURL.toString());
-				this.subscriptionID = this.wseClient.subscribe(
-						messageBoxEPR.getAddress(), this.topic, null);
-				this.messagePuller = this.wseClient
-						.startPullingEventsFromMsgBox(messageBoxEPR, this,
-								1000L, 20000L);
-			} else {
-				String[] endpoints = this.wseClient.startConsumerService(2222,
-						this);
-				this.subscriptionID = this.wseClient.subscribe(endpoints[0],
-						this.topic, null);
-			}
-		} catch (IOException e) {
-			throw new MonitorException("Failed to subscribe.", e);
-		} catch (RuntimeException e) {
-			throw new MonitorException("Failed to subscribe.", e);
-		}
-	}
-
-	/**
-	 * Unsubscribes from the notification.
-	 * 
-	 * @throws MonitorException
-	 */
-	private synchronized void unsubscribe() throws MonitorException {
-		// This method needs to be synchronized along with subscribe() because
-		// unsubscribe() might be called while subscribe() is being executed.
-		if (this.subscriptionID == null) {
-			throw new IllegalStateException();
-		}
-		try {
-			if (this.pullMode) {
-				this.messagePuller.stopPulling();
-			} else {
-				this.wseClient.unSubscribe(this.subscriptionID);
-			}
-			this.wseClient.unSubscribe(this.subscriptionID);
-		} catch (MsgBrokerClientException e) {
-			throw new MonitorException("Failed to unsubscribe.", e);
-		}
-
-	}
-
-	/**
-	 * @see org.apache.airavata.wsmg.client.NotificationHandler#handleNotification(java.lang.String)
-	 */
-	public void handleNotification(String message) {
-		try {
-//			String soapBody = WorkFlowUtils.getSoapBodyContent(message);
-			XmlElement event = XMLUtil.stringToXmlElement(message);
-			handleEvent(new MonitorEvent(event), true, this.workflow.getGraph());
-
-//		} catch (XMLStreamException e) {
-//			// Just log them because they can be unrelated messages sent to
-//			// this topic by accident.
-//			logger.warn("Could not parse received notification: " + message,
-//					e);
-//		}
-        }catch (RuntimeException e) {
-			logger.warn("Failed to process notification: " + message, e);
-		}
-	}
-
-	private void handleEvent(MonitorEvent event, boolean forward, Graph graph) {
-		EventType type = event.getType();
-		String nodeID = event.getNodeID();
-		Node node = graph.getNode(nodeID);
-
-		if (type == MonitorUtil.EventType.WORKFLOW_INVOKED) {
-			workflowStarted(graph, forward);
-		} else if (type == MonitorUtil.EventType.WORKFLOW_TERMINATED) {
-			workflowFinished(graph, forward);
-		} else if (type == EventType.INVOKING_SERVICE
-				|| type == EventType.SERVICE_INVOKED) {
-			if (node == null) {
-				logger.warn("There is no node that has ID, " + nodeID);
-			} else {
-				nodeStarted(node, forward);
-			}
-		} else if (type == MonitorUtil.EventType.RECEIVED_RESULT
-		// TODO this should be removed when GPEL sends all notification
-		// correctly.
-				|| type == EventType.SENDING_RESULT) {
-			if (node == null) {
-				logger.warn("There is no node that has ID, " + nodeID);
-			} else {
-				nodeFinished(node, forward);
-			}
-		} else if (type == EventType.INVOKING_SERVICE_FAILED
-				|| type == EventType.RECEIVED_FAULT
-				// TODO
-				|| type == EventType.SENDING_FAULT
-				|| type == EventType.SENDING_RESPONSE_FAILED) {
-			if (node == null) {
-				logger.warn("There is no node that has ID, " + nodeID);
-			} else {
-				nodeFailed(node, forward);
-			}
-		} else if (type == MonitorUtil.EventType.RESOURCE_MAPPING) {
-			if (node == null) {
-				logger.warn("There is no node that has ID, " + nodeID);
-			} else {
-				// nodeResourceMapped(node, event.getEvent(), forward);
-			}
-		} else {
-			// Ignore the rest.
-		}
-	}
-
-	private void workflowStarted(Graph graph, boolean forward) {
-		for (InputNode node : GraphUtil.getInputNodes(graph)) {
-			if (forward) {
-				finishNode(node);
-			} else {
-				resetNode(node);
-			}
-		}
-	}
-
-	private void workflowFinished(Graph graph, boolean forward) {
-		for (OutputNode node : GraphUtil.getOutputNodes(graph)) {
-			if (forward) {
-				finishNode(node);
-				finishPredecessorNodes(node);
-			} else {
-				resetNode(node);
-			}
-		}
-	}
-
-	private LinkedList<InputNode> getInputNodes(WSGraph graph) {
-		List<NodeImpl> nodes = graph.getNodes();
-		LinkedList<InputNode> inputNodes = new LinkedList<InputNode>();
-		for (NodeImpl nodeImpl : nodes) {
-			if (nodeImpl instanceof InputNode) {
-				inputNodes.add((InputNode) nodeImpl);
-			}
-		}
-		return inputNodes;
-	}
-
-	private LinkedList<OutputNode> getOutputNodes(WSGraph graph) {
-		List<NodeImpl> nodes = graph.getNodes();
-		LinkedList<OutputNode> outputNodes = new LinkedList<OutputNode>();
-		for (NodeImpl nodeImpl : nodes) {
-			if (nodeImpl instanceof OutputNode) {
-				outputNodes.add((OutputNode) nodeImpl);
-			}
-		}
-		return outputNodes;
-	}
-
-	private void nodeStarted(Node node, boolean forward) {
-		if (forward) {
-			executeNode(node);
-			finishPredecessorNodes(node);
-		} else {
-			resetNode(node);
-		}
-	}
-
-	private void nodeFinished(Node node, boolean forward) {
-		if (forward) {
-			finishNode(node);
-			finishPredecessorNodes(node);
-		} else {
-			executeNode(node);
-		}
-	}
-
-	private void nodeFailed(Node node, boolean forward) {
-		if (forward) {
-			failNode(node);
-			finishPredecessorNodes(node);
-		} else {
-			executeNode(node);
-		}
-	}
-
-	private void executeNode(Node node) {
-		node.getGUI().setBodyColor(NodeState.EXECUTING.color);
-	}
-
-	private void finishNode(Node node) {
-		node.getGUI().setBodyColor(NodeState.FINISHED.color);
-	}
-
-	private void failNode(Node node) {
-		node.getGUI().setBodyColor(NodeState.FAILED.color);
-	}
-
-	private void resetNode(Node node) {
-		node.getGUI().setBodyColor(NodeGUI.DEFAULT_BODY_COLOR);
-		node.getGUI().resetTokens();
-	}
-
-	/**
-	 * Make preceding nodes done. This helps the monitoring GUI when a user
-	 * subscribes from the middle of the workflow execution.
-	 * 
-	 * @param node
-	 */
-	private void finishPredecessorNodes(Node node) {
-		for (Port inputPort : node.getInputPorts()) {
-			for (Edge edge : inputPort.getEdges()) {
-				Port fromPort = edge.getFromPort();
-				if (!(fromPort instanceof EPRPort)) {
-					Node fromNode = fromPort.getNode();
-					finishNode(fromNode);
-					finishPredecessorNodes(fromNode);
-				}
-			}
-		}
-		Port controlInPort = node.getControlInPort();
-		if (controlInPort != null) {
-			for (Node fromNode : controlInPort.getFromNodes()) {
-				finishNode(fromNode);
-				finishPredecessorNodes(fromNode);
-			}
-		}
-	}
-
-	/**
-	 * @see org.apache.airavata.wsmg.client.NotificationHandler#handleNotification(java.lang.String)
-	 */
-	public void handleNotification(SOAPEnvelope message) {
-		String soapBody = message.getBody().toString();
-		this.handleNotification(soapBody);
-	}
+    private Workflow workflow;
+    private boolean pullMode;
+    private WseMsgBrokerClient wseClient;
+    private URI brokerURL;
+    private String topic;
+    private URI messageBoxURL;
+    private String subscriptionID;
+    private MessagePuller messagePuller;
+
+    private static Logger logger = LoggerFactory.getLogger(WorkflowInterpretorEventListener.class);
+
+    public WorkflowInterpretorEventListener(Workflow workflow, XBayaConfiguration configuration) {
+        this.workflow = workflow;
+        this.brokerURL = configuration.getBrokerURL();
+        this.topic = configuration.getTopic();
+        this.pullMode = true;
+        this.messageBoxURL = configuration.getMessageBoxURL();
+        this.wseClient = new WseMsgBrokerClient();
+        this.wseClient.init(this.brokerURL.toString());
+    }
+
+    public void start() throws MonitorException {
+
+        subscribe();
+    }
+
+    public void stop() throws MonitorException {
+        unsubscribe();
+    }
+
+    private synchronized void subscribe() throws MonitorException {
+        if (this.subscriptionID != null) {
+            throw new IllegalStateException();
+        }
+        try {
+            if (this.pullMode) {
+                EndpointReference messageBoxEPR = this.wseClient.createPullMsgBox(this.messageBoxURL.toString());
+                this.subscriptionID = this.wseClient.subscribe(messageBoxEPR.getAddress(), this.topic, null);
+                this.messagePuller = this.wseClient.startPullingEventsFromMsgBox(messageBoxEPR, this, 1000L, 20000L);
+            } else {
+                String[] endpoints = this.wseClient.startConsumerService(2222, this);
+                this.subscriptionID = this.wseClient.subscribe(endpoints[0], this.topic, null);
+            }
+        } catch (IOException e) {
+            throw new MonitorException("Failed to subscribe.", e);
+        } catch (RuntimeException e) {
+            throw new MonitorException("Failed to subscribe.", e);
+        }
+    }
+
+    /**
+     * Unsubscribes from the notification.
+     * 
+     * @throws MonitorException
+     */
+    private synchronized void unsubscribe() throws MonitorException {
+        // This method needs to be synchronized along with subscribe() because
+        // unsubscribe() might be called while subscribe() is being executed.
+        if (this.subscriptionID == null) {
+            throw new IllegalStateException();
+        }
+        try {
+            if (this.pullMode) {
+                this.messagePuller.stopPulling();
+            } else {
+                this.wseClient.unSubscribe(this.subscriptionID);
+            }
+            this.wseClient.unSubscribe(this.subscriptionID);
+        } catch (MsgBrokerClientException e) {
+            throw new MonitorException("Failed to unsubscribe.", e);
+        }
+
+    }
+
+    /**
+     * @see org.apache.airavata.wsmg.client.NotificationHandler#handleNotification(java.lang.String)
+     */
+    public void handleNotification(String message) {
+        try {
+            // String soapBody = WorkFlowUtils.getSoapBodyContent(message);
+            XmlElement event = XMLUtil.stringToXmlElement(message);
+            handleEvent(new MonitorEvent(event), true, this.workflow.getGraph());
+
+            // } catch (XMLStreamException e) {
+            // // Just log them because they can be unrelated messages sent to
+            // // this topic by accident.
+            // logger.warn("Could not parse received notification: " + message,
+            // e);
+            // }
+        } catch (RuntimeException e) {
+            logger.warn("Failed to process notification: " + message, e);
+        }
+    }
+
+    private void handleEvent(MonitorEvent event, boolean forward, Graph graph) {
+        EventType type = event.getType();
+        String nodeID = event.getNodeID();
+        Node node = graph.getNode(nodeID);
+
+        if (type == MonitorUtil.EventType.WORKFLOW_INVOKED) {
+            workflowStarted(graph, forward);
+        } else if (type == MonitorUtil.EventType.WORKFLOW_TERMINATED) {
+            workflowFinished(graph, forward);
+        } else if (type == EventType.INVOKING_SERVICE || type == EventType.SERVICE_INVOKED) {
+            if (node == null) {
+                logger.warn("There is no node that has ID, " + nodeID);
+            } else {
+                nodeStarted(node, forward);
+            }
+        } else if (type == MonitorUtil.EventType.RECEIVED_RESULT
+        // TODO this should be removed when GPEL sends all notification
+        // correctly.
+                || type == EventType.SENDING_RESULT) {
+            if (node == null) {
+                logger.warn("There is no node that has ID, " + nodeID);
+            } else {
+                nodeFinished(node, forward);
+            }
+        } else if (type == EventType.INVOKING_SERVICE_FAILED || type == EventType.RECEIVED_FAULT
+        // TODO
+                || type == EventType.SENDING_FAULT || type == EventType.SENDING_RESPONSE_FAILED) {
+            if (node == null) {
+                logger.warn("There is no node that has ID, " + nodeID);
+            } else {
+                nodeFailed(node, forward);
+            }
+        } else if (type == MonitorUtil.EventType.RESOURCE_MAPPING) {
+            if (node == null) {
+                logger.warn("There is no node that has ID, " + nodeID);
+            } else {
+                // nodeResourceMapped(node, event.getEvent(), forward);
+            }
+        } else {
+            // Ignore the rest.
+        }
+    }
+
+    private void workflowStarted(Graph graph, boolean forward) {
+        for (InputNode node : GraphUtil.getInputNodes(graph)) {
+            if (forward) {
+                finishNode(node);
+            } else {
+                resetNode(node);
+            }
+        }
+    }
+
+    private void workflowFinished(Graph graph, boolean forward) {
+        for (OutputNode node : GraphUtil.getOutputNodes(graph)) {
+            if (forward) {
+                finishNode(node);
+                finishPredecessorNodes(node);
+            } else {
+                resetNode(node);
+            }
+        }
+    }
+
+    private LinkedList<InputNode> getInputNodes(WSGraph graph) {
+        List<NodeImpl> nodes = graph.getNodes();
+        LinkedList<InputNode> inputNodes = new LinkedList<InputNode>();
+        for (NodeImpl nodeImpl : nodes) {
+            if (nodeImpl instanceof InputNode) {
+                inputNodes.add((InputNode) nodeImpl);
+            }
+        }
+        return inputNodes;
+    }
+
+    private LinkedList<OutputNode> getOutputNodes(WSGraph graph) {
+        List<NodeImpl> nodes = graph.getNodes();
+        LinkedList<OutputNode> outputNodes = new LinkedList<OutputNode>();
+        for (NodeImpl nodeImpl : nodes) {
+            if (nodeImpl instanceof OutputNode) {
+                outputNodes.add((OutputNode) nodeImpl);
+            }
+        }
+        return outputNodes;
+    }
+
+    private void nodeStarted(Node node, boolean forward) {
+        if (forward) {
+            executeNode(node);
+            finishPredecessorNodes(node);
+        } else {
+            resetNode(node);
+        }
+    }
+
+    private void nodeFinished(Node node, boolean forward) {
+        if (forward) {
+            finishNode(node);
+            finishPredecessorNodes(node);
+        } else {
+            executeNode(node);
+        }
+    }
+
+    private void nodeFailed(Node node, boolean forward) {
+        if (forward) {
+            failNode(node);
+            finishPredecessorNodes(node);
+        } else {
+            executeNode(node);
+        }
+    }
+
+    private void executeNode(Node node) {
+        node.getGUI().setBodyColor(NodeState.EXECUTING.color);
+    }
+
+    private void finishNode(Node node) {
+        node.getGUI().setBodyColor(NodeState.FINISHED.color);
+    }
+
+    private void failNode(Node node) {
+        node.getGUI().setBodyColor(NodeState.FAILED.color);
+    }
+
+    private void resetNode(Node node) {
+        node.getGUI().setBodyColor(NodeGUI.DEFAULT_BODY_COLOR);
+        node.getGUI().resetTokens();
+    }
+
+    /**
+     * Make preceding nodes done. This helps the monitoring GUI when a user subscribes from the middle of the workflow
+     * execution.
+     * 
+     * @param node
+     */
+    private void finishPredecessorNodes(Node node) {
+        for (Port inputPort : node.getInputPorts()) {
+            for (Edge edge : inputPort.getEdges()) {
+                Port fromPort = edge.getFromPort();
+                if (!(fromPort instanceof EPRPort)) {
+                    Node fromNode = fromPort.getNode();
+                    finishNode(fromNode);
+                    finishPredecessorNodes(fromNode);
+                }
+            }
+        }
+        Port controlInPort = node.getControlInPort();
+        if (controlInPort != null) {
+            for (Node fromNode : controlInPort.getFromNodes()) {
+                finishNode(fromNode);
+                finishPredecessorNodes(fromNode);
+            }
+        }
+    }
+
+    /**
+     * @see org.apache.airavata.wsmg.client.NotificationHandler#handleNotification(java.lang.String)
+     */
+    public void handleNotification(SOAPEnvelope message) {
+        String soapBody = message.getBody().toString();
+        this.handleNotification(soapBody);
+    }
 
 }
\ No newline at end of file

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorSkeleton.java Sat Oct 22 19:29:52 2011
@@ -69,9 +69,9 @@ public class WorkflowInterpretorSkeleton
             System.err.println("Workflow Object created");
 
         } catch (GraphException e1) {
-           throw new XBayaRuntimeException(e1);
+            throw new XBayaRuntimeException(e1);
         } catch (ComponentException e1) {
-        	throw new XBayaRuntimeException(e1);
+            throw new XBayaRuntimeException(e1);
         }
         System.err.println("Setting Input values");
         List<InputNode> inputNodes = new ODEClient().getInputNodes(workflow);
@@ -133,8 +133,8 @@ public class WorkflowInterpretorSkeleton
         configuration.setMyProxyLifetime(XBayaConstants.DEFAULT_MYPROXY_LIFTTIME);
         configuration.setMyProxyPort(XBayaConstants.DEFAULT_MYPROXY_PORT);
         configuration.setMyProxyServer(findValue(vals, PROXYSERVER, XBayaConstants.DEFAULT_MYPROXY_SERVER));
-//        configuration.setXRegistryURL(new URI(findValue(vals, XREGISTRY,
-//                XBayaConstants.DEFAULT_XREGISTRY_URL.toString())));
+        // configuration.setXRegistryURL(new URI(findValue(vals, XREGISTRY,
+        // XBayaConstants.DEFAULT_XREGISTRY_URL.toString())));
         return configuration;
     }
 

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorStub.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorStub.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorStub.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpretorStub.java Sat Oct 22 19:29:52 2011
@@ -57,7 +57,8 @@ public class WorkflowInterpretorStub ext
 
         __operation = new org.apache.axis2.description.OutInAxisOperation();
 
-        __operation.setName(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org", "launchWorkflow"));
+        __operation.setName(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org",
+                "launchWorkflow"));
         _service.addOperation(__operation);
 
         _operations[0] = __operation;
@@ -132,8 +133,7 @@ public class WorkflowInterpretorStub ext
     public java.lang.String launchWorkflow(
 
     java.lang.String workflowAsString1, java.lang.String topic2, java.lang.String password3,
-            java.lang.String username4, NameValue[] inputs5,
-            NameValue[] configurations6)
+            java.lang.String username4, NameValue[] inputs5, NameValue[] configurations6)
 
     throws java.rmi.RemoteException
 
@@ -154,16 +154,10 @@ public class WorkflowInterpretorStub ext
             // create SOAP envelope with that payload
             org.apache.axiom.soap.SOAPEnvelope env = null;
             WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType = null;
-            env = toEnvelope(
-                    getFactory(_operationClient.getOptions().getSoapVersionURI()),
-                    workflowAsString1,
-                    topic2,
-                    password3,
-                    username4,
-                    inputs5,
-                    configurations6,
-                    dummyWrappedType,
-                    optimizeContent(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org", "launchWorkflow")));
+            env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), workflowAsString1, topic2,
+                    password3, username4, inputs5, configurations6, dummyWrappedType,
+                    optimizeContent(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org",
+                            "launchWorkflow")));
 
             // adding SOAP soap_headers
             _serviceClient.addHeadersToEnvelope(env);
@@ -250,8 +244,7 @@ public class WorkflowInterpretorStub ext
     public void startlaunchWorkflow(
 
     java.lang.String workflowAsString1, java.lang.String topic2, java.lang.String password3,
-            java.lang.String username4, NameValue[] inputs5,
-            NameValue[] configurations6,
+            java.lang.String username4, NameValue[] inputs5, NameValue[] configurations6,
 
             final WorkflowInterpretorCallbackHandler callback)
 
@@ -273,7 +266,8 @@ public class WorkflowInterpretorStub ext
         WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType = null;
         env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), workflowAsString1, topic2,
                 password3, username4, inputs5, configurations6, dummyWrappedType,
-                optimizeContent(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org", "launchWorkflow")));
+                optimizeContent(new javax.xml.namespace.QName("http://interpretor.xbaya.airavata.apache.org",
+                        "launchWorkflow")));
 
         // adding SOAP soap_headers
         _serviceClient.addHeadersToEnvelope(env);
@@ -554,7 +548,8 @@ public class WorkflowInterpretorStub ext
 
             if (serializeType) {
 
-                java.lang.String namespacePrefix = registerPrefix(xmlWriter, "http://interpretor.xbaya.airavata.apache.org");
+                java.lang.String namespacePrefix = registerPrefix(xmlWriter,
+                        "http://interpretor.xbaya.airavata.apache.org");
                 if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) {
                     writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix
                             + ":launchWorkflowResponse", xmlWriter);
@@ -1251,7 +1246,8 @@ public class WorkflowInterpretorStub ext
 
             if (serializeType) {
 
-                java.lang.String namespacePrefix = registerPrefix(xmlWriter, "http://interpretor.xbaya.airavata.apache.org");
+                java.lang.String namespacePrefix = registerPrefix(xmlWriter,
+                        "http://interpretor.xbaya.airavata.apache.org");
                 if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)) {
                     writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "type", namespacePrefix
                             + ":launchWorkflow", xmlWriter);
@@ -2082,9 +2078,8 @@ public class WorkflowInterpretorStub ext
 
     private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory,
             java.lang.String param1, java.lang.String param2, java.lang.String param3, java.lang.String param4,
-            NameValue[] param5, NameValue[] param6,
-            WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType, boolean optimizeContent)
-            throws org.apache.axis2.AxisFault {
+            NameValue[] param5, NameValue[] param6, WorkflowInterpretorStub.LaunchWorkflow dummyWrappedType,
+            boolean optimizeContent) throws org.apache.axis2.AxisFault {
 
         try {
             WorkflowInterpretorStub.LaunchWorkflow wrappedType = new WorkflowInterpretorStub.LaunchWorkflow();

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/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?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GFacInvoker.java Sat Oct 22 19:29:52 2011
@@ -96,7 +96,7 @@ public class GFacInvoker implements Invo
         try {
 
             URI uri = new URI(this.gfacURL);
-            
+
             /*
              * Substring to remove GfacService
              */
@@ -104,15 +104,15 @@ public class GFacInvoker implements Invo
             if (gfacPath != null && gfacPath.contains("/")) {
                 gfacPath = gfacPath.substring(0, gfacPath.lastIndexOf('/') + 1) + portTypeQName.getLocalPart();
             }
-            URI getWsdlURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), gfacPath + "/getWSDL", uri.getQuery(),
-                    uri.getFragment());
+            URI getWsdlURI = new URI(uri.getScheme(), uri.getUserInfo(), uri.getHost(), uri.getPort(), gfacPath
+                    + "/getWSDL", uri.getQuery(), uri.getFragment());
 
             logger.info("getWSDL service:" + getWsdlURI.toString());
-            
-            WsdlDefinitions concreteWSDL = WsdlResolver.getInstance().loadWsdl(getWsdlURI);                        
-            
-            this.invoker = InvokerFactory
-                    .createInvoker(this.portTypeQName, concreteWSDL, null, this.messageBoxURL,null,true);
+
+            WsdlDefinitions concreteWSDL = WsdlResolver.getInstance().loadWsdl(getWsdlURI);
+
+            this.invoker = InvokerFactory.createInvoker(this.portTypeQName, concreteWSDL, null, this.messageBoxURL,
+                    null, true);
             this.invoker.setup();
         } catch (XBayaException xe) {
             throw xe;
@@ -139,8 +139,7 @@ public class GFacInvoker implements Invo
 
     /**
      * @throws XBayaException
-     * @see org.apache.airavata.xbaya.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);
@@ -161,12 +160,12 @@ public class GFacInvoker implements Invo
 
         WSIFClient client = invoker.getClient();
         // FIXME: Temporary fix
-//        if (this.leadContext == null) {
-//            LeadContextHeader lh = new LeadContextHeader(UUID.randomUUID().toString(), "XBaya-User");
-//            this.leadContext = lh;
-//        }
-//        StickySoapHeaderHandler handler = new StickySoapHeaderHandler("use-lead-header", this.leadContext);
-//        client.addHandler(handler);
+        // if (this.leadContext == null) {
+        // LeadContextHeader lh = new LeadContextHeader(UUID.randomUUID().toString(), "XBaya-User");
+        // this.leadContext = lh;
+        // }
+        // StickySoapHeaderHandler handler = new StickySoapHeaderHandler("use-lead-header", this.leadContext);
+        // client.addHandler(handler);
 
         // This handler has to be end to get the entire soap message.
         NotificationHandler notificationHandler = new NotificationHandler(this.builder);

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=1187758&r1=1187757&r2=1187758&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 Sat Oct 22 19:29:52 2011
@@ -194,8 +194,8 @@ public class GenericInvoker implements I
                 definitions = this.wsdlDefinitionObject;
             }
 
-            setup(definitions);                        
-            
+            setup(definitions);
+
         } catch (XBayaException e) {
             logger.error(e.getMessage(), e);
             // An appropriate message has been set in the exception.
@@ -227,7 +227,8 @@ public class GenericInvoker implements I
     private void setup(WsdlDefinitions definitions) throws XBayaException {
 
         // Set LEAD context header.
-        WorkflowContextHeaderBuilder builder = new WorkflowContextHeaderBuilder(this.notifier.getEventSink().getAddress(), this.gfacURL, null, this.notifier.getWorkflowID().toASCIIString(), "xbaya-experiment");
+        WorkflowContextHeaderBuilder builder = new WorkflowContextHeaderBuilder(this.notifier.getEventSink()
+                .getAddress(), this.gfacURL, null, this.notifier.getWorkflowID().toASCIIString(), "xbaya-experiment");
         builder.getWorkflowMonitoringContext().setServiceInstanceId(this.nodeID);
         builder.getWorkflowMonitoringContext().setWorkflowNodeId(this.nodeID);
         builder.getWorkflowMonitoringContext().setWorkflowInstanceId(this.notifier.getWorkflowID().toASCIIString());
@@ -235,10 +236,9 @@ public class GenericInvoker implements I
         builder.setUserIdentifier("xbaya-user");
         StickySoapHeaderHandler handler = new StickySoapHeaderHandler("use-workflowcontext-header", builder.getXml());
 
-
         // Create Invoker
         this.invoker = InvokerFactory.createInvoker(this.portTypeQName, definitions, this.gfacURL, this.messageBoxURL,
-                builder,true);
+                builder, true);
         this.invoker.setup();
 
         WSIFClient client = this.invoker.getClient();
@@ -247,14 +247,14 @@ public class GenericInvoker implements I
         WsdlResolver resolver = WsdlResolver.getInstance();
         // Get the concrete WSDL from invoker.setup() and set it to the
         // notifier.
-        
+
         this.notifier.setServiceID(this.nodeID);
-//        if (this.wsdlLocation != null) {
-//            this.notifier.setServiceID(this.nodeID);
-//        } else {
-//            String name = this.portTypeQName.getLocalPart();
-//            this.notifier.setServiceID(name);
-//        }
+        // if (this.wsdlLocation != null) {
+        // this.notifier.setServiceID(this.nodeID);
+        // } else {
+        // String name = this.portTypeQName.getLocalPart();
+        // this.notifier.setServiceID(name);
+        // }
     }
 
     /**
@@ -315,7 +315,7 @@ public class GenericInvoker implements I
      */
     public synchronized boolean invoke() throws XBayaException {
         try {
-                WSIFMessage inputMessage = this.invoker.getInputs();
+            WSIFMessage inputMessage = this.invoker.getInputs();
             logger.info("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
             this.notifier.invokingService(inputMessage);
 

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/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?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/SimpleInvoker.java Sat Oct 22 19:29:52 2011
@@ -70,7 +70,7 @@ public class SimpleInvoker implements In
         try {
             WSIFService service = WSIFServiceFactory.newInstance().getService(this.definitions);
             WSIFPort port = service.getPort();
-            this.client = WSIFRuntime.getDefault().newClientFor(port);            
+            this.client = WSIFRuntime.getDefault().newClientFor(port);
         } catch (RuntimeException e) {
             String message = "The WSDL is in the wrong format";
             throw new XBayaException(message, e);

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/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?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/WorkflowInvokerWrapperForGFacInvoker.java Sat Oct 22 19:29:52 2011
@@ -157,7 +157,7 @@ public class WorkflowInvokerWrapperForGF
 
         } else {
             notifier.serviceFinished(super.getOutputs());
-        }        
+        }
         return success;
     }
 

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/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?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/factory/InvokerFactory.java Sat Oct 22 19:29:52 2011
@@ -65,8 +65,9 @@ public class InvokerFactory {
         }
         return invoker;
     }
-       public static Invoker createInvoker(QName portTypeQName, WsdlDefinitions definitions, String gfacURL,
-            String messageBoxURL, WorkflowContextHeaderBuilder builder,boolean differ) throws XBayaException {
+
+    public static Invoker createInvoker(QName portTypeQName, WsdlDefinitions definitions, String gfacURL,
+            String messageBoxURL, WorkflowContextHeaderBuilder builder, boolean differ) throws XBayaException {
         Invoker invoker = null;
 
         if (definitions != null && definitions.getServices().iterator().hasNext()) {

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GFacServiceCreator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GFacServiceCreator.java?rev=1187758&r1=1187757&r2=1187758&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GFacServiceCreator.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/jython/lib/GFacServiceCreator.java Sat Oct 22 19:29:52 2011
@@ -111,7 +111,7 @@ public class GFacServiceCreator {
      * @throws XBayaException
      */
     public WsdlDefinitions createService(String serviceQName) throws XBayaException {
-        logger.debug( serviceQName );
+        logger.debug(serviceQName);
         try {
             WSIFMessage inputMessage = this.gFacOperation.createInputMessage();
             WSIFMessage outputMessage = this.gFacOperation.createOutputMessage();