airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [02/20] introducing workflow support in airavata api + other related modules
Date Wed, 23 Jul 2014 16:48:16 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/TestUtilServer.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/TestUtilServer.java b/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/TestUtilServer.java
new file mode 100644
index 0000000..3f31a6b
--- /dev/null
+++ b/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/TestUtilServer.java
@@ -0,0 +1,243 @@
+///*
+// *
+// * 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.utils;
+//
+///*
+// *
+// * 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.
+// *
+//*/
+//
+//import org.apache.airavata.wsmg.broker.BrokerServiceLifeCycle;
+//import org.apache.axis2.AxisFault;
+//import org.apache.axis2.context.ConfigurationContext;
+//import org.apache.axis2.context.ConfigurationContextFactory;
+//import org.apache.axis2.description.AxisService;
+//import org.apache.axis2.description.InOutAxisOperation;
+//import org.apache.axis2.engine.MessageReceiver;
+//import org.apache.axis2.engine.ServiceLifeCycle;
+//import org.apache.axis2.transport.http.SimpleHTTPServer;
+//
+//import javax.xml.namespace.QName;
+//import java.io.IOException;
+//import java.net.ServerSocket;
+//
+//public class TestUtilServer {
+//    private static int count = 0;
+//
+//    private static SimpleHTTPServer receiver;
+//
+//    public static int TESTING_PORT = 5555;
+//
+//    public static final String FAILURE_MESSAGE = "Intentional Failure";
+//
+//    public static synchronized void deployService(AxisService service) throws AxisFault {
+//        receiver.getConfigurationContext().getAxisConfiguration().addService(service);
+//    }
+//
+//    public static synchronized void unDeployService(QName service) throws AxisFault {
+//        receiver.getConfigurationContext().getAxisConfiguration().removeService(service.getLocalPart());
+//    }
+//
+//    public static synchronized void unDeployClientService() throws AxisFault {
+//        if (receiver.getConfigurationContext().getAxisConfiguration() != null) {
+//            receiver.getConfigurationContext().getAxisConfiguration().removeService("AnonymousService");
+//        }
+//    }
+//
+//    public static synchronized void start(String repository, String axis2xml) throws Exception {
+//        if (count == 0) {
+//            ConfigurationContext er = getNewConfigurationContext(repository, axis2xml);
+//            TESTING_PORT = getAvailablePort();
+//            receiver = new SimpleHTTPServer(er, TESTING_PORT);
+//
+//            try {
+//                receiver.start();
+//                System.out.print("Server started on port " + TESTING_PORT + ".....");
+//            } catch (Exception e) {
+//                throw AxisFault.makeFault(e);
+//            }
+//
+//            try {
+//                Thread.sleep(2000);
+//            } catch (InterruptedException e1) {
+//                throw new AxisFault("Thread interuptted", e1);
+//            }
+//            startBroker();
+//        }
+//        count++;
+//    }
+//
+//    public static void startBroker() throws Exception {
+//
+//        ServiceLifeCycle brokerLifeCycle = new BrokerServiceLifeCycle();
+//
+//        final String configFileParam = "configuration.file.name";
+//        final String configFileValue = "airavata-server.properties";
+//
+//        AxisService notificationService = getNotificationService();
+//        notificationService.addParameter(configFileParam, configFileValue);
+//        notificationService.setServiceLifeCycle(brokerLifeCycle);
+//        TestUtilServer.deployService(notificationService);
+//        brokerLifeCycle.startUp(TestUtilServer.getConfigurationContext(), notificationService);
+//
+//        AxisService eventingService = getEventingService();
+//        eventingService.addParameter(configFileParam, configFileValue);
+//        eventingService.setServiceLifeCycle(brokerLifeCycle);
+//        TestUtilServer.deployService(eventingService);
+//        brokerLifeCycle.startUp(TestUtilServer.getConfigurationContext(), eventingService);
+//
+//    }
+//
+//    public static AxisService getEventingService() {
+//
+//        AxisService eventingService = new AxisService("EventingService");
+//
+//        createOperation(eventingService, "renew",
+//                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/Renew",
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse");
+//        createOperation(eventingService, "getCurrentStatus",
+//                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatus",
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse");
+//
+//        createOperation(eventingService, "subscriptionEnd",
+//                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscriptionEnd", null);
+//
+//        createOperation(eventingService, "subscribe",
+//                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe",
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/SubscribeResponse");
+//        createOperation(eventingService, "unsubscribe",
+//                new org.apache.airavata.wsmg.broker.wseventing.WSEventingMsgReceiver(),
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe",
+//                "http://schemas.xmlsoap.org/ws/2004/08/eventing/UnsubscribeResponse");
+//        createOperation(eventingService, "publish",
+//                new org.apache.airavata.wsmg.broker.wseventing.WSEventingPublishMsgReceiver(),
+//                "http://org.apache.airavata/WseNotification", null);
+//
+//        return eventingService;
+//    }
+//
+//    public static AxisService getNotificationService() {
+//
+//        AxisService notificationService = new AxisService("NotificationService");
+//
+//        createOperation(notificationService, "notify",
+//                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/Notify",
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/NotifyResponse");
+//
+//        createOperation(notificationService, "subscribe",
+//                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/SubscribeRequest",
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/SubscribeRequestResponse");
+//
+//        createOperation(notificationService, "getCurrentMessage",
+//                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/GetCurrentMessageRequest",
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/GetCurrentMessageResponse");
+//
+//        createOperation(notificationService, "pauseSubscription",
+//                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/PauseSubsriptionRequest",
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/PauseSubscriptionResponse");
+//
+//        createOperation(notificationService, "resumeSubscription",
+//                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/ResumeSubsriptionRequest",
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/ResumeSubscriptionResponse");
+//
+//        createOperation(notificationService, "unsubscribe",
+//                new org.apache.airavata.wsmg.broker.wsnotification.WSNotificationMsgReceiver(),
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/UnsubsribeRequest",
+//                "http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseNotification/UnsubscribeResponse");
+//
+//        return notificationService;
+//
+//    }
+//
+//    public static void createOperation(AxisService axisService, String name, MessageReceiver messageReceiver,
+//            String inputAction, String outputAction) {
+//        InOutAxisOperation operation1 = new InOutAxisOperation(new QName(name));
+//        operation1.setMessageReceiver(messageReceiver);
+//        operation1.setOutputAction(outputAction);
+//        axisService.addOperation(operation1);
+//        if (inputAction != null) {
+//            axisService.mapActionToOperation(inputAction, operation1);
+//        }
+//    }
+//
+//    public static ConfigurationContext getNewConfigurationContext(String repository, String axis2xml) throws Exception {
+//        return ConfigurationContextFactory.createConfigurationContextFromFileSystem(repository, axis2xml);
+//    }
+//
+//    public static synchronized void stop() throws AxisFault {
+//        if (count == 1) {
+//            receiver.stop();
+//            while (receiver.isRunning()) {
+//                try {
+//                    Thread.sleep(1000);
+//                } catch (InterruptedException e1) {
+//                    // nothing to do here
+//                }
+//            }
+//            count = 0;
+//            // tp.doStop();
+//            System.out.print("Server stopped .....");
+//        } else {
+//            count--;
+//        }
+//        receiver.getConfigurationContext().terminate();
+//    }
+//
+//    public static ConfigurationContext getConfigurationContext() {
+//        return receiver.getConfigurationContext();
+//    }
+//
+//    public static int getAvailablePort(){
+//        ServerSocket serverSocket = null;
+//        try {
+//             serverSocket = new ServerSocket(0);
+//             serverSocket.close();
+//        } catch (IOException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        return serverSocket.getLocalPort();
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/WorkflowTestUtils.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/WorkflowTestUtils.java b/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/WorkflowTestUtils.java
new file mode 100644
index 0000000..cde34ef
--- /dev/null
+++ b/modules/workflow-model/workflow-engine/src/test/java/org/apache/airavata/xbaya/interpreter/utils/WorkflowTestUtils.java
@@ -0,0 +1,97 @@
+///*
+// *
+// * 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.utils;
+//
+//import org.apache.airavata.client.stub.interpretor.NameValue;
+//import org.apache.airavata.xbaya.XBayaConfiguration;
+//import org.apache.airavata.xbaya.XBayaConstants;
+//import org.apache.airavata.xbaya.interpreter.EchoService;
+//import org.apache.airavata.xbaya.interpreter.LevenshteinDistanceService;
+//import org.apache.airavata.xbaya.interpreter.ComplexMathService;
+//import org.apache.airavata.xbaya.interpretor.HeaderConstants;
+//import org.apache.airavata.xbaya.interpretor.WorkflowInterpretorSkeleton;
+//import org.apache.axis2.AxisFault;
+//import org.apache.axis2.context.ConfigurationContext;
+//import org.apache.axis2.context.ConfigurationContextFactory;
+//import org.apache.axis2.description.AxisService;
+//import org.apache.axis2.engine.ListenerManager;
+//
+//import java.io.File;
+//import java.io.FileInputStream;
+//import java.io.IOException;
+//import java.net.URISyntaxException;
+//import java.net.URL;
+//import java.nio.MappedByteBuffer;
+//import java.nio.channels.FileChannel;
+//import java.nio.charset.Charset;
+//import java.util.HashMap;
+//import java.util.Map;
+//
+//
+//public class WorkflowTestUtils implements HeaderConstants{
+//
+//    public static XBayaConfiguration getConfiguration() throws URISyntaxException {
+//        Map<String, String> configuration = new HashMap<String, String>();
+//        configuration.put(HEADER_ELEMENT_GFAC,XBayaConstants.DEFAULT_GFAC_URL.toString());
+//        configuration.put(HEADER_ELEMENT_REGISTRY,XBayaConstants.REGISTRY_URL.toASCIIString());
+//        configuration.put(HEADER_ELEMENT_PROXYSERVER,XBayaConstants.DEFAULT_MYPROXY_SERVER);
+//        configuration.put(HEADER_ELEMENT_MSGBOX,XBayaConstants.DEFAULT_MESSAGE_BOX_URL.toString());
+//        configuration.put(HEADER_ELEMENT_DSC,XBayaConstants.DEFAULT_DSC_URL.toString());
+//        configuration.put(HEADER_ELEMENT_BROKER,XBayaConstants.DEFAULT_BROKER_URL.toString());
+//        return (new WorkflowInterpretorSkeleton()).getConfiguration(configuration);
+//    }
+//
+//    public static String readWorkflow(URL url) throws IOException, URISyntaxException {
+//        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();
+//        }
+//    }
+//
+//    public static ListenerManager axis2ServiceStarter() throws AxisFault {
+//        try {
+//            ConfigurationContext configContext = ConfigurationContextFactory
+//                    .createBasicConfigurationContext("axis2_default.xml");
+//
+//            AxisService echoService = AxisService.createService(EchoService.class.getName(),
+//                    configContext.getAxisConfiguration());
+//            configContext.deployService(echoService);
+//            AxisService distanceService = AxisService.createService(LevenshteinDistanceService.class.getName(),
+//                    configContext.getAxisConfiguration());
+//            configContext.deployService(distanceService);
+//            AxisService mathService = AxisService.createService(ComplexMathService.class.getName(),
+//                    configContext.getAxisConfiguration());
+//            configContext.deployService(mathService);
+//
+//            ListenerManager manager = new ListenerManager();
+//            manager.init(configContext);
+//            manager.start();
+//            return manager;
+//        } catch (Exception e) {
+//            throw AxisFault.makeFault(e);
+//        }
+//    }
+//}

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-engine/src/test/java/test.xwf
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/test/java/test.xwf b/modules/workflow-model/workflow-engine/src/test/java/test.xwf
new file mode 100644
index 0000000..96eda29
--- /dev/null
+++ b/modules/workflow-model/workflow-engine/src/test/java/test.xwf
@@ -0,0 +1,251 @@
+<?xml version="1.0"?>
+<!--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. -->
+
+<xwf:workflow xwf:version="3.8.8" xmlns:xwf="http://www.extreme.indiana.edu/xbaya/xwf">
+  <xgr:graph xgr:version="3.8.8" xgr:type="ws"
+    xmlns:xgr="http://www.extreme.indiana.edu/xbaya/graph">
+    <xgr:id>test3</xgr:id>
+    <xgr:name>test3</xgr:name>
+    <xgr:description></xgr:description>
+    <xgr:metadata>
+      <appinfo xmlns="http://www.w3.org/2001/XMLSchema">
+
+</appinfo>
+    </xgr:metadata>
+    <xgr:node xgr:type="ws">
+      <xgr:id>TimestampServicePortType_appendTimeStamp</xgr:id>
+      <xgr:name>TimestampServicePortType:appendTimeStamp</xgr:name>
+      <xgr:outputPort>TimestampServicePortType_appendTimeStamp_out_0</xgr:outputPort>
+      <xgr:inputPort>TimestampServicePortType_appendTimeStamp_in_0</xgr:inputPort>
+      <xgr:controlInPort>TimestampServicePortType_appendTimeStamp_ctrl_in_0</xgr:controlInPort>
+      <xgr:controlOutPort>TimestampServicePortType_appendTimeStamp_ctrl_out_0</xgr:controlOutPort>
+      <xgr:x>35</xgr:x>
+      <xgr:y>122</xgr:y>
+      <xgr:wsdl>_</xgr:wsdl>
+      <xgr:portType>{http://indiana.edu}TimestampServicePortType</xgr:portType>
+      <xgr:operation>appendTimeStamp</xgr:operation>
+    </xgr:node>
+    <xgr:node xgr:type="ws">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_2</xgr:id>
+      <xgr:name>TimestampServicePortType:appendTimeStamp</xgr:name>
+      <xgr:outputPort>TimestampServicePortType_appendTimeStamp_2_out_0</xgr:outputPort>
+      <xgr:inputPort>TimestampServicePortType_appendTimeStamp_2_in_0</xgr:inputPort>
+      <xgr:controlInPort>TimestampServicePortType_appendTimeStamp_2_ctrl_in_0</xgr:controlInPort>
+      <xgr:controlOutPort>TimestampServicePortType_appendTimeStamp_2_ctrl_out_0</xgr:controlOutPort>
+      <xgr:x>179</xgr:x>
+      <xgr:y>228</xgr:y>
+      <xgr:wsdl>_</xgr:wsdl>
+      <xgr:portType>{http://indiana.edu}TimestampServicePortType</xgr:portType>
+      <xgr:operation>appendTimeStamp</xgr:operation>
+    </xgr:node>
+    <xgr:node xgr:type="input">
+      <xgr:id>before</xgr:id>
+      <xgr:name>before</xgr:name>
+      <xgr:outputPort>before_out_0</xgr:outputPort>
+      <xgr:x>24</xgr:x>
+      <xgr:y>47</xgr:y>
+      <xgr:config>
+        <xgr:description></xgr:description>
+        <xgr:dataType>{http://www.w3.org/2001/XMLSchema}string</xgr:dataType>
+      </xgr:config>
+    </xgr:node>
+    <xgr:node xgr:type="output">
+      <xgr:id>return</xgr:id>
+      <xgr:name>return</xgr:name>
+      <xgr:inputPort>return_in_0</xgr:inputPort>
+      <xgr:x>552</xgr:x>
+      <xgr:y>216</xgr:y>
+      <xgr:config>
+        <xgr:description></xgr:description>
+        <xgr:dataType>{http://www.w3.org/2001/XMLSchema}string</xgr:dataType>
+      </xgr:config>
+    </xgr:node>
+    <xgr:port xgr:type="ws">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_in_0</xgr:id>
+      <xgr:name>before</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="ws">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_out_0</xgr:id>
+      <xgr:name>return</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="control">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_ctrl_in_0</xgr:id>
+      <xgr:name>control</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="control">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_ctrl_out_0</xgr:id>
+      <xgr:name>control</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="ws">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_2_in_0</xgr:id>
+      <xgr:name>before</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp_2</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="ws">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_2_out_0</xgr:id>
+      <xgr:name>return</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp_2</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="control">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_2_ctrl_in_0</xgr:id>
+      <xgr:name>control</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp_2</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="control">
+      <xgr:id>TimestampServicePortType_appendTimeStamp_2_ctrl_out_0</xgr:id>
+      <xgr:name>control</xgr:name>
+      <xgr:node>TimestampServicePortType_appendTimeStamp_2</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="systemData">
+      <xgr:id>before_out_0</xgr:id>
+      <xgr:name>Parameter</xgr:name>
+      <xgr:node>before</xgr:node>
+    </xgr:port>
+    <xgr:port xgr:type="systemData">
+      <xgr:id>return_in_0</xgr:id>
+      <xgr:name>Parameter</xgr:name>
+      <xgr:node>return</xgr:node>
+    </xgr:port>
+    <xgr:edge xgr:type="data">
+      <xgr:fromPort>before_out_0</xgr:fromPort>
+      <xgr:toPort>TimestampServicePortType_appendTimeStamp_in_0</xgr:toPort>
+    </xgr:edge>
+    <xgr:edge xgr:type="data">
+      <xgr:fromPort>TimestampServicePortType_appendTimeStamp_out_0</xgr:fromPort>
+      <xgr:toPort>TimestampServicePortType_appendTimeStamp_2_in_0</xgr:toPort>
+    </xgr:edge>
+    <xgr:edge xgr:type="data">
+      <xgr:fromPort>TimestampServicePortType_appendTimeStamp_2_out_0</xgr:fromPort>
+      <xgr:toPort>return_in_0</xgr:toPort>
+    </xgr:edge>
+  </xgr:graph>
+  <xwf:wsdls>
+    <xwf:wsdl xwf:id="_">&lt;wsdl:definitions targetNamespace="http://indiana.edu" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://indiana.edu"
+  xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+  &lt;wsdl:types>
+    &lt;xs:schema targetNamespace="http://indiana.edu">
+            &lt;xs:element name="appendTimeStamp">
+                &lt;xs:complexType>
+                    &lt;xs:sequence>
+                        &lt;xs:element minOccurs="0" name="before" nillable="true" type="xs:string" />
+                    &lt;/xs:sequence>
+                &lt;/xs:complexType>
+            &lt;/xs:element>
+            &lt;xs:element name="appendTimeStampResponse">
+                &lt;xs:complexType>
+                    &lt;xs:sequence>
+                        &lt;xs:element minOccurs="0" name="return" nillable="true" type="xs:string" />
+                    &lt;/xs:sequence>
+                &lt;/xs:complexType>
+            &lt;/xs:element>
+        &lt;/xs:schema>
+  &lt;/wsdl:types>
+  &lt;wsdl:message name="appendTimeStampResponse">
+    &lt;wsdl:part name="parameters" element="ns:appendTimeStampResponse">
+    &lt;/wsdl:part>
+  &lt;/wsdl:message>
+  &lt;wsdl:message name="appendTimeStampRequest">
+    &lt;wsdl:part name="parameters" element="ns:appendTimeStamp">
+    &lt;/wsdl:part>
+  &lt;/wsdl:message>
+  &lt;wsdl:portType name="TimestampServicePortType">
+    &lt;wsdl:operation name="appendTimeStamp">
+      &lt;wsdl:input wsaw:Action="urn:appendTimeStamp" message="ns:appendTimeStampRequest">
+    &lt;/wsdl:input>
+      &lt;wsdl:output wsaw:Action="urn:appendTimeStampResponse" message="ns:appendTimeStampResponse">
+    &lt;/wsdl:output>
+    &lt;/wsdl:operation>
+  &lt;/wsdl:portType>
+  &lt;wsdl:binding name="TimestampServiceSoap11Binding" type="ns:TimestampServicePortType">
+    &lt;soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
+    &lt;wsdl:operation name="appendTimeStamp">
+      &lt;soap:operation soapAction="urn:appendTimeStamp" style="document" />
+      &lt;wsdl:input>
+        &lt;soap:body use="literal" />
+      &lt;/wsdl:input>
+      &lt;wsdl:output>
+        &lt;soap:body use="literal" />
+      &lt;/wsdl:output>
+    &lt;/wsdl:operation>
+  &lt;/wsdl:binding>
+  &lt;wsdl:service name="TimestampService">
+    &lt;wsdl:port name="TimestampServiceHttpSoap11Endpoint" binding="ns:TimestampServiceSoap11Binding">
+      &lt;soap:address location="http://pagodatree.cs.indiana.edu:8081/axis2/services/TimestampService" />
+    &lt;/wsdl:port>
+  &lt;/wsdl:service>
+&lt;/wsdl:definitions></xwf:wsdl>
+  </xwf:wsdls>
+  <xwf:image>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
+AQDgd/8B2MLNSngBKtIAAAAASUVORK5CYII=
+</xwf:image>
+</xwf:workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-engine/src/test/resources/axis2_default.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-engine/src/test/resources/axis2_default.xml b/modules/workflow-model/workflow-engine/src/test/resources/axis2_default.xml
new file mode 100644
index 0000000..aee2d25
--- /dev/null
+++ b/modules/workflow-model/workflow-engine/src/test/resources/axis2_default.xml
@@ -0,0 +1,278 @@
+<!--
+  ~ 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.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+
+    <!--If turned on with use the Accept header of the request to determine the contentType of the
+    response-->
+    <parameter name="httpContentNegotiation">false</parameter>
+
+    <!--During a fault, stacktrace can be sent with the fault message. The following flag will control -->
+    <!--that behaviour.-->
+    <parameter name="sendStacktraceDetailsWithFaults">true</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set then, Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <!--This is the user name and password of admin console-->
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguish those endpoints-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="false">false</parameter>
+
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <deployer extension=".jar" directory="transports" class="org.apache.axis2.deployment.TransportDeployer"/>
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the Default Message Receiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can override this for particular service by adding the same element with your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <!--Left commented because it adds the depandancy of servlet-api to other modules.
+        Please uncomment to Receive messages in multipart/form-data format-->
+        <!--<messageBuilder contentType="multipart/form-data"-->
+                         <!--class="org.apache.axis2.builder.MultipartFormDataBuilder"/>-->
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Target Resolvers -->
+    <!-- ================================================= -->
+    <!-- Uncomment the following and specify the class name for your TargetResolver to add -->
+    <!-- a TargetResolver. TargetResolvers are used to process the To EPR for example to -->
+    <!-- choose a server in a cluster -->
+    <!--<targetResolvers>-->
+    <!--<targetResolver class="" />-->
+    <!--</targetResolvers>-->
+
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment following parameter , and set as you required.-->
+        <!--<parameter name="hostname">http://myApp.com/ws</parameter>-->
+    </transportReceiver>
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--<transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6061</parameter>-->
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment following parameter , and set as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!--</transportReceiver>-->
+    <!--<transportSender name="tcp"-->
+                   <!--class="org.apache.axis2.transport.tcp.TCPTransportSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <!--<transportSender name="java"-->
+                     <!--class="org.apache.axis2.transport.java.JavaTransportSender"/>-->
+
+
+    <!-- ================================================= -->
+    <!--  SOAP Role Configuration                          -->
+    <!-- ================================================= -->
+    <!-- Use the following pattern to configure this axis2
+         instance to act in particular roles. Note that in
+         the absence of any configuration, Axis2 will act
+         only in the ultimate receiver role -->
+    <!--
+    <SOAPRoleConfiguration isUltimateReceiver="true">
+    	<role>http://my/custom/role</role>
+    </SOAPRoleConfiguration>
+	-->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System pre-defined phases       -->
+         <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+         </phase>
+        <phase name="Addressing">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System pre defined phases       -->
+        <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-component/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-component/pom.xml b/modules/workflow-model/workflow-model-component/pom.xml
new file mode 100644
index 0000000..d7cbee3
--- /dev/null
+++ b/modules/workflow-model/workflow-model-component/pom.xml
@@ -0,0 +1,104 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--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. -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata-workflow-model-parent</artifactId>
+        <version>0.13-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-workflow-model-component</artifactId>
+    <packaging>jar</packaging>
+    <name>Airavata Workflow Component</name>
+    <url>http://airavata.apache.org/</url>
+
+    <!-- Edit the following properties. -->
+    <profiles>
+        <profile>
+            <id>collective</id>
+            <activation>
+                <file>
+                    <exists>betacollective</exists>
+                </file>
+            </activation>
+            <properties>
+                <!-- Inherited from the parent in this collective build. -->
+                <ssl.trustedCertsFile>${trustedCertsLocation}</ssl.trustedCertsFile>
+                <build.scope>provided</build.scope>
+                <build.jsf>compile</build.jsf>
+            </properties>
+        </profile>
+    </profiles>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${surefire.version}</version>
+                <configuration>
+                    <includes>
+                        <include>**/*Suite.java</include>
+                    </includes>
+                    <excludes>
+                        <exclude>**/*Test.java</exclude>
+                        <exclude>**/*Tests.java</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.ogce</groupId>
+            <artifactId>xsul</artifactId>
+            <version>${xsul.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-common-utils</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-api-stubs</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+            <version>${org.slf4j.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>${org.slf4j.version}</version>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-workflow-model-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+</project>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentReference.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentReference.java b/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentReference.java
new file mode 100644
index 0000000..2adbb1b
--- /dev/null
+++ b/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentReference.java
@@ -0,0 +1,66 @@
+/*
+ *
+ * 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.workflow.model.component.registry;
+
+import java.util.List;
+
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.workflow.model.component.Component;
+import org.apache.airavata.workflow.model.component.ComponentException;
+import org.apache.airavata.workflow.model.component.ComponentReference;
+import org.apache.airavata.workflow.model.component.ComponentRegistryException;
+import org.apache.airavata.workflow.model.component.ws.WSComponent;
+import org.apache.airavata.workflow.model.component.ws.WSComponentFactory;
+
+public class JCRComponentReference extends ComponentReference {
+
+    private ApplicationInterfaceDescription application;
+    
+    private List<WSComponent> components;
+
+    public JCRComponentReference(String name, ApplicationInterfaceDescription application) {
+        super(name);
+        this.application=application;
+    }
+
+    /**
+     * @throws ComponentException
+     * @throws ComponentRegistryException
+     * @see org.apache.airavata.workflow.model.component.ComponentReference#getComponent()
+     */
+    @Override
+    @Deprecated
+    public Component getComponent() throws ComponentException, ComponentRegistryException {
+        return getComponents().get(0);
+    }
+
+    /**
+     * @see org.apache.airavata.workflow.model.component.ComponentReference#getComponents()
+     */
+    @Override
+    public List<WSComponent> getComponents() throws ComponentRegistryException, ComponentException {
+        if (this.components == null) {
+            this.components = WSComponentFactory.createComponents(application);
+        }
+        return this.components;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java b/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
new file mode 100644
index 0000000..c1d3c65
--- /dev/null
+++ b/modules/workflow-model/workflow-model-component/src/main/java/org/apache/airavata/workflow/model/component/registry/JCRComponentRegistry.java
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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.workflow.model.component.registry;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.airavata.api.Airavata;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.workflow.model.component.ComponentReference;
+import org.apache.airavata.workflow.model.component.ComponentRegistry;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class JCRComponentRegistry extends ComponentRegistry {
+
+    private static final Logger log = LoggerFactory.getLogger(JCRComponentRegistry.class);
+    private static final String NAME = "Applications";
+    private Airavata.Client client;
+    
+    public JCRComponentRegistry(Airavata.Client client) {
+    	setClient(client);
+    }
+
+    /**
+     * @see org.apache.airavata.workflow.model.component.registry.ComponentRegistry#getComponentReferenceList()
+     */
+    @Override
+    public List<ComponentReference> getComponentReferenceList() {
+        List<ComponentReference> tree = new ArrayList<ComponentReference>();
+        try {
+        	List<ApplicationInterfaceDescription> allApplicationInterfaces = client.getAllApplicationInterfaces();
+        	for (ApplicationInterfaceDescription interfaceDescription : allApplicationInterfaces) {
+        		JCRComponentReference jcr = new JCRComponentReference(interfaceDescription.getApplicationName(),interfaceDescription);
+                tree.add(jcr);
+			}
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+		}
+
+        return tree;
+    }
+
+    /**
+     * @see org.apache.airavata.workflow.model.component.registry.ComponentRegistry#getName()
+     */
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
+	public Airavata.Client getClient() {
+		return client;
+	}
+
+	public void setClient(Airavata.Client client) {
+		this.client = client;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/pom.xml b/modules/workflow-model/workflow-model-core/pom.xml
index e4db95a..a4ce300 100644
--- a/modules/workflow-model/workflow-model-core/pom.xml
+++ b/modules/workflow-model/workflow-model-core/pom.xml
@@ -64,6 +64,11 @@
             <artifactId>airavata-common-utils</artifactId>
             <version>${project.version}</version>
         </dependency>
+	<dependency>
+            <groupId>org.apache.airavata</groupId>
+            <artifactId>airavata-data-models</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-api</artifactId>

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java
index 15f61fb..7d532fd 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/system/SubWorkflowComponent.java
@@ -34,7 +34,7 @@ public class SubWorkflowComponent extends WSComponent {
     private Workflow workflow;
 
     private SubWorkflowComponent(Workflow workflow) throws ComponentException {
-        super(workflow.getWorkflowWSDL());
+//        super(workflow.getWorkflowWSDL());
         this.workflow = workflow;
 
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/web/WebComponentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/web/WebComponentRegistry.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/web/WebComponentRegistry.java
index 69f6666..3f66877 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/web/WebComponentRegistry.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/web/WebComponentRegistry.java
@@ -160,9 +160,6 @@ public class WebComponentRegistry extends ComponentRegistry {
         } catch (IOException e) {
             // Ignore
             logger.error(e.getMessage(), e);
-        } catch (ComponentException e) {
-            // Malformed WSDL.
-            logger.error(e.getMessage(), e);
         } catch (RuntimeException e) {
             logger.error(e.getMessage(), e);
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponent.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponent.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponent.java
index 3f5d2c1..ccdaaba 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponent.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponent.java
@@ -21,45 +21,34 @@
 
 package org.apache.airavata.workflow.model.component.ws;
 
-import java.net.URI;
 import java.util.ArrayList;
 import java.util.List;
 
 import javax.xml.namespace.QName;
 
-import org.apache.airavata.common.exception.UtilsException;
 import org.apache.airavata.common.utils.WSConstants;
-import org.apache.airavata.common.utils.WSDLUtil;
-import org.apache.airavata.common.utils.XMLUtil;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
+import org.apache.airavata.model.appcatalog.appinterface.InputDataObjectType;
+import org.apache.airavata.model.appcatalog.appinterface.OutputDataObjectType;
 import org.apache.airavata.workflow.model.component.Component;
 import org.apache.airavata.workflow.model.component.ComponentControlPort;
 import org.apache.airavata.workflow.model.component.ComponentException;
-import org.apache.airavata.workflow.model.gpel.DSCUtil;
 import org.apache.airavata.workflow.model.graph.Graph;
 import org.apache.airavata.workflow.model.graph.Node;
 import org.apache.airavata.workflow.model.graph.ws.WSNode;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.xmlpull.infoset.XmlCharacters;
 import org.xmlpull.infoset.XmlElement;
+import org.xmlpull.infoset.XmlNamespace;
 
-import xsul5.wsdl.WsdlDefinitions;
-import xsul5.wsdl.WsdlDocumentation;
-import xsul5.wsdl.WsdlMessage;
-import xsul5.wsdl.WsdlMessagePart;
-import xsul5.wsdl.WsdlPortType;
-import xsul5.wsdl.WsdlPortTypeInput;
-import xsul5.wsdl.WsdlPortTypeOperation;
-import xsul5.wsdl.WsdlPortTypeOutput;
+import xsul5.XmlConstants;
 
 public class WSComponent extends Component {
 
     private static final Logger logger = LoggerFactory.getLogger(WSComponent.class);
 
-    protected WsdlDefinitions wsdl;
-
-    protected QName wsdlQName;
-
+    private ApplicationInterfaceDescription application;
+    
     /**
      * The list of output component ports.
      */
@@ -74,8 +63,6 @@ public class WSComponent extends Component {
 
     private String operationName;
 
-    private String targetNamespace;
-
     private QName portTypeQName;
 
     private String inputPartName;
@@ -93,74 +80,54 @@ public class WSComponent extends Component {
     /**
      * Constructs a WSComponent.
      * 
-     * @param componentPath
-     * @param wsdl
-     * @throws ComponentException
-     */
-    public WSComponent(WsdlDefinitions wsdl) throws ComponentException {
-        // This constructor is called only from WorkflowComponent where we know
-        // that there is only one operation in WSDL.
-        this(wsdl, null, null);
-    }
-
-    /**
-     * Constructs a WSComponent.
-     * 
      * @param wsdl
      * @param portTypeQName
      * @param operationName
      * @throws ComponentException
      */
-    public WSComponent(WsdlDefinitions wsdl, QName portTypeQName, String operationName) throws ComponentException {
+    public WSComponent(ApplicationInterfaceDescription application, String operationName) throws ComponentException {
+        this.operationName = operationName;
+        this.description = application.getApplicationDesription();
+        this.setApplication(application);
+        setName(application.getApplicationName());
+        
         this.inputs = new ArrayList<WSComponentPort>();
         this.outputs = new ArrayList<WSComponentPort>();
+        
+        List<InputDataObjectType> applicationInputs = application.getApplicationInputs();
+        for (InputDataObjectType inputDataObjectType : applicationInputs) {
+        	
+        	String typeName = inputDataObjectType.getType().toString().toLowerCase();
+            XmlNamespace namespace = null;
+            namespace = XmlConstants.BUILDER.newNamespace("xsd", WSConstants.XSD_NS_URI);
+            String prefix = "xsd";
+            QName type = new QName(namespace.getName(), typeName, prefix);
+            
+            WSComponentPort port = new WSComponentPort(inputDataObjectType.getName(),type , this);
+            port.setDescription(inputDataObjectType.getUserFriendlyDescription());
+            port.setDefaultValue(inputDataObjectType.getValue());
+			inputs.add(port);
+		}
 
-        try {
-            this.wsdl = wsdl;
-            if (portTypeQName == null) {
-                portTypeQName = WSDLUtil.getFirstPortTypeQName(wsdl);
-            }
-            this.portTypeQName = portTypeQName;
-            if (operationName == null) {
-                operationName = WSDLUtil.getFirstOperationName(wsdl, this.portTypeQName);
-            }
-            this.operationName = operationName;
-            this.description = ""; // To prevent to show null
-
-            setName(this.portTypeQName.getLocalPart() + ":" + this.operationName);
-
-            parse();
-        } catch (UtilsException e) {
-            e.printStackTrace();
-        }
+        List<OutputDataObjectType> applicationOutputs = application.getApplicationOutputs();
+        for (OutputDataObjectType outputDataObjectType : applicationOutputs) {
+        	
+        	String typeName = outputDataObjectType.getType().toString().toLowerCase();
+            XmlNamespace namespace = null;
+            namespace = XmlConstants.BUILDER.newNamespace("xsd", WSConstants.XSD_NS_URI);
+            String prefix = "xsd";
+            QName type = new QName(namespace.getName(), typeName, prefix);
+            
+            WSComponentPort port = new WSComponentPort(outputDataObjectType.getName(),type , this);
+            port.setDefaultValue(outputDataObjectType.getValue());
+            outputs.add(port);
+		}
 
         this.controlInPort = new ComponentControlPort();
         this.controlOutPorts.add(new ComponentControlPort());
     }
 
-    /**
-     * @return The WSDL
-     */
-    public WsdlDefinitions getWSDL() {
-        return this.wsdl;
-    }
 
-    public WsdlDefinitions getConcreteWSDL(URI dscUri) {
-        if (WSDLUtil.isAWSDL(this.wsdl)) {
-            return DSCUtil.convertToCWSDL(this.wsdl, dscUri);
-        } else {
-            return this.wsdl;
-        }
-    }
-
-    /**
-     * Returns the QName of the WSDL.
-     * 
-     * @return The QName of the WSDL.
-     */
-    public QName getWSDLQName() {
-        return this.wsdlQName;
-    }
 
     /**
      * Returns the QName of the portType.
@@ -267,7 +234,7 @@ public class WSComponent extends Component {
 
         StringBuffer buf = new StringBuffer();
         buf.append("<html>\n");
-        buf.append("<h1>Service: " + getName() + "</h1>\n");
+        buf.append("<h1>Application: " + getName() + "</h1>\n");
 
         buf.append("<h2>Description:</h2>\n");
         buf.append(this.description);
@@ -286,20 +253,6 @@ public class WSComponent extends Component {
         return buf.toString();
     }
 
-    /**
-     * @return The XML Element.
-     */
-    public XmlElement toXML() {
-        return this.wsdl.xml();
-    }
-
-    /**
-     * @return The WSDL in String.
-     */
-    public String toXMLText() {
-        return this.wsdl.xmlStringPretty();
-    }
-
     private void messageToHtml(List<WSComponentPort> ports, StringBuffer buf) {
         buf.append("<dl>\n");
         for (WSComponentPort port : ports) {
@@ -312,196 +265,16 @@ public class WSComponent extends Component {
         buf.append("</dl>\n");
     }
 
-    private void parse() throws ComponentException {
-
-        // The name of WSDL changes even with the same portType.
-        // this.name = this.definitions.getAttributeValue(null, "name");
-
-        this.targetNamespace = this.wsdl.getTargetNamespace();
-
-        String wsdlName = this.wsdl.xml().attributeValue(WSConstants.NAME_ATTRIBUTE);
-        if (wsdlName == null) {
-            wsdlName = "NoName"; // TODO
-        }
-        this.wsdlQName = new QName(this.targetNamespace, wsdlName);
-
-        WsdlDocumentation documentation = this.wsdl.getDocumentation();
-        if (documentation != null) {
-            StringBuffer buf = new StringBuffer();
-            for (Object child : documentation.xml().children()) {
-                if (child instanceof String) {
-                    buf.append(child.toString());
-                } else if (child instanceof XmlCharacters) {
-                    buf.append(((XmlCharacters) child).getText());
-                }
-            }
-            this.description = buf.toString();
-        }
-
-        WsdlPortType portType = this.wsdl.getPortType(this.portTypeQName.getLocalPart());
-        if (portType == null) {
-            throw new ComponentException("portType, " + this.portTypeQName + " is not defined.");
-        }
-        parsePortType(portType);
-    }
-
-    private void parsePortType(WsdlPortType portType) throws ComponentException {
-        WsdlPortTypeOperation operation = portType.getOperation(this.operationName);
-        if (operation == null) {
-            throw new ComponentException("Operation, " + this.operationName + " is not defined.");
-        }
-        parseOperation(operation);
-    }
-
-    private void parseOperation(WsdlPortTypeOperation operation) throws ComponentException {
-
-        WsdlPortTypeInput input = operation.getInput();
-        // No input is possible.
-        if (input != null) {
-            WsdlMessage inputMessage = input.lookupMessage();
-            this.inputs = parseMessage(inputMessage, true);
-        }
-
-        WsdlPortTypeOutput output = operation.getOutput();
-        // No output is possible.
-        if (output != null) {
-            WsdlMessage outputMessage = output.lookupMessage();
-            this.outputs = parseMessage(outputMessage, false);
-        }
-    }
-
-    private List<WSComponentPort> parseMessage(WsdlMessage message, boolean input) throws ComponentException {
-        List<WSComponentPort> parts = new ArrayList<WSComponentPort>();
-        for (WsdlMessagePart part : message.parts()) {
-            String partName = part.getName();
-            if (input) {
-                this.inputPartName = partName;
-            } else {
-                this.outputPartName = partName;
-            }
+	public XmlElement toXML() {
+		return null;
+	}
 
-            QName partElement = part.getElement();
-            if (partElement == null) {
-                // In case type is used directly. This is an old way.
-                QName partType = part.getType();
-                if (partType != null) {
-                    parts.add(new WSComponentPort(partName, partType, this));
-                }
-
-            } else {
-                String typeName = partElement.getLocalPart();
-                if (input) {
-                    this.inputTypeName = typeName;
-                } else {
-                    this.outputTypeName = typeName;
-                }
-                parseType(typeName, parts);
-            }
-        }
-        return parts;
-    }
+	public ApplicationInterfaceDescription getApplication() {
+		return application;
+	}
 
-    private void parseType(String typeName, List<WSComponentPort> parts) throws ComponentException {
+	public void setApplication(ApplicationInterfaceDescription application) {
+		this.application = application;
+	}
 
-        XmlElement typesElement = this.wsdl.getTypes();
-        if (typesElement == null) {
-            throw new ComponentException("No types is defined.");
-        }
-
-        if (typesElement.element(null, WSConstants.SCHEMA_TAG) == null) {
-            throw new ComponentException("No schema is defined.");
-        }
-
-        XmlElement elementElement = null;
-        XmlElement schemaElement = null;
-
-        Iterable<XmlElement> schemaElements = typesElement.elements(null, WSConstants.SCHEMA_TAG);
-        for (XmlElement elemt : schemaElements) {
-            schemaElement = elemt;
-            elementElement = findElementElement(typeName, elemt);
-            if (null != elementElement) {
-                break;
-            }
-        }
-
-        if (elementElement == null) {
-            throw new ComponentException("No element is defined for " + typeName);
-        }
-        String typesTargetNamespace = schemaElement.attributeValue(WSConstants.TARGET_NAMESPACE_ATTRIBUTE);
-        String elementType = elementElement.attributeValue(WSConstants.TYPE_ATTRIBUTE);
-
-        XmlElement sequenceElement;
-        if (elementType == null) {
-            // anonymous type
-            XmlElement complexElement = elementElement.element(null, WSConstants.COMPLEX_TYPE_TAG);
-            if (complexElement == null) {
-                throw new ComponentException("We only support complexType as annonymous type: "
-                        + XMLUtil.xmlElementToString(elementElement));
-            }
-            sequenceElement = complexElement.element(null, WSConstants.SEQUENCE_TAG);
-            // TODO Check if there is any other defined.
-        } else {
-            // named complexType
-            String elementTypeName = XMLUtil.getLocalPartOfQName(elementType);
-            XmlElement typeElement = findTypeElement(elementTypeName, schemaElement);
-            sequenceElement = typeElement.element(null, WSConstants.SEQUENCE_TAG);
-            // TODO Check if there is any other defined.
-        }
-
-        if (sequenceElement == null) {
-            // Assume that there is no input/output.
-            logger.debug("There is no sequence defined.");
-        } else {
-            // Only supports elements in the sequence now.
-            for (XmlElement element : sequenceElement.elements(null, WSConstants.ELEMENT_TAG)) {
-                WSComponentPort componentPort = new WSComponentPort(element, typesTargetNamespace, this);
-                // Check if the type is defined in types
-                QName paramType = componentPort.getType();
-                if (!(WSConstants.XSD_NS_URI.equalsIgnoreCase(paramType.getNamespaceURI()))) {
-                    XmlElement typeDefinition = null;
-                    try {
-                        typeDefinition = WSDLUtil.getTypeDefinition(this.wsdl, paramType);
-                    } catch (UtilsException e) {
-                        e.printStackTrace();
-                    }
-                    if (typeDefinition == null) {
-                        throw new ComponentException("could not find definition for type " + paramType + " in "
-                                + this.wsdlQName);
-                    }
-                }
-                parts.add(componentPort);
-            }
-        }
-    }
-
-    /**
-     * @param typeName
-     * @param schemaElement
-     * @return The XmlElement
-     */
-    private XmlElement findElementElement(String typeName, XmlElement schemaElement) {
-        for (XmlElement element : schemaElement.elements(null, WSConstants.ELEMENT_TAG)) {
-            String elementName = element.attributeValue(WSConstants.NAME_ATTRIBUTE);
-            if (typeName.equals(elementName)) {
-                return element;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * @param typeName
-     * @param schemaElement
-     * @return The XmlElement
-     */
-    private XmlElement findTypeElement(String typeName, XmlElement schemaElement) {
-        // Only supports complexType now
-        for (XmlElement complexTypeElement : schemaElement.elements(null, WSConstants.COMPLEX_TYPE_TAG)) {
-            String elementName = complexTypeElement.attributeValue(WSConstants.NAME_ATTRIBUTE);
-            if (typeName.equals(elementName)) {
-                return complexTypeElement;
-            }
-        }
-        return null;
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java
index 97b10fc..8c8bacc 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentFactory.java
@@ -24,18 +24,9 @@ package org.apache.airavata.workflow.model.component.ws;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.xml.namespace.QName;
-
-import org.apache.airavata.common.exception.UtilsException;
-import org.apache.airavata.common.utils.WSDLUtil;
-import org.apache.airavata.common.utils.XMLUtil;
+import org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription;
 import org.apache.airavata.workflow.model.component.ComponentException;
 import org.apache.airavata.workflow.model.utils.MessageConstants;
-import org.xmlpull.infoset.XmlElement;
-
-import xsul5.wsdl.WsdlDefinitions;
-import xsul5.wsdl.WsdlPortType;
-import xsul5.wsdl.WsdlPortTypeOperation;
 
 public class WSComponentFactory {
 
@@ -44,70 +35,12 @@ public class WSComponentFactory {
      * @return The list of components in the specified WSDL.
      * @throws ComponentException
      */
-    public static List<WSComponent> createComponents(String wsdlString) throws ComponentException {
-        try {
-            return createComponents(XMLUtil.stringToXmlElement(wsdlString));
-        } catch (RuntimeException e) {
-            throw new ComponentException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
-        }
-
-    }
-
-    /**
-     * @param componentElement
-     * @return The list of components in the specified WSDL.
-     * @throws ComponentException
-     */
-    public static List<WSComponent> createComponents(XmlElement componentElement) throws ComponentException {
-        try {
-            WsdlDefinitions definitions = new WsdlDefinitions(componentElement);
-            return createComponents(definitions);
-        } catch (RuntimeException e) {
-            throw new ComponentException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
-        }
-    }
-
-    /**
-     * @param wsdl
-     * @return The list of components in the specified WSDL.
-     * @throws ComponentException
-     */
-    public static List<WSComponent> createComponents(WsdlDefinitions wsdl) throws ComponentException {
-        List<WSComponent> components = new ArrayList<WSComponent>();
-        try {
-            QName portTypeQName = WSDLUtil.getFirstPortTypeQName(wsdl);
-            WsdlPortType portType = wsdl.getPortType(portTypeQName.getLocalPart());
-            for (WsdlPortTypeOperation operation : portType.operations()) {
-                String operationName = operation.getOperationName();
-                WSComponent component = createComponent(wsdl, portTypeQName, operationName);
-                components.add(component);
-            }
-        } catch (Exception e) {
-            throw new ComponentException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
-        }
+    public static List<WSComponent> createComponents(ApplicationInterfaceDescription application) throws ComponentException {
+    	List<WSComponent> components = new ArrayList<WSComponent>();
+        WSComponent component = createComponent(application, application.getApplicationInterfaceId());
+        components.add(component);
         return components;
-    }
 
-    /**
-     * Creates a WSComponent.
-     * 
-     * @param wsdlString
-     *            The string representation of the component
-     * @return The WsdlComponent created
-     * @throws ComponentException
-     */
-    @Deprecated
-    public static WSComponent createComponent(String wsdlString) throws ComponentException {
-        return createComponents(wsdlString).get(0);
-    }
-
-    /**
-     * @param wsdl
-     * @return The Component created
-     * @throws ComponentException
-     */
-    public static WSComponent createComponent(WsdlDefinitions wsdl) throws ComponentException {
-        return createComponent(wsdl, null, null);
     }
 
     /**
@@ -117,31 +50,24 @@ public class WSComponentFactory {
      * @return The component created.
      * @throws ComponentException
      */
-    public static WSComponent createComponent(WsdlDefinitions wsdl, QName portTypeQName, String operationName)
+    public static WSComponent createComponent(ApplicationInterfaceDescription application, String operationName)
             throws ComponentException {
         try {
-            if (portTypeQName == null) {
-                portTypeQName = WSDLUtil.getFirstPortTypeQName(wsdl);
-            }
-            if (operationName == null) {
-                operationName = WSDLUtil.getFirstOperationName(wsdl, portTypeQName);
-            }
-
-            // check if it's WSComponent or WorkflowComponent
-            WsdlPortType portType = wsdl.getPortType(portTypeQName.getLocalPart());
-            XmlElement templateIDElement = portType.xml().element(WorkflowComponent.GPEL_NAMESPACE,
-                    WorkflowComponent.WORKFLOW_TEMPLATE_ID_TAG);
             WSComponent component;
-            if (templateIDElement == null) {
-                component = new WSComponent(wsdl, portTypeQName, operationName);
-            } else {
-                component = new WorkflowComponent(wsdl, portTypeQName, operationName);
-            }
+            component = new WSComponent(application, operationName);
             return component;
         } catch (RuntimeException e) {
             throw new ComponentException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
-        } catch (UtilsException e) {
-            throw new ComponentException(MessageConstants.COMPONENT_FORMAT_ERROR, e);
         }
     }
+
+	public static List<WSComponent> createComponents(
+			xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5) {
+		return null;
+	}
+
+	public static List<WSComponent> createComponents(String compString) {
+		// TODO Auto-generated method stub
+		return null;
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/a8974b7c/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentPort.java
----------------------------------------------------------------------
diff --git a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentPort.java b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentPort.java
index 67f3b99..259744e 100644
--- a/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentPort.java
+++ b/modules/workflow-model/workflow-model-core/src/main/java/org/apache/airavata/workflow/model/component/ws/WSComponentPort.java
@@ -74,15 +74,6 @@ public class WSComponentPort extends ComponentDataPort {
         this.schemaUsed = false;
     }
 
-    protected WSComponentPort(XmlElement element, String targetNamespace, WSComponent component)
-            throws ComponentException {
-        this.component = component;
-        this.elementElement = element;
-        this.targetNamespace = targetNamespace;
-        this.schemaUsed = true;
-        parse(element);
-    }
-
     /**
      * @return The component
      */
@@ -189,20 +180,7 @@ public class WSComponentPort extends ComponentDataPort {
             // TODO fix this.
             this.type = WSConstants.XSD_ANY_TYPE;
         } else {
-            String typeName = XMLUtil.getLocalPartOfQName(typeQNameString);
-            String prefix = XMLUtil.getPrefixOfQName(typeQNameString);
-            XmlNamespace namespace = null;
-            if (prefix == null) {
-                if ("string".equals(typeName) || "int".equals(typeName)) {
-                    namespace = XmlConstants.BUILDER.newNamespace("xsd", WSConstants.XSD_NS_URI);
-                    prefix = "xsd";
-                } else {
-                    throw new ComponentException("Namespace prefix, " + prefix + ", is not defined");
-                }
-            } else {
-                namespace = element.lookupNamespaceByPrefix(prefix);
-            }
-            this.type = new QName(namespace.getName(), typeName, prefix);
+            
         }
 
         // annotation


Mime
View raw message