airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject [09/20] updating xbaya gui to the new airavata
Date Fri, 11 Jul 2014 22:21:22 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
deleted file mode 100644
index cd2db2b..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/ServiceNotificationSender.java
+++ /dev/null
@@ -1,161 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service;
-
-import java.net.URI;
-import java.util.Properties;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.workflow.tracking.Notifier;
-import org.apache.airavata.workflow.tracking.NotifierFactory;
-import org.apache.airavata.workflow.tracking.common.InvocationContext;
-import org.apache.airavata.workflow.tracking.common.InvocationEntity;
-import org.apache.airavata.workflow.tracking.common.WorkflowTrackingContext;
-import org.apache.axis2.addressing.EndpointReference;
-import org.apache.xmlbeans.XmlObject;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlDocument;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.XmlConstants;
-import xsul.lead.LeadContextHeader;
-import xsul.soap.SoapUtil;
-import xsul.soap11_util.Soap11Util;
-import xsul.soap12_util.Soap12Util;
-import xsul.xbeans_util.XBeansUtil;
-
-public class ServiceNotificationSender {
-
-    private final static Logger logger = LoggerFactory.getLogger(ServiceNotificationSender.class);
-
-    private final static String INVOKED_MESSAGE = "Service is invoked";
-
-    private final static String SENDING_RESULT_MESSAGE = "Sending successful result of invocation";
-
-    private Notifier notifier;
-
-    private InvocationEntity initiator;
-
-    private InvocationEntity receiver;
-
-    private InvocationContext invocationContext;
-
-    private WorkflowTrackingContext context;
-
-    private SoapUtil soapFragrance;
-
-    /**
-     * @param inputElement
-     * @return The ServiceNotificationSender
-     */
-    public static ServiceNotificationSender invoked(XmlElement inputElement) {
-        try {
-
-            XmlElement soapBody = (XmlElement) inputElement.getParent();
-            XmlElement soapEnvelope = (XmlElement) soapBody.getParent();
-            SoapUtil soapFragrance = SoapUtil.selectSoapFragrance(soapEnvelope,
-                    new SoapUtil[] { Soap11Util.getInstance(), Soap12Util.getInstance() });
-            XmlElement soapHeader = soapEnvelope.element(null, XmlConstants.S_HEADER);
-            XmlElement leadHeader = soapHeader.element(LeadContextHeader.NS, LeadContextHeader.TYPE.getLocalPart());
-            logger.info("leadHeader: " + XMLUtil.xmlElementToString(leadHeader));
-            if (leadHeader == null) {
-                return null;
-            }
-            LeadContextHeader leadContext = new LeadContextHeader(leadHeader);
-            ServiceNotificationSender sender = new ServiceNotificationSender(soapFragrance, leadContext);
-            sender.serviceInvoked(inputElement);
-
-            return sender;
-        } catch (RuntimeException e) {
-            logger.error(e.getMessage(), e);
-            return null;
-        }
-    }
-
-    /**
-     * Constructs a ServiceNotificationSender.
-     * 
-     * @param soapFragrance
-     * @param leadContext
-     */
-    private ServiceNotificationSender(SoapUtil soapFragrance, LeadContextHeader leadContext) {
-        this.soapFragrance = soapFragrance;
-        this.notifier = NotifierFactory.createNotifier();
-
-        URI workflowID = leadContext.getWorkflowId();
-        String serviceIDString = leadContext.getServiceId();
-        if (serviceIDString == null) {
-            serviceIDString = "serviceIDWasNull";
-        }
-        URI serviceID = URI.create(serviceIDString);
-        String nodeID = leadContext.getNodeId();
-        String timeStepString = leadContext.getTimeStep();
-        Integer timeStep = null;
-        if (timeStepString != null) {
-            try {
-                timeStep = new Integer(timeStepString);
-            } catch (NumberFormatException e) {
-                logger.error(e.getMessage(), e);
-            }
-        }
-        this.initiator = this.notifier.createEntity(workflowID, serviceID, nodeID, timeStep);
-        this.receiver = this.notifier.createEntity(workflowID, serviceID, nodeID, timeStep);
-        EndpointReference epr = new EndpointReference(leadContext.getEventSink().getAddress().toString());
-        this.context = this.notifier.createTrackingContext(new Properties(), epr.toString(), workflowID, serviceID,
-                nodeID, timeStep);
-    }
-
-    /**
-     * @param inputElement
-     */
-    private void serviceInvoked(XmlElement inputElement) {
-        XmlElement soapBody = (XmlElement) inputElement.getParent();
-        XmlElement soapEnvelope = (XmlElement) soapBody.getParent();
-        XmlElement soapHeader = soapEnvelope.element(null, XmlConstants.S_HEADER);
-        XmlObject headerObject = XBeansUtil.xmlElementToXmlObject(soapHeader);
-        XmlObject bodyObject = XBeansUtil.xmlElementToXmlObject(soapBody);
-        this.invocationContext = this.notifier.serviceInvoked(this.context, this.initiator, headerObject, bodyObject,
-                INVOKED_MESSAGE);
-    }
-
-    /**
-     * @param outputElement
-     */
-    public void sendingResult(XmlElement outputElement) {
-        try {
-            XmlDocument document = this.soapFragrance.wrapBodyContent(outputElement);
-            XmlElement soapEnvelope = document.getDocumentElement();
-            XmlElement soapHeader = soapEnvelope.element(null, XmlConstants.S_HEADER);
-            XmlElement soapBody = soapEnvelope.element(null, XmlConstants.S_BODY);
-            XmlObject headerObject = null;
-            if (soapHeader != null) {
-                headerObject = XBeansUtil.xmlElementToXmlObject(soapHeader);
-            }
-            XmlObject bodyObject = XBeansUtil.xmlElementToXmlObject(soapBody);
-            this.notifier.sendingResult(this.context, this.invocationContext, headerObject, bodyObject,
-                    SENDING_RESULT_MESSAGE);
-        } catch (RuntimeException e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/Adder.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/Adder.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/Adder.java
deleted file mode 100644
index 1d29245..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/Adder.java
+++ /dev/null
@@ -1,54 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.adder;
-
-import java.io.File;
-
-import org.apache.airavata.xbaya.test.service.Service;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.xwsif_runtime.XmlElementBasedStub;
-
-public interface Adder extends XmlElementBasedStub {
-
-    /**
-     * SERVICE_NAME
-     */
-    public final static String SERVICE_NAME = "AdderService";
-
-    /**
-     * WSDL_NAME
-     */
-    public final static String WSDL_NAME = "adder.wsdl";
-
-    /**
-     * WSDL_PATH
-     */
-    public final static String WSDL_PATH = Service.MATH_DIRECTORY_NAME + File.separator + WSDL_NAME;
-
-    /**
-     * @param input
-     *            the input message
-     * @return the output message
-     */
-    public XmlElement add(XmlElement input);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderClient.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderClient.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderClient.java
deleted file mode 100644
index d3cfe7c..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderClient.java
+++ /dev/null
@@ -1,114 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.adder;
-
-import java.net.URI;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsif.WSIFMessage;
-import xsul.wsif.WSIFOperation;
-import xsul.wsif.WSIFPort;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xwsif_runtime.WSIFClient;
-import xsul.xwsif_runtime.WSIFRuntime;
-import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator;
-
-public class AdderClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(AdderClient.class);
-
-    private AdderService service;
-
-    /**
-     * 
-     */
-    public void run() {
-        String wsdlLoc = startServer();
-        runClient(wsdlLoc);
-        shutdownServer();
-    }
-
-    private String startServer() {
-        this.service = new AdderService();
-        this.service.run();
-        return this.service.getServiceWsdlLocation();
-    }
-
-    private void shutdownServer() {
-        this.service.shutdownServer();
-    }
-
-    private void runClient(String wsdlLoc) {
-        logger.info("Invoking operation echoString using WSDL from " + wsdlLoc);
-
-        WSIFAsyncResponsesCorrelator correlator;
-        correlator = null;
-
-        // pass some headers
-        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
-        helper.setXBayaConfiguration(new XBayaConfiguration());
-        LeadContextHeader leadContext = helper.getLeadContextHeader();
-        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
-        leadContext.setNodeId("decoder1");
-        leadContext.setTimeStep("5");
-        leadContext.setServiceId("decoder-instance-10");
-
-        WSIFClient wclient = WSIFRuntime.newClient(wsdlLoc)
-                .addHandler(new StickySoapHeaderHandler("use-lead-header", leadContext)).useAsyncMessaging(correlator)
-                .setAsyncResponseTimeoutInMs(33000L); // to simplify testing set to just few
-        // seconds
-
-        WSIFPort port = wclient.getPort();
-        WSIFOperation operation = port.createOperation("add");
-        WSIFMessage inputMessage = operation.createInputMessage();
-        WSIFMessage outputMessage = operation.createOutputMessage();
-        WSIFMessage faultMessage = operation.createFaultMessage();
-
-        inputMessage.setObjectPart("x", "2");
-        inputMessage.setObjectPart("y", "3");
-
-        logger.info("Sending a message:\n" + XMLUtil.xmlElementToString((XmlElement) inputMessage));
-        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
-
-        XmlElement result;
-        if (success) {
-            result = (XmlElement) outputMessage;
-        } else {
-            result = (XmlElement) faultMessage;
-        }
-        logger.info("Received message:\n" + XMLUtil.xmlElementToString(result));
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        (new AdderClient()).run();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderImpl.java
deleted file mode 100644
index ee37bf4..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderImpl.java
+++ /dev/null
@@ -1,79 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.adder;
-
-import java.util.Random;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.ServiceNotificationSender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-import org.xmlpull.v1.builder.XmlNamespace;
-
-import xsul.XmlConstants;
-
-public class AdderImpl implements Adder {
-
-    private final static Logger logger = LoggerFactory.getLogger(AdderImpl.class);
-
-    /**
-     * @see org.apache.airavata.xbaya.test.service.adder.Adder#add(org.xmlpull.v1.builder.XmlElement)
-     */
-    public XmlElement add(XmlElement inputElement) {
-        logger.info(XMLUtil.xmlElementToString(inputElement));
-        ServiceNotificationSender notifier = ServiceNotificationSender.invoked(inputElement);
-
-        XmlElement xElement = inputElement.requiredElement(null, "x");
-        XmlElement yElement = inputElement.requiredElement(null, "y");
-        String xString = xElement.requiredTextContent();
-        String yString = yElement.requiredTextContent();
-
-        int x = Integer.parseInt(xString);
-        int y = Integer.parseInt(yString);
-
-        int z = x + y;
-
-        Random random = new Random();
-        int msec = random.nextInt(5000);
-        logger.info("Sleep for " + msec + " msec");
-        try {
-            Thread.sleep(msec);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        String zString = "" + z;
-
-        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("addertypens",
-                "http://www.extreme.indiana.edu/math/adder/xsd/");
-        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "AddOutput");
-        XmlElement zElement = outputElement.addElement("z");
-        zElement.addChild(zString);
-
-        if (notifier != null) {
-            notifier.sendingResult(outputElement);
-        }
-        logger.info(XMLUtil.xmlElementToString(outputElement));
-        return outputElement;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderService.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderService.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderService.java
deleted file mode 100644
index d14e5f6..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/adder/AdderService.java
+++ /dev/null
@@ -1,131 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.adder;
-
-import java.io.File;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsdl.WsdlDefinitions;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xservo.XService;
-import xsul.xservo_soap.XSoapDocLiteralService;
-import xsul.xservo_soap_http.HttpBasedServices;
-
-public class AdderService {
-
-    private final static String SERVICE_NAME = "AdderService";
-
-    private final static String BASE_WSDL_LOCATION = "wsdls/math/adder.wsdl";
-
-    private final static String OUTPUT_WSDL_LOCATION = "wsdls/sample/adder.wsdl";
-
-    private final static Logger logger = LoggerFactory.getLogger(AdderService.class);
-
-    private HttpBasedServices httpServices;
-
-    private XService xservice;
-
-    private int port;
-
-    /**
-     * Constructs a AdderService.
-     */
-    public AdderService() {
-        this(0);
-    }
-
-    /**
-     * Constructs a AdderService.
-     * 
-     * @param port
-     */
-    public AdderService(int port) {
-        this.port = port;
-    }
-
-    /**
-     * Runs the service.
-     */
-    public void run() {
-        this.httpServices = new HttpBasedServices(this.port);
-        logger.info("Server started on " + this.httpServices.getServerPort());
-
-        logger.info("Using WSDL for service description from " + BASE_WSDL_LOCATION);
-        this.xservice = this.httpServices.addService(new XSoapDocLiteralService(SERVICE_NAME, BASE_WSDL_LOCATION,
-                new AdderImpl()));
-        this.xservice.addHandler(new StickySoapHeaderHandler("retrieve-lead-header", LeadContextHeader.TYPE));
-        this.xservice.startService();
-        logger.info("Service started");
-        logger.info("Service WSDL available at " + getServiceWsdlLocation());
-
-    }
-
-    /**
-     * Returns the location of the WSDL of the service.
-     * 
-     * @return The location of the WSDL of the service.
-     */
-    public String getServiceWsdlLocation() {
-        return this.httpServices.getServer().getLocation() + "/" + SERVICE_NAME + "?wsdl";
-    }
-
-    /**
-     * Returns the WSDL of the service.
-     * 
-     * @return The WSDL of the service.
-     */
-    public WsdlDefinitions getWsdl() {
-        return this.xservice.getWsdl();
-    }
-
-    /**
-     * Shutdowns the service.
-     */
-    public void shutdownServer() {
-        this.httpServices.getServer().shutdownServer();
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        try {
-            int port = 0;
-            if (args.length == 2) {
-                if ("-port".equalsIgnoreCase(args[0])) {
-                    port = Integer.parseInt(args[1]);
-                }
-            }
-            AdderService service = new AdderService(port);
-            service.run();
-            WsdlDefinitions wsdl = service.getWsdl();
-            File wsdlFile = new File(OUTPUT_WSDL_LOCATION);
-            XMLUtil.saveXML(wsdl, wsdlFile);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/Approver.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/Approver.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/Approver.java
deleted file mode 100644
index 067770d..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/Approver.java
+++ /dev/null
@@ -1,54 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.approver;
-
-import java.io.File;
-
-import org.apache.airavata.xbaya.test.service.Service;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.xwsif_runtime.XmlElementBasedStub;
-
-public interface Approver extends XmlElementBasedStub {
-
-    /**
-     * SERVICE_NAME
-     */
-    public final static String SERVICE_NAME = "ApproverService";
-
-    /**
-     * WSDL_NAME
-     */
-    public final static String WSDL_NAME = "approver.wsdl";
-
-    /**
-     * WSDL_PATH
-     */
-    public final static String WSDL_PATH = Service.LOAN_DIRECTORY_NAME + File.separator + WSDL_NAME;
-
-    /**
-     * @param input
-     *            the input message
-     * @return the output message
-     */
-    public XmlElement approve(XmlElement input);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverClient.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverClient.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverClient.java
deleted file mode 100644
index 954d93e..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverClient.java
+++ /dev/null
@@ -1,113 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.approver;
-
-import java.net.URI;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsif.WSIFMessage;
-import xsul.wsif.WSIFOperation;
-import xsul.wsif.WSIFPort;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xwsif_runtime.WSIFClient;
-import xsul.xwsif_runtime.WSIFRuntime;
-import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator;
-
-public class ApproverClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(ApproverClient.class);
-
-    private ApproverService service;
-
-    /**
-     * 
-     */
-    public void run() {
-        String wsdlLoc = startServer();
-        runClient(wsdlLoc);
-        shutdownServer();
-    }
-
-    private String startServer() {
-        this.service = new ApproverService();
-        this.service.run();
-        return this.service.getServiceWsdlLocation();
-    }
-
-    private void shutdownServer() {
-        this.service.shutdownServer();
-    }
-
-    private void runClient(String wsdlLoc) {
-        logger.info("Invoking operation echoString using WSDL from " + wsdlLoc);
-
-        WSIFAsyncResponsesCorrelator correlator;
-        correlator = null;
-
-        // pass some headers
-        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
-        helper.setXBayaConfiguration(new XBayaConfiguration());
-        LeadContextHeader leadContext = helper.getLeadContextHeader();
-        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
-        leadContext.setNodeId("decoder1");
-        leadContext.setTimeStep("5");
-        leadContext.setServiceId("decoder-instance-10");
-
-        WSIFClient wclient = WSIFRuntime.newClient(wsdlLoc)
-                .addHandler(new StickySoapHeaderHandler("use-lead-header", leadContext)).useAsyncMessaging(correlator)
-                .setAsyncResponseTimeoutInMs(33000L); // to simplify testing set to just few
-        // seconds
-
-        WSIFPort port = wclient.getPort();
-        WSIFOperation operation = port.createOperation("approve");
-        WSIFMessage inputMessage = operation.createInputMessage();
-        WSIFMessage outputMessage = operation.createOutputMessage();
-        WSIFMessage faultMessage = operation.createFaultMessage();
-
-        inputMessage.setObjectPart("amount", "100");
-
-        logger.info("Sending a message:\n" + XMLUtil.xmlElementToString((XmlElement) inputMessage));
-        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
-
-        XmlElement result;
-        if (success) {
-            result = (XmlElement) outputMessage;
-        } else {
-            result = (XmlElement) faultMessage;
-        }
-        logger.info("Received message:\n" + XMLUtil.xmlElementToString(result));
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        (new ApproverClient()).run();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverImpl.java
deleted file mode 100644
index 37bff40..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverImpl.java
+++ /dev/null
@@ -1,74 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.approver;
-
-import java.util.Random;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.ServiceNotificationSender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-import org.xmlpull.v1.builder.XmlNamespace;
-
-import xsul.XmlConstants;
-
-public class ApproverImpl implements Approver {
-
-    private final static Logger logger = LoggerFactory.getLogger(ApproverImpl.class);
-
-    /**
-     * @see org.apache.airavata.xbaya.test.service.approver.Approver#approve(org.xmlpull.v1.builder.XmlElement)
-     */
-    public XmlElement approve(XmlElement inputElement) {
-        logger.info(XMLUtil.xmlElementToString(inputElement));
-        ServiceNotificationSender notifier = ServiceNotificationSender.invoked(inputElement);
-
-        XmlElement amountElement = inputElement.requiredElement(null, "amount");
-        String amountString = amountElement.requiredTextContent();
-        int amount = Integer.parseInt(amountString);
-        logger.info("amount: " + amount);
-
-        Random random = new Random();
-        int msec = random.nextInt(5000);
-        logger.info("Sleep for " + msec + " msec");
-        try {
-            Thread.sleep(msec);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        String accept = "No";
-
-        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("approvertypens",
-                "http://www.extreme.indiana.edu/loan/approver/xsd/");
-        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "ApproveOutput");
-        XmlElement acceptElement = outputElement.addElement("accept");
-        acceptElement.addChild(accept);
-
-        if (notifier != null) {
-            notifier.sendingResult(outputElement);
-        }
-        logger.info(XMLUtil.xmlElementToString(outputElement));
-        return outputElement;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverService.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverService.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverService.java
deleted file mode 100644
index 30caac2..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/approver/ApproverService.java
+++ /dev/null
@@ -1,131 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.approver;
-
-import java.io.File;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsdl.WsdlDefinitions;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xservo.XService;
-import xsul.xservo_soap.XSoapDocLiteralService;
-import xsul.xservo_soap_http.HttpBasedServices;
-
-public class ApproverService {
-
-    private final static String SERVICE_NAME = "ApproverService";
-
-    private final static String BASE_WSDL_LOCATION = "wsdls/loan/approver-wsdl.xml";
-
-    private final static String OUTPUT_WSDL_LOCATION = "wsdls/sample/approver-wsdl.xml";
-
-    private final static Logger logger = LoggerFactory.getLogger(ApproverService.class);
-
-    private HttpBasedServices httpServices;
-
-    private XService xservice;
-
-    private int port;
-
-    /**
-     * Constructs a AdderService.
-     */
-    public ApproverService() {
-        this(0);
-    }
-
-    /**
-     * Constructs a AdderService.
-     * 
-     * @param port
-     */
-    public ApproverService(int port) {
-        this.port = port;
-    }
-
-    /**
-     * Runs the service.
-     */
-    public void run() {
-        this.httpServices = new HttpBasedServices(this.port);
-        logger.info("Server started on " + this.httpServices.getServerPort());
-
-        logger.info("Using WSDL for service description from " + BASE_WSDL_LOCATION);
-        this.xservice = this.httpServices.addService(new XSoapDocLiteralService(SERVICE_NAME, BASE_WSDL_LOCATION,
-                new ApproverImpl()));
-        this.xservice.addHandler(new StickySoapHeaderHandler("retrieve-lead-header", LeadContextHeader.TYPE));
-        this.xservice.startService();
-        logger.info("Service started");
-        logger.info("Service WSDL available at " + getServiceWsdlLocation());
-
-    }
-
-    /**
-     * Returns the location of the WSDL of the service.
-     * 
-     * @return The location of the WSDL of the service.
-     */
-    public String getServiceWsdlLocation() {
-        return this.httpServices.getServer().getLocation() + "/" + SERVICE_NAME + "?wsdl";
-    }
-
-    /**
-     * Returns the WSDL of the service.
-     * 
-     * @return The WSDL of the service.
-     */
-    public WsdlDefinitions getWsdl() {
-        return this.xservice.getWsdl();
-    }
-
-    /**
-     * Shutdowns the service.
-     */
-    public void shutdownServer() {
-        this.httpServices.getServer().shutdownServer();
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        try {
-            int port = 0;
-            if (args.length == 2) {
-                if ("-port".equalsIgnoreCase(args[0])) {
-                    port = Integer.parseInt(args[1]);
-                }
-            }
-            ApproverService service = new ApproverService(port);
-            service.run();
-            WsdlDefinitions wsdl = service.getWsdl();
-            File wsdlFile = new File(OUTPUT_WSDL_LOCATION);
-            XMLUtil.saveXML(wsdl, wsdlFile);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdder.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdder.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdder.java
deleted file mode 100644
index 4fc4bb9..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdder.java
+++ /dev/null
@@ -1,54 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arrayadder;
-
-import java.io.File;
-
-import org.apache.airavata.xbaya.test.service.Service;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.xwsif_runtime.XmlElementBasedStub;
-
-public interface ArrayAdder extends XmlElementBasedStub {
-
-    /**
-     * SERVICE_NAME
-     */
-    public final static String SERVICE_NAME = "ArrayAdderService";
-
-    /**
-     * WSDL_NAME
-     */
-    public final static String WSDL_NAME = "arrayadder.wsdl";
-
-    /**
-     * WSDL_PATH
-     */
-    public final static String WSDL_PATH = Service.MATH_DIRECTORY_NAME + File.separator + WSDL_NAME;
-
-    /**
-     * @param input
-     *            the input message
-     * @return the output message
-     */
-    public XmlElement add(XmlElement input);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderClient.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderClient.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderClient.java
deleted file mode 100644
index 58786e2..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderClient.java
+++ /dev/null
@@ -1,121 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arrayadder;
-
-import java.net.URI;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.XmlConstants;
-import xsul.lead.LeadContextHeader;
-import xsul.wsif.WSIFMessage;
-import xsul.wsif.WSIFOperation;
-import xsul.wsif.WSIFPort;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xwsif_runtime.WSIFClient;
-import xsul.xwsif_runtime.WSIFRuntime;
-import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator;
-
-public class ArrayAdderClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(ArrayAdderClient.class);
-
-    private ArrayAdderService service;
-
-    /**
-     * 
-     */
-    public void run() {
-        String wsdlLoc = startServer();
-        runClient(wsdlLoc);
-        shutdownServer();
-    }
-
-    private String startServer() {
-        this.service = new ArrayAdderService();
-        this.service.run();
-        return this.service.getServiceWsdlLocation();
-    }
-
-    private void shutdownServer() {
-        this.service.shutdownServer();
-    }
-
-    private void runClient(String wsdlLoc) {
-        logger.info("Invoking operation add using WSDL from " + wsdlLoc);
-
-        WSIFAsyncResponsesCorrelator correlator;
-        correlator = null;
-
-        // pass some headers
-        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
-        helper.setXBayaConfiguration(new XBayaConfiguration());
-        LeadContextHeader leadContext = helper.getLeadContextHeader();
-        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
-        leadContext.setNodeId("decoder1");
-        leadContext.setTimeStep("5");
-        leadContext.setServiceId("decoder-instance-10");
-
-        WSIFClient wclient = WSIFRuntime.newClient(wsdlLoc)
-                .addHandler(new StickySoapHeaderHandler("use-lead-header", leadContext)).useAsyncMessaging(correlator)
-                .setAsyncResponseTimeoutInMs(33000L); // to simplify testing set to just few
-        // seconds
-
-        WSIFPort port = wclient.getPort();
-        WSIFOperation operation = port.createOperation("add");
-        WSIFMessage inputMessage = operation.createInputMessage();
-        WSIFMessage outputMessage = operation.createOutputMessage();
-        WSIFMessage faultMessage = operation.createFaultMessage();
-
-        // Input
-        XmlElement arrayElement = XmlConstants.BUILDER.newFragment("input");
-        for (int i = 0; i < 5; i++) {
-            XmlElement valueElement = arrayElement.addElement("value");
-            valueElement.addChild("" + i);
-        }
-
-        inputMessage.setObjectPart("input", arrayElement);
-
-        logger.info("Sending a message:\n" + XMLUtil.xmlElementToString((XmlElement) inputMessage));
-        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
-
-        XmlElement result;
-        if (success) {
-            result = (XmlElement) outputMessage;
-        } else {
-            result = (XmlElement) faultMessage;
-        }
-        logger.info("Received message:\n" + XMLUtil.xmlElementToString(result));
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        (new ArrayAdderClient()).run();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderImpl.java
deleted file mode 100644
index ab2792c..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderImpl.java
+++ /dev/null
@@ -1,83 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arrayadder;
-
-import java.util.Iterator;
-import java.util.Random;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.ServiceNotificationSender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-import org.xmlpull.v1.builder.XmlNamespace;
-
-import xsul.XmlConstants;
-
-public class ArrayAdderImpl implements ArrayAdder {
-
-    private final static Logger logger = LoggerFactory.getLogger(ArrayAdderImpl.class);
-
-    /**
-     * @see org.apache.airavata.xbaya.test.service.arrayadder.ArrayAdder#add(org.xmlpull.v1.builder.XmlElement)
-     */
-    public XmlElement add(XmlElement inputElement) {
-        logger.info(XMLUtil.xmlElementToString(inputElement));
-
-        ServiceNotificationSender notifier = ServiceNotificationSender.invoked(inputElement);
-
-        XmlElement arrayElement = inputElement.requiredElement(null, "input");
-
-        int sum = 0;
-        @SuppressWarnings("rawtypes")
-		Iterator valueIt = arrayElement.elements(null, "value").iterator();
-        while (valueIt.hasNext()) {
-            XmlElement valueElement = (XmlElement) valueIt.next();
-            String valueString = valueElement.requiredTextContent();
-            int value = Integer.parseInt(valueString);
-            sum += value;
-        }
-
-        Random random = new Random();
-        int msec = random.nextInt(5000);
-        logger.info("Sleep for " + msec + " msec");
-        try {
-            Thread.sleep(msec);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        String sumString = "" + sum;
-
-        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("typens",
-                "http://www.extreme.indiana.edu/math/arrayadder/xsd/");
-        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "ArrayAdderOutput");
-        XmlElement sumElement = outputElement.addElement("sum");
-        sumElement.addChild(sumString);
-
-        if (notifier != null) {
-            notifier.sendingResult(outputElement);
-        }
-        logger.info(XMLUtil.xmlElementToString(outputElement));
-        return outputElement;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderService.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderService.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderService.java
deleted file mode 100644
index b5f9cae..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arrayadder/ArrayAdderService.java
+++ /dev/null
@@ -1,131 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arrayadder;
-
-import java.io.File;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsdl.WsdlDefinitions;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xservo.XService;
-import xsul.xservo_soap.XSoapDocLiteralService;
-import xsul.xservo_soap_http.HttpBasedServices;
-
-public class ArrayAdderService {
-
-    private final static String SERVICE_NAME = "ArrayGeneratorService";
-
-    private final static String BASE_WSDL_LOCATION = "wsdls/math/arrayadder-wsdl.xml";
-
-    private final static String OUTPUT_WSDL_LOCATION = "wsdls/sample/arrayadder-wsdl.xml";
-
-    private final static Logger logger = LoggerFactory.getLogger(ArrayAdderService.class);
-
-    private HttpBasedServices httpServices;
-
-    private XService xservice;
-
-    private int port;
-
-    /**
-     * Constructs a AdderService.
-     */
-    public ArrayAdderService() {
-        this(0);
-    }
-
-    /**
-     * Constructs a AdderService.
-     * 
-     * @param port
-     */
-    public ArrayAdderService(int port) {
-        this.port = port;
-    }
-
-    /**
-     * Runs the service.
-     */
-    public void run() {
-        this.httpServices = new HttpBasedServices(this.port);
-        logger.info("Server started on " + this.httpServices.getServerPort());
-
-        logger.info("Using WSDL for service description from " + BASE_WSDL_LOCATION);
-        this.xservice = this.httpServices.addService(new XSoapDocLiteralService(SERVICE_NAME, BASE_WSDL_LOCATION,
-                new ArrayAdderImpl()));
-        this.xservice.addHandler(new StickySoapHeaderHandler("retrieve-lead-header", LeadContextHeader.TYPE));
-        this.xservice.startService();
-        logger.info("Service started");
-        logger.info("Service WSDL available at " + getServiceWsdlLocation());
-
-    }
-
-    /**
-     * Returns the location of the WSDL of the service.
-     * 
-     * @return The location of the WSDL of the service.
-     */
-    public String getServiceWsdlLocation() {
-        return this.httpServices.getServer().getLocation() + "/" + SERVICE_NAME + "?wsdl";
-    }
-
-    /**
-     * Returns the WSDL of the service.
-     * 
-     * @return The WSDL of the service.
-     */
-    public WsdlDefinitions getWsdl() {
-        return this.xservice.getWsdl();
-    }
-
-    /**
-     * Shutdowns the service.
-     */
-    public void shutdownServer() {
-        this.httpServices.getServer().shutdownServer();
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        try {
-            int port = 0;
-            if (args.length == 2) {
-                if ("-port".equalsIgnoreCase(args[0])) {
-                    port = Integer.parseInt(args[1]);
-                }
-            }
-            ArrayAdderService service = new ArrayAdderService(port);
-            service.run();
-            WsdlDefinitions wsdl = service.getWsdl();
-            File wsdlFile = new File(OUTPUT_WSDL_LOCATION);
-            XMLUtil.saveXML(wsdl, wsdlFile);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGenerator.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGenerator.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGenerator.java
deleted file mode 100644
index 4ffd01b..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGenerator.java
+++ /dev/null
@@ -1,54 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arraygen;
-
-import java.io.File;
-
-import org.apache.airavata.xbaya.test.service.Service;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.xwsif_runtime.XmlElementBasedStub;
-
-public interface ArrayGenerator extends XmlElementBasedStub {
-
-    /**
-     * SERVICE_NAME
-     */
-    public final static String SERVICE_NAME = "ArrayGeneratorService";
-
-    /**
-     * WSDL_NAME
-     */
-    public final static String WSDL_NAME = "arraygen.wsdl";
-
-    /**
-     * WSDL_PATH
-     */
-    public final static String WSDL_PATH = Service.MATH_DIRECTORY_NAME + File.separator + WSDL_NAME;
-
-    /**
-     * @param input
-     *            the input message
-     * @return the output message
-     */
-    public XmlElement generate(XmlElement input);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorClient.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorClient.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorClient.java
deleted file mode 100644
index 3256d6f..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorClient.java
+++ /dev/null
@@ -1,113 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arraygen;
-
-import java.net.URI;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsif.WSIFMessage;
-import xsul.wsif.WSIFOperation;
-import xsul.wsif.WSIFPort;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xwsif_runtime.WSIFClient;
-import xsul.xwsif_runtime.WSIFRuntime;
-import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator;
-
-public class ArrayGeneratorClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(ArrayGeneratorClient.class);
-
-    private ArrayGeneratorService service;
-
-    /**
-     * 
-     */
-    public void run() {
-        String wsdlLoc = startServer();
-        runClient(wsdlLoc);
-        shutdownServer();
-    }
-
-    private String startServer() {
-        this.service = new ArrayGeneratorService();
-        this.service.run();
-        return this.service.getServiceWsdlLocation();
-    }
-
-    private void shutdownServer() {
-        this.service.shutdownServer();
-    }
-
-    private void runClient(String wsdlLoc) {
-        logger.info("Invoking operation echoString using WSDL from " + wsdlLoc);
-
-        WSIFAsyncResponsesCorrelator correlator;
-        correlator = null;
-
-        // pass some headers
-        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
-        helper.setXBayaConfiguration(new XBayaConfiguration());
-        LeadContextHeader leadContext = helper.getLeadContextHeader();
-        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
-        leadContext.setNodeId("decoder1");
-        leadContext.setTimeStep("5");
-        leadContext.setServiceId("decoder-instance-10");
-
-        WSIFClient wclient = WSIFRuntime.newClient(wsdlLoc)
-                .addHandler(new StickySoapHeaderHandler("use-lead-header", leadContext)).useAsyncMessaging(correlator)
-                .setAsyncResponseTimeoutInMs(33000L); // to simplify testing set to just few
-        // seconds
-
-        WSIFPort port = wclient.getPort();
-        WSIFOperation operation = port.createOperation("generate");
-        WSIFMessage inputMessage = operation.createInputMessage();
-        WSIFMessage outputMessage = operation.createOutputMessage();
-        WSIFMessage faultMessage = operation.createFaultMessage();
-
-        inputMessage.setObjectPart("n", "3");
-
-        logger.info("Sending a message:\n" + XMLUtil.xmlElementToString((XmlElement) inputMessage));
-        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
-
-        XmlElement result;
-        if (success) {
-            result = (XmlElement) outputMessage;
-        } else {
-            result = (XmlElement) faultMessage;
-        }
-        logger.info("Received message:\n" + XMLUtil.xmlElementToString(result));
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        (new ArrayGeneratorClient()).run();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorImpl.java
deleted file mode 100644
index 3f6cb9d..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorImpl.java
+++ /dev/null
@@ -1,77 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arraygen;
-
-import java.util.Random;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.ServiceNotificationSender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-import org.xmlpull.v1.builder.XmlNamespace;
-
-import xsul.XmlConstants;
-
-public class ArrayGeneratorImpl implements ArrayGenerator {
-
-    private final static Logger logger = LoggerFactory.getLogger(ArrayGeneratorImpl.class);
-
-    /**
-     * @see org.apache.airavata.xbaya.test.service.arraygen.ArrayGenerator#generate(org.xmlpull.v1.builder.XmlElement)
-     */
-    public XmlElement generate(XmlElement inputElement) {
-        logger.info(XMLUtil.xmlElementToString(inputElement));
-
-        ServiceNotificationSender notifier = ServiceNotificationSender.invoked(inputElement);
-
-        XmlElement nElement = inputElement.requiredElement(null, "n");
-        String nString = nElement.requiredTextContent();
-
-        int n = Integer.parseInt(nString);
-
-        Random random = new Random();
-        int msec = random.nextInt(5000);
-        logger.info("Sleep for " + msec + " msec");
-        try {
-            Thread.sleep(msec);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("typens",
-                "http://www.extreme.indiana.edu/math/arraygen/xsd/");
-        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "ArrayGeneratorOutput");
-
-        XmlElement arrayElement = outputElement.addElement("output");
-        for (int i = 0; i < n; i++) {
-            XmlElement valueElement = arrayElement.addElement("value");
-            valueElement.addChild("" + i);
-        }
-
-        if (notifier != null) {
-            notifier.sendingResult(outputElement);
-        }
-        logger.info(XMLUtil.xmlElementToString(outputElement));
-        return outputElement;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorService.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorService.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorService.java
deleted file mode 100644
index 5685c69..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/arraygen/ArrayGeneratorService.java
+++ /dev/null
@@ -1,131 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.arraygen;
-
-import java.io.File;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsdl.WsdlDefinitions;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xservo.XService;
-import xsul.xservo_soap.XSoapDocLiteralService;
-import xsul.xservo_soap_http.HttpBasedServices;
-
-public class ArrayGeneratorService {
-
-    private final static String SERVICE_NAME = "ArrayGeneratorService";
-
-    private final static String BASE_WSDL_LOCATION = "wsdls/math/arraygen-wsdl.xml";
-
-    private final static String OUTPUT_WSDL_LOCATION = "wsdls/sample/arraygen-wsdl.xml";
-
-    private final static Logger logger = LoggerFactory.getLogger(ArrayGeneratorService.class);
-
-    private HttpBasedServices httpServices;
-
-    private XService xservice;
-
-    private int port;
-
-    /**
-     * Constructs a AdderService.
-     */
-    public ArrayGeneratorService() {
-        this(0);
-    }
-
-    /**
-     * Constructs a AdderService.
-     * 
-     * @param port
-     */
-    public ArrayGeneratorService(int port) {
-        this.port = port;
-    }
-
-    /**
-     * Runs the service.
-     */
-    public void run() {
-        this.httpServices = new HttpBasedServices(this.port);
-        logger.info("Server started on " + this.httpServices.getServerPort());
-
-        logger.info("Using WSDL for service description from " + BASE_WSDL_LOCATION);
-        this.xservice = this.httpServices.addService(new XSoapDocLiteralService(SERVICE_NAME, BASE_WSDL_LOCATION,
-                new ArrayGeneratorImpl()));
-        this.xservice.addHandler(new StickySoapHeaderHandler("retrieve-lead-header", LeadContextHeader.TYPE));
-        this.xservice.startService();
-        logger.info("Service started");
-        logger.info("Service WSDL available at " + getServiceWsdlLocation());
-
-    }
-
-    /**
-     * Returns the location of the WSDL of the service.
-     * 
-     * @return The location of the WSDL of the service.
-     */
-    public String getServiceWsdlLocation() {
-        return this.httpServices.getServer().getLocation() + "/" + SERVICE_NAME + "?wsdl";
-    }
-
-    /**
-     * Returns the WSDL of the service.
-     * 
-     * @return The WSDL of the service.
-     */
-    public WsdlDefinitions getWsdl() {
-        return this.xservice.getWsdl();
-    }
-
-    /**
-     * Shutdowns the service.
-     */
-    public void shutdownServer() {
-        this.httpServices.getServer().shutdownServer();
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        try {
-            int port = 0;
-            if (args.length == 2) {
-                if ("-port".equalsIgnoreCase(args[0])) {
-                    port = Integer.parseInt(args[1]);
-                }
-            }
-            ArrayGeneratorService service = new ArrayGeneratorService(port);
-            service.run();
-            WsdlDefinitions wsdl = service.getWsdl();
-            File wsdlFile = new File(OUTPUT_WSDL_LOCATION);
-            XMLUtil.saveXML(wsdl, wsdlFile);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/Echo.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/Echo.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/Echo.java
deleted file mode 100644
index bfc22db..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/Echo.java
+++ /dev/null
@@ -1,54 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.echo;
-
-import java.io.File;
-
-import org.apache.airavata.xbaya.test.service.Service;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.xwsif_runtime.XmlElementBasedStub;
-
-public interface Echo extends XmlElementBasedStub {
-
-    /**
-     * SERVICE_NAME
-     */
-    public final static String SERVICE_NAME = "EchoService";
-
-    /**
-     * WSDL_NAME
-     */
-    public final static String WSDL_NAME = "echo.wsdl";
-
-    /**
-     * WSDL_PATH
-     */
-    public final static String WSDL_PATH = Service.MATH_DIRECTORY_NAME + File.separator + WSDL_NAME;
-
-    /**
-     * @param input
-     *            the input message
-     * @return the output message
-     */
-    public XmlElement echo(XmlElement input);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoClient.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoClient.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoClient.java
deleted file mode 100644
index bc31eea..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoClient.java
+++ /dev/null
@@ -1,116 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.echo;
-
-import java.net.URI;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.XBayaConfiguration;
-import org.apache.airavata.xbaya.lead.LeadContextHeaderHelper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsif.WSIFMessage;
-import xsul.wsif.WSIFOperation;
-import xsul.wsif.WSIFPort;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xwsif_runtime.WSIFClient;
-import xsul.xwsif_runtime.WSIFRuntime;
-import xsul.xwsif_runtime_async.WSIFAsyncResponsesCorrelator;
-
-public class EchoClient {
-
-    private final static Logger logger = LoggerFactory.getLogger(EchoClient.class);
-
-    private EchoService service;
-
-    /**
-     * 
-     */
-    public void run() {
-        String wsdlLoc = startServer();
-        runClient(wsdlLoc);
-        shutdownServer();
-    }
-
-    private String startServer() {
-        this.service = new EchoService(0);
-        this.service.run();
-        return this.service.getServiceWsdlLocation();
-    }
-
-    private void shutdownServer() {
-        this.service.shutdownServer();
-    }
-
-    private void runClient(String wsdlLoc) {
-        logger.info("Starting " + EchoClient.class.getName());
-        logger.info("Invoking operation echoString using WSDL from " + wsdlLoc);
-
-        WSIFAsyncResponsesCorrelator correlator;
-        correlator = null;
-
-        // pass some headers
-        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
-        helper.setXBayaConfiguration(new XBayaConfiguration());
-        LeadContextHeader leadContext = helper.getLeadContextHeader();
-        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
-        leadContext.setNodeId("decoder1");
-        leadContext.setTimeStep("5");
-        leadContext.setServiceId("decoder-instance-10");
-
-        WSIFClient wclient = WSIFRuntime.newClient(wsdlLoc)
-                .addHandler(new StickySoapHeaderHandler("use-lead-header", leadContext)).useAsyncMessaging(correlator)
-                .setAsyncResponseTimeoutInMs(33000L); // to simplify testing set to just few
-        // seconds
-
-        WSIFPort port = wclient.getPort();
-        WSIFOperation operation = port.createOperation("echo");
-        WSIFMessage inputMessage = operation.createInputMessage();
-        WSIFMessage outputMessage = operation.createOutputMessage();
-        WSIFMessage faultMessage = operation.createFaultMessage();
-
-        inputMessage.setObjectPart("input", "test");
-
-        logger.info("Using WSIF to send message:\n" + XMLUtil.xmlElementToString((XmlElement) inputMessage));
-        boolean success = operation.executeRequestResponseOperation(inputMessage, outputMessage, faultMessage);
-
-        XmlElement result;
-        if (success) {
-            result = (XmlElement) outputMessage;
-        } else {
-            result = (XmlElement) faultMessage;
-        }
-        logger.info("Received message:\n" + XMLUtil.xmlElementToString(result));
-
-        logger.info("Finished");
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        (new EchoClient()).run();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoImpl.java
deleted file mode 100644
index e0a0243..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoImpl.java
+++ /dev/null
@@ -1,73 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.echo;
-
-import java.util.Random;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.ServiceNotificationSender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-import org.xmlpull.v1.builder.XmlNamespace;
-
-import xsul.XmlConstants;
-
-public class EchoImpl implements Echo {
-
-    private final static Logger logger = LoggerFactory.getLogger(EchoImpl.class);
-
-    /**
-     * @see org.apache.airavata.xbaya.test.service.echo.Echo#echo(org.xmlpull.v1.builder.XmlElement)
-     */
-    public XmlElement echo(XmlElement inputElement) {
-        logger.info(XMLUtil.xmlElementToString(inputElement));
-
-        ServiceNotificationSender notifier = ServiceNotificationSender.invoked(inputElement);
-
-        XmlElement input = inputElement.requiredElement(null, "input");
-
-        Random random = new Random();
-        int msec = random.nextInt(5000);
-        logger.info("Sleep for " + msec + " msec");
-        try {
-            Thread.sleep(msec);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        XmlElement output = input;
-        output.setParent(null);
-        output.setName("output");
-
-        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("echotypens",
-                "http://www.extreme.indiana.edu/math/echo/xsd/");
-        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "EchoOutput");
-        outputElement.addElement(output);
-
-        if (notifier != null) {
-            notifier.sendingResult(outputElement);
-        }
-        logger.info(XMLUtil.xmlElementToString(outputElement));
-        return outputElement;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoService.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoService.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoService.java
deleted file mode 100644
index c3c58a8..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/echo/EchoService.java
+++ /dev/null
@@ -1,113 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.echo;
-
-import java.io.File;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.Service;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import xsul.lead.LeadContextHeader;
-import xsul.wsdl.WsdlDefinitions;
-import xsul.xhandler_soap_sticky_header.StickySoapHeaderHandler;
-import xsul.xservo.XService;
-import xsul.xservo_soap.XSoapDocLiteralService;
-import xsul.xservo_soap_http.HttpBasedServices;
-
-public class EchoService implements Service {
-
-    private final static Logger logger = LoggerFactory.getLogger(EchoService.class);
-
-    private HttpBasedServices httpServices;
-
-    private XService xservice;
-
-    private int port;
-
-    /**
-     * Constructs an EchoService.
-     * 
-     * @param port
-     */
-    public EchoService(int port) {
-        this.port = port;
-    }
-
-    /**
-     * Runs the service.
-     */
-    public void run() {
-        this.httpServices = new HttpBasedServices(this.port);
-        this.xservice = this.httpServices.addService(new XSoapDocLiteralService(Echo.SERVICE_NAME,
-                Service.MATH_DIRECTORY_NAME + File.separator + Echo.WSDL_PATH, new EchoImpl()));
-        this.xservice.addHandler(new StickySoapHeaderHandler("retrieve-lead-header", LeadContextHeader.TYPE));
-        this.xservice.startService();
-    }
-
-    /**
-     * Returns the location of the WSDL of the service.
-     * 
-     * @return The location of the WSDL of the service.
-     */
-    public String getServiceWsdlLocation() {
-        return this.httpServices.getServer().getLocation() + "/" + Echo.SERVICE_NAME + "?wsdl";
-    }
-
-    /**
-     * Returns the WSDL of the service.
-     * 
-     * @return The WSDL of the service.
-     */
-    public WsdlDefinitions getWsdl() {
-        return this.xservice.getWsdl();
-    }
-
-    /**
-     * Shutdowns the service.
-     */
-    public void shutdownServer() {
-        this.httpServices.getServer().shutdownServer();
-    }
-
-    /**
-     * @param args
-     */
-    public static void main(String[] args) {
-        try {
-            int port = 0;
-            if (args.length == 2) {
-                if ("-port".equalsIgnoreCase(args[0])) {
-                    port = Integer.parseInt(args[1]);
-                }
-            }
-            EchoService service = new EchoService(port);
-            service.run();
-            WsdlDefinitions wsdl = service.getWsdl();
-            File wsdlFile = new File(SAMPLE_WSDL_DIRECTORY, Echo.WSDL_NAME);
-            XMLUtil.saveXML(wsdl, wsdlFile);
-        } catch (Exception e) {
-            logger.error(e.getMessage(), e);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/Multiplier.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/Multiplier.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/Multiplier.java
deleted file mode 100644
index c1cde5c..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/Multiplier.java
+++ /dev/null
@@ -1,54 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.multiplier;
-
-import java.io.File;
-
-import org.apache.airavata.xbaya.test.service.Service;
-import org.xmlpull.v1.builder.XmlElement;
-
-import xsul.xwsif_runtime.XmlElementBasedStub;
-
-public interface Multiplier extends XmlElementBasedStub {
-
-    /**
-     * SERVICE_NAME
-     */
-    public final static String SERVICE_NAME = "MultiplierService";
-
-    /**
-     * WSDL_NAME
-     */
-    public final static String WSDL_NAME = "multiplier.wsdl";
-
-    /**
-     * WSDL_PATH
-     */
-    public final static String WSDL_PATH = Service.MATH_DIRECTORY_NAME + File.separator + WSDL_NAME;
-
-    /**
-     * @param input
-     *            the input message
-     * @return the output message
-     */
-    public XmlElement multiply(XmlElement input);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/3e6c815a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/MultiplierImpl.java
----------------------------------------------------------------------
diff --git a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/MultiplierImpl.java b/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/MultiplierImpl.java
deleted file mode 100644
index 6b53c0a..0000000
--- a/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/test/service/multiplier/MultiplierImpl.java
+++ /dev/null
@@ -1,80 +0,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.
- *
- */
-
-package org.apache.airavata.xbaya.test.service.multiplier;
-
-import java.util.Random;
-
-import org.apache.airavata.common.utils.XMLUtil;
-import org.apache.airavata.xbaya.test.service.ServiceNotificationSender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.xmlpull.v1.builder.XmlElement;
-import org.xmlpull.v1.builder.XmlNamespace;
-
-import xsul.XmlConstants;
-
-public class MultiplierImpl implements Multiplier {
-
-    private final static Logger logger = LoggerFactory.getLogger(MultiplierImpl.class);
-
-    /**
-     * @see org.apache.airavata.xbaya.test.service.multiplier.Multiplier#multiply(org.xmlpull.v1.builder.XmlElement)
-     */
-    public XmlElement multiply(XmlElement inputElement) {
-        logger.info(XMLUtil.xmlElementToString(inputElement));
-
-        ServiceNotificationSender notifier = ServiceNotificationSender.invoked(inputElement);
-
-        XmlElement xElement = inputElement.requiredElement(null, "x");
-        XmlElement yElement = inputElement.requiredElement(null, "y");
-        String xString = xElement.requiredTextContent();
-        String yString = yElement.requiredTextContent();
-
-        int x = Integer.parseInt(xString);
-        int y = Integer.parseInt(yString);
-
-        Random random = new Random();
-        int msec = random.nextInt(10000);
-        logger.info("Sleep for " + msec + " msec");
-        try {
-            Thread.sleep(msec);
-        } catch (InterruptedException e) {
-            logger.error(e.getMessage(), e);
-        }
-
-        int z = x * y;
-
-        String zString = "" + z;
-
-        XmlNamespace namespace = XmlConstants.BUILDER.newNamespace("multipliertypens",
-                "http://www.extreme.indiana.edu/math/multiplier/xsd/");
-        XmlElement outputElement = XmlConstants.BUILDER.newFragment(namespace, "MultiplyOutput");
-        XmlElement zElement = outputElement.addElement("z");
-        zElement.addChild(zString);
-
-        if (notifier != null) {
-            notifier.sendingResult(outputElement);
-        }
-        logger.info(XMLUtil.xmlElementToString(outputElement));
-        return outputElement;
-    }
-}
\ No newline at end of file


Mime
View raw message