You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2014/07/01 05:01:49 UTC

[01/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Repository: airavata
Updated Branches:
  refs/heads/master 7034f503f -> c09963aaf


http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/search_experiments_by_application.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/search_experiments_by_application.php b/samples/php-cli-samples/search_experiments_by_application.php
new file mode 100644
index 0000000..cd98694
--- /dev/null
+++ b/samples/php-cli-samples/search_experiments_by_application.php
@@ -0,0 +1,82 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try
+{
+
+    if ($argc != 3) {
+        echo 'php search_experiments_by_application.php <username> <project_ID>';
+    }
+
+    else {
+        $experiments = $airavataclient->searchExperimentsByApplication($argv[1], $argv[2]);
+        echo '# results = ' . sizeof($experiments) . '         <br><br>';
+        var_dump($experiments);
+    }
+
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/search_experiments_by_description.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/search_experiments_by_description.php b/samples/php-cli-samples/search_experiments_by_description.php
new file mode 100644
index 0000000..8243c0b
--- /dev/null
+++ b/samples/php-cli-samples/search_experiments_by_description.php
@@ -0,0 +1,82 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try
+{
+
+    if ($argc != 3) {
+        echo 'php search_experiments_by_description.php <username> <project_ID>';
+    }
+
+    else {
+        $experiments = $airavataclient->searchExperimentsByDesc($argv[1], $argv[2]);
+        echo '# results = ' . sizeof($experiments) . '         <br><br>';
+        var_dump($experiments);
+    }
+
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/search_experiments_by_name.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/search_experiments_by_name.php b/samples/php-cli-samples/search_experiments_by_name.php
new file mode 100644
index 0000000..4a51a15
--- /dev/null
+++ b/samples/php-cli-samples/search_experiments_by_name.php
@@ -0,0 +1,82 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try
+{
+
+    if ($argc != 3) {
+        echo 'php search_experiments_by_name.php <username> <project_ID>';
+    }
+
+    else {
+        $experiments = $airavataclient->searchExperimentsByName($argv[1], $argv[2]);
+        echo '# results = ' . sizeof($experiments) . '         <br><br>';
+        var_dump($experiments);
+    }
+
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/terminateExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/terminateExperiment.php b/samples/php-cli-samples/terminateExperiment.php
new file mode 100644
index 0000000..6eadb4c
--- /dev/null
+++ b/samples/php-cli-samples/terminateExperiment.php
@@ -0,0 +1,104 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+use Thrift\Exception\TTransportException;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+if ($argc != 2)
+{
+    echo 'php terminateExperiment.php <experiment_id>';
+}
+else
+{
+    terminate_experiment($argv[1]);
+
+    echo 'If there are no exceptions, assume the experiment terminated successfully';
+}
+
+
+$transport->close();
+
+
+/**
+ * End the experiment with the given ID
+ * @param $expId
+ */
+function terminate_experiment($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        $airavataclient->terminateExperiment($expId);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!\n\n' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!\n\n' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!\n\n' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException!\n\n' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!\n\n' . $tte->getMessage();
+    }
+    catch (\Exception $e)
+    {
+        echo 'Exception!\n\n' . $e->getMessage();
+    }
+}
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/updateExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/updateExperiment.php b/samples/php-cli-samples/updateExperiment.php
new file mode 100644
index 0000000..a15e3a4
--- /dev/null
+++ b/samples/php-cli-samples/updateExperiment.php
@@ -0,0 +1,158 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+use Thrift\Exception\TTransportException;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+
+
+if ($argc != 2)
+{
+    echo 'php updateExperiment.php <experiment_id>';
+}
+else
+{
+    update_experiment($argv[1]);
+}
+
+
+
+
+
+
+
+
+
+
+$transport->close();
+
+
+/**
+ * Get the experiment with the given ID
+ * @param $expId
+ * @return null
+ */
+function get_experiment($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        return $airavataclient->getExperiment($expId);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException during get!<br><br>' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!<br><br>' . $tte->getMessage();
+    }
+    catch (\Exception $e)
+    {
+        echo 'Exception!<br><br>' . $e->getMessage();
+    }
+
+}
+
+/**
+ * Update the experiment with the given ID
+ * @param $expId
+ * @return null
+ */
+function update_experiment($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        //create new experiment to receive the clone
+        $experiment = $airavataclient->getExperiment($expId);
+        $experiment->name .= time();
+
+        $airavataclient->updateExperiment($expId, $experiment);
+
+        $updatedExperiment = $airavataclient->getExperiment($expId);
+
+        echo "Experiment $experiment->name updated:\n\n";
+        var_dump($updatedExperiment);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException during update!<br><br>' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!<br><br>' . $tte->getMessage();
+    }
+}
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/updateProject.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/updateProject.php b/samples/php-cli-samples/updateProject.php
new file mode 100644
index 0000000..75935e1
--- /dev/null
+++ b/samples/php-cli-samples/updateProject.php
@@ -0,0 +1,78 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try 
+{
+		  if($argc != 3) 
+		  {
+					 echo 'php updateProject.php <project_id> <project_description>';
+		  }
+		  else
+		  {
+					 $project=$airavataclient->getProject($argv[1]);
+					 $project->description = $argv[2];
+					 $airavataclient->updateProject($argv[1], $project);
+					 echo 'Project '.$argv[1] . ' succesfully modified.';
+		  }
+}
+
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+$transport->close();
+
+?>
+


[14/14] git commit: moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
moving php command line samples and pointing to airavata sdk - AIRAVATA-1274


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c09963aa
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c09963aa
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c09963aa

Branch: refs/heads/master
Commit: c09963aaf0efd366548ac58bafdc9cd2399b771a
Parents: 7034f50
Author: Suresh Marru <sm...@apache.org>
Authored: Mon Jun 30 23:01:33 2014 -0400
Committer: Suresh Marru <sm...@apache.org>
Committed: Mon Jun 30 23:01:33 2014 -0400

----------------------------------------------------------------------
 Airavata-PHP-Client-Samples/README.md           |    10 -
 .../client-samples/GetAPIVersion.php            |    58 -
 .../client-samples/README-PHP-CLI-Examples.txt  |    20 -
 .../client-samples/add-compute-resources.php    |    78 -
 .../airavata-client-api-tester.php              |   233 -
 .../airavata-client-properties.ini              |    17 -
 .../client-samples/cloneExperiment.php          |   156 -
 .../client-samples/createExperiment.php         |   162 -
 .../client-samples/createProject.php            |    93 -
 .../getAllExperimentsInProject.php              |    82 -
 .../client-samples/getAllUserExperiments.php    |    89 -
 .../client-samples/getAllUserProjects.php       |    83 -
 .../client-samples/getExperiment.php            |   110 -
 .../client-samples/getExperimentOutputs.php     |   116 -
 .../client-samples/getExperimentStatus.php      |   100 -
 .../client-samples/launchExperiment.php         |    86 -
 .../list-application-interfaces.php             |    76 -
 .../client-samples/list-compute-resources.php   |   101 -
 .../search_experiments_by_application.php       |    82 -
 .../search_experiments_by_description.php       |    82 -
 .../search_experiments_by_name.php              |    82 -
 .../client-samples/terminateExperiment.php      |   104 -
 .../client-samples/updateExperiment.php         |   158 -
 .../client-samples/updateProject.php            |    78 -
 .../lib/Airavata/API/Airavata.php               |  6840 ----
 .../API/AppCatalog/ApplicationCatalogAPI.php    |  6165 ----
 .../lib/Airavata/API/AppCatalog/Types.php       |    22 -
 .../lib/Airavata/API/Error/Types.php            |   872 -
 .../lib/Airavata/API/Types.php                  |    22 -
 .../lib/Airavata/Model/AppCatalog/Types.php     |  1636 -
 .../lib/Airavata/Model/Types.php                |    20 -
 .../Model/Workspace/Experiment/Types.php        |  4172 ---
 .../lib/Airavata/Model/Workspace/Types.php      |   568 -
 .../lib/AiravataClientFactory.php               |    45 -
 .../lib/Thrift/Base/TBase.php                   |   367 -
 .../Thrift/ClassLoader/ThriftClassLoader.php    |   223 -
 .../Thrift/Exception/TApplicationException.php  |    72 -
 .../lib/Thrift/Exception/TException.php         |   369 -
 .../lib/Thrift/Exception/TProtocolException.php |    48 -
 .../Thrift/Exception/TTransportException.php    |    41 -
 .../Thrift/Factory/TBinaryProtocolFactory.php   |    43 -
 .../Thrift/Factory/TCompactProtocolFactory.php  |    39 -
 .../lib/Thrift/Factory/TJSONProtocolFactory.php |    41 -
 .../lib/Thrift/Factory/TProtocolFactory.php     |    35 -
 .../lib/Thrift/Factory/TStringFuncFactory.php   |    63 -
 .../lib/Thrift/Factory/TTransportFactory.php    |    16 -
 .../lib/Thrift/Protocol/JSON/BaseContext.php    |    39 -
 .../lib/Thrift/Protocol/JSON/ListContext.php    |    52 -
 .../Thrift/Protocol/JSON/LookaheadReader.php    |    54 -
 .../lib/Thrift/Protocol/JSON/PairContext.php    |    60 -
 .../lib/Thrift/Protocol/TBinaryProtocol.php     |   396 -
 .../Protocol/TBinaryProtocolAccelerated.php     |    47 -
 .../lib/Thrift/Protocol/TCompactProtocol.php    |   669 -
 .../lib/Thrift/Protocol/TJSONProtocol.php       |   694 -
 .../lib/Thrift/Protocol/TProtocol.php           |   340 -
 .../lib/Thrift/Serializer/TBinarySerializer.php |    73 -
 .../lib/Thrift/Server/TForkingServer.php        |   119 -
 .../lib/Thrift/Server/TServer.php               |   101 -
 .../lib/Thrift/Server/TServerSocket.php         |    98 -
 .../lib/Thrift/Server/TServerTransport.php      |    54 -
 .../lib/Thrift/Server/TSimpleServer.php         |    57 -
 .../lib/Thrift/StringFunc/Core.php              |    38 -
 .../lib/Thrift/StringFunc/Mbstring.php          |    45 -
 .../lib/Thrift/StringFunc/TStringFunc.php       |    27 -
 .../lib/Thrift/Thrift.php                       |   789 -
 .../lib/Thrift/Transport/TBufferedTransport.php |   165 -
 .../lib/Thrift/Transport/TFramedTransport.php   |   183 -
 .../lib/Thrift/Transport/THttpClient.php        |   221 -
 .../lib/Thrift/Transport/TMemoryBuffer.php      |    89 -
 .../lib/Thrift/Transport/TNullTransport.php     |    50 -
 .../lib/Thrift/Transport/TPhpStream.php         |   114 -
 .../lib/Thrift/Transport/TSocket.php            |   326 -
 .../lib/Thrift/Transport/TSocketPool.php        |   295 -
 .../lib/Thrift/Transport/TTransport.php         |    93 -
 .../lib/Thrift/Type/TMessageType.php            |    33 -
 .../lib/Thrift/Type/TType.php                   |    46 -
 .../lib/Thrift/autoload.php                     |    51 -
 .../airavata/api/server/AiravataAPIServer.java  |     2 +-
 .../api/appcatalog/ApplicationCatalogAPI.java   | 31134 +++++++++++++++++
 .../applicationCatalogAPIConstants.java         |    55 +
 .../Model/AppCatalog/AppDeployment/Types.php    |   602 +
 .../Model/AppCatalog/AppInterface/Types.php     |   633 +
 .../Model/Application/Deployment/Types.php      |   602 +
 .../Model/Application/Interface/Types.php       |   633 +
 .../lib/Airavata/Model/ComputeHost/Types.php    |  1262 +
 .../workspace/experiment/ValidationResults.java |   543 +
 .../workspace/experiment/ValidatorResult.java   |   505 +
 airavata-api/generate-thrift-files.sh           |     2 -
 .../airavataAPI.thrift                          |    90 +-
 .../appCatalogAPI.thrift                        |   186 +
 .../applicationCatalogAPI.thrift                |   204 -
 samples/php-cli-samples/GetAPIVersion.php       |    58 +
 samples/php-cli-samples/README                  |    20 +
 .../php-cli-samples/add-compute-resources.php   |    78 +
 .../airavata-client-api-tester.php              |   233 +
 .../airavata-client-properties.ini              |    23 +
 samples/php-cli-samples/cloneExperiment.php     |   156 +
 samples/php-cli-samples/createExperiment.php    |   162 +
 samples/php-cli-samples/createProject.php       |    93 +
 .../getAllExperimentsInProject.php              |    82 +
 .../php-cli-samples/getAllUserExperiments.php   |    89 +
 samples/php-cli-samples/getAllUserProjects.php  |    83 +
 samples/php-cli-samples/getExperiment.php       |   110 +
 .../php-cli-samples/getExperimentOutputs.php    |   116 +
 samples/php-cli-samples/getExperimentStatus.php |   100 +
 samples/php-cli-samples/launchExperiment.php    |    86 +
 .../list-application-interfaces.php             |    76 +
 .../php-cli-samples/list-compute-resources.php  |   101 +
 .../search_experiments_by_application.php       |    82 +
 .../search_experiments_by_description.php       |    82 +
 .../search_experiments_by_name.php              |    82 +
 samples/php-cli-samples/terminateExperiment.php |   104 +
 samples/php-cli-samples/updateExperiment.php    |   158 +
 samples/php-cli-samples/updateProject.php       |    78 +
 114 files changed, 38496 insertions(+), 29602 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/README.md
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/README.md b/Airavata-PHP-Client-Samples/README.md
deleted file mode 100644
index 27bdd0e..0000000
--- a/Airavata-PHP-Client-Samples/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-Airavata-PHP-Client-Samples
-===========================
-
-Client code to exercise the Airavata API
-
-This is a clone of the Apache Airavata Thrift PHP Software Development Kit.
-
-The lib directory has THRIFT files and Airavata generated PHP stubs.
-
-The samples directory has example PHP code.

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/GetAPIVersion.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/GetAPIVersion.php b/Airavata-PHP-Client-Samples/client-samples/GetAPIVersion.php
deleted file mode 100644
index 8d840f0..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/GetAPIVersion.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-try
-{
-    $version = $airavataclient->getAPIVersion();
-}
-catch (TException $texp)
-{
-    print 'Exception: ' . $texp->getMessage()."\n";
-}
-
-
-echo 'Airavata server version is ' . $version;
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/README-PHP-CLI-Examples.txt
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/README-PHP-CLI-Examples.txt b/Airavata-PHP-Client-Samples/client-samples/README-PHP-CLI-Examples.txt
deleted file mode 100644
index 8684750..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/README-PHP-CLI-Examples.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-This directory contains files that can be used to test the Apache Airavata client API using PHP command-line tools.  You will need PHP installed on your test environment.  To run a command from a terminal shell prompt, use, for example, 
-        [prompt%> php createProject.php your-name
-
-You can modify PHP files using any text editor.
-
-Run the commands in the following order for your first test.
-1. GetAPIVersion.php (a sanity check)
-2. createProject.php
-3. updateProject.php
-4. getAllUserProjects.php
-5. createExperiment.php
-6. getExperiment.php
-7. updateExperiment.php
-8. cloneExperiment.php
-9. getAllExperimentsInProject.php
-10. getAllUserExperiments.php
-11. launchExperiment.php
-12. getExperimentStatus.php
-13. getExperimentOutputs.php
-14. terminateExperiment.php

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/add-compute-resources.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/add-compute-resources.php b/Airavata-PHP-Client-Samples/client-samples/add-compute-resources.php
deleted file mode 100644
index 0413903..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/add-compute-resources.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/AppCatalog/ApplicationCatalogAPI.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\DataObjectType;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
-use Airavata\Model\AppCatalog\ComputeResourceDescription;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-use Airavata\API\AppCatalog\ApplicationCatalogAPIClient;
-use Airavata\Model\Workspace\Experiment\Experiment;
-use Airavata\Model\AppCatalog\JobSubmissionProtocol;
-use Airavata\Model\AppCatalog\DataMovementProtocol;
-use Airavata\Model\AppCatalog\GSISSHJobSubmission;
-use Airavata\Model\AppCatalog\ResourceJobManager;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['APP_CATALOG_SERVER'], $airavataconfig['APP_CATALOG_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-
-$airavataclient = new ApplicationCatalogAPIClient($protocol);
-$transport->open();
-
-echo "Airavata Server Version is: " . $airavataclient->getAPIVersion() . "\n";
-
-echo "Add Compute Resources.... "."\n";
-
-$id_list = $airavataclient->listComputeResourceDescriptions();
-$compute_resource = new ComputeResourceDescription();
-$compute_resource->hostName="test-stampede-host"."-".time();
-$compute_resource->hostAliases=array("stampede");
-$compute_resource->ipAddresses=array("stampede.tacc.xsede.org");
-$compute_resource->isEmpty=false;
-$compute_resource->scratchLocation="/home1/01437/ogce";
-$compute_resource->jobSubmissionProtocols=array();
-$compute_resource->dataMovementProtocols=array();
-
-echo "Adding ".$compute_resource->hostName."...";
-$compute_resource_id=$airavataclient->addComputeResourceDescription($compute_resource);
-echo "done [saved in the catalog as ".$compute_resource_id."]\n";
-
-$gsissh_protoco_data=new GSISSHJobSubmission();
-$gsissh_protoco_data->resourceJobManager=ResourceJobManager::SLURM;
-$gsissh_protoco_data->installedPath="/usr/bin/";
-$gsissh_protoco_data->sshPort=2222;
-$gsissh_protoco_data->monitorMode="push";
-
-echo "Adding GSISSH protocol data to ".$compute_resource_id."...";
-$airavataclient->addGSISSHJobSubmissionProtocol($compute_resource_id, $gsissh_protoco_data);
-echo "done\n";
-$transport->close();
-?>

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/airavata-client-api-tester.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/airavata-client-api-tester.php b/Airavata-PHP-Client-Samples/client-samples/airavata-client-api-tester.php
deleted file mode 100755
index 06c0429..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/airavata-client-api-tester.php
+++ /dev/null
@@ -1,233 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-use Airavata\Model\Workspace\Project;
-use Airavata\Model\Workspace\Experiment\Experiment;
-use Airavata\Model\Workspace\Experiment\DataObjectType;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
-use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\DataType;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-/* this is the same as the factory */
-/* - Temporarity overriding to connect to test server.
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-*/
-$transport = new TSocket('gw127.iu.xsede.org', 8930);
-$transport->setRecvTimeout(20000);
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-try
-{
-    if ($argc != 2)
-    {
-        echo 'php airavata-client-api-tester.php <username>';
-    }
-    else
-    {
-
-        /* ComputationalResourceScheduling data for Trestles*/
-        $cmRST = new ComputationalResourceScheduling();
-        $cmRST->resourceHostId = "trestles.sdsc.edu";
-        $cmRST->ComputationalProjectAccount = "sds128";
-        $cmRST->totalCPUCount = 1;
-        $cmRST->nodeCount = 1;
-        $cmRST->numberOfThreads = 0;
-        $cmRST->queueName = "normal";
-        $cmRST->wallTimeLimit = 15;
-        $cmRST->jobStartTime = 0;
-        $cmRST->totalPhysicalMemory = 0;
-
-        /* ComputationalResourceScheduling data for Stampede */
-        $cmRSS = new ComputationalResourceScheduling();
-        $cmRSS->resourceHostId = "stampede.tacc.xsede.org";
-        $cmRSS->ComputationalProjectAccount = "TG-STA110014S";
-        $cmRSS->totalCPUCount = 1;
-        $cmRSS->nodeCount = 1;
-        $cmRSS->numberOfThreads = 0;
-        $cmRSS->queueName = "normal";
-        $cmRSS->wallTimeLimit = 15;
-        $cmRSS->jobStartTime = 0;
-        $cmRSS->totalPhysicalMemory = 0;
-
-        /* UserConfigurationData using either Trestles or Stampede*/
-        //$cmRS = $cmRSS;
-        $cmRS = $cmRST;
-        $userConfigurationData = new UserConfigurationData();
-        $userConfigurationData->airavataAutoSchedule = 0;
-        $userConfigurationData->overrideManualScheduledParams = 0;
-        $userConfigurationData->computationalResourceScheduling = $cmRS;
-        //var_dump($cmRS);
-        //var_dump($userConfigurationData);
-
-        /*Application ID for Trestles or Stamepede */
-        $appId_trestles = "SimpleEcho2";
-        $appId_stampede = "SimpleEcho3";
-        //$appId = $appId_stampede;
-        $appId = $appId_trestles;
-
-        /* Experiment input and output data. */
-        $input = new DataObjectType();
-        $input->key = "echo_input";
-        $input->value = "echo_output=Hello World";
-        $input->type = DataType::STRING;
-        $exInputs = array($input);
-
-        $output = new DataObjectType();
-        $output->key = "echo_output";
-        $output->value = "";
-        $output->type = DataType::STRING;
-        $exOutputs = array($output);
-
-	
-        /* Simple workflow test. */
-        $user = $argv[1];
-        
-        /* Create Project */
-        $project = new Project();
-	$project->owner = $user;
-	$project->name = "LoadTesterProject";
-  	$projId = $airavataclient->createProject($project); 
-	echo "$user created project $projId. \n";
-
-        /* Create Experiment */
-        $experiment = new Experiment();
-        $experiment->projectID = $projId;
-        $experiment->userName = $user;
-        $experiment->name = "LoadTesterExperiment_".time();
-        $experiment->applicationId = $appId;
-        $experiment->userConfigurationData = $userConfigurationData;
-        $experiment->experimentInputs = $exInputs;
-        $experiment->experimentOutputs = $exOutputs;
-        $expId = $airavataclient->createExperiment($experiment);
-	echo "$user created experiment $expId. \n";
-        //var_dump($experiment);
-
-        /* Get whole project */
-	$uproj = $airavataclient->getProject($projId);
- 	echo "$user $projId detail follows: \n";
-	var_dump($uproj);
-
-        /* Update Project */
-	$uproj->description = "Updated project description: ".time();
-	$airavataclient->updateProject($projId, $uproj);
-	echo "$user updated project $projId. \n";
-
-        /* Get whole experiment */
-	$uexp = $airavataclient->getExperiment($expId);
-        echo "$user experiment $expId detail follows: \n";
-        var_dump($uexp);
-
-	/* Update Experiment */
-	$uexp->description = "Updated experiment description: ".time();
-	$airavataclient->updateExperiment($expId, $uexp);
-	echo "$user updated experiment $expId. \n";
-
-	/* Clone Experiment */
-	$clone_expId = $airavataclient->cloneExperiment($expId, "CloneLoadTesterExperiment_".time());
-	echo "$user cloned experiment $expId as $clone_expId. \n";
-
-	/* Update Experiment Configuration */
-        $update_userConfigurationData = new UserConfigurationData();
-        $update_userConfigurationData->airavataAutoSchedule = 0;
-        $update_userConfigurationData->overrideManualScheduledParams = 0;
-        $update_userConfigurationData->computationalResourceScheduling = $cmRSS; 
-	$airavataclient->updateExperimentConfiguration($expId, $update_userConfigurationData);
-	echo "$user updated user configuration data for experiment $expId. \n";
-
-	/* Update Resource Scheduleing */
-	//$airavataclient->updateResourceScheduleing($expId, $cmRST);
-	//echo "$user updated resource scheduleing for experiment $expId. \n";
-
-	/* Validate experiment */
-	//$valid = $airavataclient->validateExperiment($expId);
-	//echo "$user experiment $expId validation is $valid. \n";
-
-        /* Launch Experiment */
-	//$airavataclient->launchExperiment($expId, 'airavataToken');
-	//echo "$user experiment $expId is launched.";
-
-	/* Get experiment status */ 
-	$experimentStatus = $airavataclient->getExperimentStatus($expId);
-        $experimentStatusString =  ExperimentState::$__names[$experimentStatus->experimentState];
-	echo "$user experiment $expId status is $experimentStatusString. \n";
-
-        /* Get additional information */
-        //$version = $airavataclient->GetAPIVersion();
-        //echo "$user Airavata Server Version is $version. \n"; 
-
-	$userProjects = $airavataclient->getAllUserProjects($user);
-        echo "$user total number of projects is " . sizeof($userProjects) . ". \n";
-
-	$userExperiments = $airavataclient->getAllUserExperiments($user);
-        echo "$user total number of experiments is " . sizeof($userExperiments) . ". \n";
-
-        //echo $projId;
-        $projectExperiments = $airavataclient->getAllExperimentsInProject($projId);
-        echo "$user number of experiments in $projId is " . sizeof($projectExperiments) . ". \n";	
-    }
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-catch (ExperimentNotFoundException $enf)
-{
-    print 'Experiment Not Found Exception: ' . $enf->getMessage()."\n";
-}
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/airavata-client-properties.ini
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/airavata-client-properties.ini b/Airavata-PHP-Client-Samples/client-samples/airavata-client-properties.ini
deleted file mode 100644
index b7ad4d7..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/airavata-client-properties.ini
+++ /dev/null
@@ -1,17 +0,0 @@
-; The is the configuration file with properties needed by Airavata Clients.
-;   Key properties specify location of Airavata Services, Ports and Such.
-
-; Host which runs the Airavata Server
-AIRAVATA_SERVER = "gw111.iu.xsede.org"
-
-; Airavata Server thrift port
-AIRAVATA_PORT = 8930
-
-; Time out value to give enough breathing room for client to get synchronous responses back
-AIRAVATA_TIMEOUT = 5000
-
-; Host which runs the Application Catalog Server
-APP_CATALOG_SERVER = "gw111.iu.xsede.org"
-
-; Application Catalog Server thrift port
-APP_CATALOG_PORT = 8931

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/cloneExperiment.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/cloneExperiment.php b/Airavata-PHP-Client-Samples/client-samples/cloneExperiment.php
deleted file mode 100644
index 42a39d7..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/cloneExperiment.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-//$expId = 'experiment2_8f9c0ccc-6392-47b3-bcde-f4e82557bc32';
-
-
-if ($argc != 2)
-{
-    echo 'php cloneExperiment.php <experiment_id>';
-}
-else
-{
-    $cloneId = clone_experiment($argv[1]);
-
-    $clone = get_experiment($cloneId);
-
-    var_dump($clone);
-
-    echo "Created clone with ID $clone->experimentID named $clone->name \n\n";
-}
-
-
-
-
-//var_dump($experiment);
-
-
-$transport->close();
-
-
-/**
- * Get the experiment with the given ID
- * @param $expId
- * @return null
- */
-function get_experiment($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        return $airavataclient->getExperiment($expId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException during get!<br><br>' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!<br><br>' . $tte->getMessage();
-    }
-    catch (\Exception $e)
-    {
-        echo 'Exception!<br><br>' . $e->getMessage();
-    }
-
-}
-
-/**
- * Clone the experiment with the given ID
- * @param $expId
- * @return null
- */
-function clone_experiment($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        $experiment = $airavataclient->getExperiment($expId);
-
-        return $airavataclient->cloneExperiment($expId, $experiment->name .= time());
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException during clone!<br><br>' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!<br><br>' . $tte->getMessage();
-    }
-}
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/createExperiment.php b/Airavata-PHP-Client-Samples/client-samples/createExperiment.php
deleted file mode 100755
index 3545a37..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/createExperiment.php
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-use Airavata\Model\Workspace\Project;
-use Airavata\Model\Workspace\Experiment\Experiment;
-use Airavata\Model\Workspace\Experiment\DataObjectType;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
-use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\DataType;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try
-{
-    if ($argc != 4)
-    {
-        echo 'php createExperiment.php <username> <experiment_name> <project_ID>';
-    }
-    else
-    {
-        /* ComputationalResourceScheduling data for Trestles*/
-        $cmRST = new ComputationalResourceScheduling();
-        $cmRST->resourceHostId = "trestles.sdsc.edu";
-        $cmRST->ComputationalProjectAccount = "sds128";
-        $cmRST->totalCPUCount = 1;
-        $cmRST->nodeCount = 1;
-        $cmRST->numberOfThreads = 0;
-        $cmRST->queueName = "normal";
-        $cmRST->wallTimeLimit = 15;
-        $cmRST->jobStartTime = 0;
-        $cmRST->totalPhysicalMemory = 0;
-
-        /* ComputationalResourceScheduling data for Stampede */
-        $cmRSS = new ComputationalResourceScheduling();
-        $cmRSS->resourceHostId = "stampede.tacc.xsede.org";
-        $cmRSS->ComputationalProjectAccount = "TG-STA110014S";
-        $cmRSS->totalCPUCount = 1;
-        $cmRSS->nodeCount = 1;
-        $cmRSS->numberOfThreads = 0;
-        $cmRSS->queueName = "normal";
-        $cmRSS->wallTimeLimit = 15;
-        $cmRSS->jobStartTime = 0;
-        $cmRSS->totalPhysicalMemory = 0;
-
-        /* UserConfigurationData using either Trestles or Stampede*/
-        //$cmRS = $cmRSS;
-        $cmRS = $cmRST;
-        $userConfigurationData = new UserConfigurationData();
-        $userConfigurationData->airavataAutoSchedule = 0;
-        $userConfigurationData->overrideManualScheduledParams = 0;
-        $userConfigurationData->computationalResourceScheduling = $cmRS;
-        //var_dump($cmRS);
-        //var_dump($userConfigurationData);
-
-        /*Application ID for Trestles or Stamepede */
-        $appId_trestles = "SimpleEcho2";
-        $appId_stampede = "SimpleEcho3";
-        //$appId = $appId_stampede;
-        $appId = $appId_trestles;
-
-        /* Experiment input and output data. */
-        $input = new DataObjectType();
-        $input->key = "echo_input";
-        $input->value = "echo_output=Hello World";
-        $input->type = DataType::STRING;
-        $exInputs = array($input);
-
-        $output = new DataObjectType();
-        $output->key = "echo_output";
-        $output->value = "";
-        $output->type = DataType::STRING;
-        $exOutputs = array($output);
-
-        /* Create Experiment: needs to update using unique project ID. */
-        $user = $argv[1];
-        $exp_name = $argv[2];
-        $proj = $argv[3];
-
-        $experiment = new Experiment();
-        $experiment->projectID = $proj;
-        $experiment->userName = $user;
-        $experiment->name = $exp_name;
-        $experiment->applicationId = $appId;
-        $experiment->userConfigurationData = $userConfigurationData;
-        $experiment->experimentInputs = $exInputs;
-        $experiment->experimentOutputs = $exOutputs;
-
-        $expId = $airavataclient->createExperiment($experiment);
-
-        if ($expId)
-        {
-            var_dump($experiment);
-            echo "Experiment $expId created! \n    ";
-        }
-        else
-        {
-            echo "Failed to create experiment. \n";
-        }
-    }
-
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/createProject.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/createProject.php b/Airavata-PHP-Client-Samples/client-samples/createProject.php
deleted file mode 100755
index 8a75b6f..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/createProject.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-use Airavata\Model\Workspace\Project;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try
-{
-    if ($argc != 3)
-    {
-        echo 'php createProject.php <owner> <project_name>';
-    }
-    else
-    {
-        $project = new Project();
-        $project->owner = $argv[1];
-        $project->name = $argv[2];
-
-        $projId = $airavataclient->createProject($project);
-
-        if ($projId)
-        {
-            print "$projId";
-        }
-        else
-        {
-            echo 'Failed to create project.';
-        }
-    }
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/getAllExperimentsInProject.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/getAllExperimentsInProject.php b/Airavata-PHP-Client-Samples/client-samples/getAllExperimentsInProject.php
deleted file mode 100644
index 6b42ecc..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/getAllExperimentsInProject.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try
-{
-
-   if ($argc != 2) {
-		echo 'php getAllExperimentsInProject.php <project_ID>';
-	}
-
-	else {
-	    $projectExperiments = $airavataclient->getAllExperimentsInProject($argv[1]);
-   	  echo '# of project experiments = ' . sizeof($projectExperiments) . '         <br><br>';
-    	  var_dump($projectExperiments);
-   }
-
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/getAllUserExperiments.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/getAllUserExperiments.php b/Airavata-PHP-Client-Samples/client-samples/getAllUserExperiments.php
deleted file mode 100644
index 81e3685..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/getAllUserExperiments.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-
-
-try
-{
-    if ($argc != 2)
-    {
-        echo 'php getAllUserExperiments.php <username>';
-    }
-    else
-    {
-        $userExperiments = $airavataclient->getAllUserExperiments($argv[1]);
-        echo '# of user experiments = ' . sizeof($userExperiments) . '     ';
-        var_dump($userExperiments);
-    }
-
-
-
-
-
-
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/getAllUserProjects.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/getAllUserProjects.php b/Airavata-PHP-Client-Samples/client-samples/getAllUserProjects.php
deleted file mode 100644
index 75d6dd4..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/getAllUserProjects.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-
-
-try
-{
-    if ($argc != 2)
-    {
-        echo 'php getAllUserProjects.php <user>';
-    }
-    else
-    {
-        $userProjects = $airavataclient->getAllUserProjects($argv[1]);
-        echo '# of user projects = ' . sizeof($userProjects) . '       ';
-        var_dump($userProjects);
-    }
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/getExperiment.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/getExperiment.php b/Airavata-PHP-Client-Samples/client-samples/getExperiment.php
deleted file mode 100644
index 48f84ea..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/getExperiment.php
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-if (count($argv) < 2) {
-    exit("Please provide an experimentID. \n");
-}
-
-$expId = $argv[1];
-
-
-$experiment = get_experiment($expId);
-
-var_dump($experiment);
-
-
-
-
-
-
-$transport->close();
-
-
-/**
- * Get the experiment with the given ID
- * @param $expId
- * @return null
- */
-function get_experiment($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        return $airavataclient->getExperiment($expId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException!<br><br>' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!<br><br>' . $tte->getMessage();
-    }
-    catch (\Exception $e)
-    {
-        echo 'Exception!<br><br>' . $e->getMessage();
-    }
-
-}
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/getExperimentOutputs.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/getExperimentOutputs.php b/Airavata-PHP-Client-Samples/client-samples/getExperimentOutputs.php
deleted file mode 100644
index 697c3a0..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/getExperimentOutputs.php
+++ /dev/null
@@ -1,116 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-
-if ($argc != 2)
-{
-    exit("php getExperimentOutputs.php <experiment_id> \n");
-}
-
-$expId = $argv[1];
-
-$outputs = get_experiment_outputs($expId);
-
-foreach ($outputs as $output)
-{
-    echo "$output->type: $output->value      <br><br>";
-}
-
-var_dump($outputs);
-
-
-
-
-
-
-$transport->close();
-
-
-/**
- * Get the experiment with the given ID
- * @param $expId
- * @return null
- */
-function get_experiment_outputs($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        return $airavataclient->getExperimentOutputs($expId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException!<br><br>' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!<br><br>' . $tte->getMessage();
-    }
-    catch (\Exception $e)
-    {
-        echo 'Exception!<br><br>' . $e->getMessage();
-    }
-
-}
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/getExperimentStatus.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/getExperimentStatus.php b/Airavata-PHP-Client-Samples/client-samples/getExperimentStatus.php
deleted file mode 100644
index 77b7feb..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/getExperimentStatus.php
+++ /dev/null
@@ -1,100 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-if (count($argv) < 2) {
-    exit("Please provide an experimentID. \n");
-}
-
-$expId = $argv[1];   
-
-$experimentStatusString = get_experiment_status($expId);
-echo "experiment status = " . $experimentStatusString . "       \n<br>";
-
-
-$transport->close();
-
-
-/**
- * Get a string containing the given experiment's status
- * @param $expId
- * @return mixed
- */
-function get_experiment_status($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        $experimentStatus = $airavataclient->getExperimentStatus($expId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException!<br><br>' . $ase->getMessage();
-    }
-    catch (\Exception $e)
-    {
-        echo 'Exception!<br><br>' . $e->getMessage();
-    }
-
-    return ExperimentState::$__names[$experimentStatus->experimentState];
-}
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/launchExperiment.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/launchExperiment.php b/Airavata-PHP-Client-Samples/client-samples/launchExperiment.php
deleted file mode 100755
index fecbf2f..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/launchExperiment.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-use Airavata\Model\Workspace\Project;
-use Airavata\Model\Workspace\Experiment\Experiment;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-try
-{
-   if (count($argv) < 2) {
-	exit("Please provide an experimentID. \n");
-   }
-
-   $expId = $argv[1];	
-   $airavataclient->launchExperiment($expId, 'airavataToken');
-   echo "Experiment $expId is launched.";
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-catch (ExperimentNotFoundException $enf)
-{
-    print 'Experiment Not Found Exception: ' . $enf->getMessage()."\n";
-}
-
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/list-application-interfaces.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/list-application-interfaces.php b/Airavata-PHP-Client-Samples/client-samples/list-application-interfaces.php
deleted file mode 100644
index 7d7c9ce..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/list-application-interfaces.php
+++ /dev/null
@@ -1,76 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/AppCatalog/ApplicationCatalogAPI.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\DataObjectType;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
-use Airavata\Model\ComputeResourceDescription;
-use Airavata\Model\ApplicationInterface;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-use Airavata\API\AppCatalog\ApplicationCatalogAPIClient;
-use Airavata\Model\Workspace\Experiment\Experiment;
-use Airavata\Model\AppCatalog\JobSubmissionProtocol;
-use Airavata\Model\AppCatalog\DataMovementProtocol;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['APP_CATALOG_SERVER'], $airavataconfig['APP_CATALOG_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-
-$airavataclient = new ApplicationCatalogAPIClient($protocol);
-$transport->open();
-
-echo "Airavata Server Version is: " . $airavataclient->getAPIVersion() . "\n";
-
-echo "Listing Application Interfaces.... "."\n";
-
-$id_list = $airavataclient->listApplicationInterfaceIds();
-
-foreach($id_list as $id){
-	echo "Application Interface Id : ".$id."\n";
-	$app_interface = $airavataclient->getApplicationInterface($id);
-	echo "\t"."Interface Data : " . $app_interface->applicationInterfaceData."\n";
-	echo "\t".count($app_interface->applicationDeployments)." Deployments"."\n";
-	foreach($app_interface->applicationDeployments as $deployment){
-		echo "\t\t"."Compute Resource : ".$deployment->computeResourceDescription->hostName."\n";
-		echo "\t\t\t"."Application Data".$deployment->applicationDescriptor->applicationDescriptorData."\n";
-	}
-}
-
-//$compute_resource = new \ComputeResourceDescription();
-//$compute_resource->hostName="localhost";
-//$compute_resource->hostAliases=array("localhost");
-//$compute_resource->ipAddresses=array("127.0.0.1");
-
-//Create a Experiment
-$transport->close();
-
-?>
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/list-compute-resources.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/list-compute-resources.php b/Airavata-PHP-Client-Samples/client-samples/list-compute-resources.php
deleted file mode 100644
index cc5c790..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/list-compute-resources.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/AppCatalog/ApplicationCatalogAPI.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\DataObjectType;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
-use Airavata\Model\ComputeResourceDescription;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-use Airavata\API\AppCatalog\ApplicationCatalogAPIClient;
-use Airavata\Model\Workspace\Experiment\Experiment;
-use Airavata\Model\AppCatalog\JobSubmissionProtocol;
-use Airavata\Model\AppCatalog\DataMovementProtocol;
-use Airavata\Model\AppCatalog\ResourceJobManager;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['APP_CATALOG_SERVER'], $airavataconfig['APP_CATALOG_PORT']);
-echo $airavataconfig['AIRAVATA_TIMEOUT']."\n";
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-
-$airavataclient = new ApplicationCatalogAPIClient($protocol);
-$transport->open();
-
-echo "Airavata Server Version is: " . $airavataclient->getAPIVersion() . "\n";
-
-echo "Listing Compute Resources.... "."\n";
-
-$id_list = $airavataclient->listComputeResourceDescriptions();
-
-foreach($id_list as $id){
-	echo "Compute Resource Id : ".$id."\n";
-	$compute_resource = $airavataclient->getComputeResourceDescription($id);
-	echo "\t"."Host name : " . $compute_resource->hostName ."\n";
-	echo "\t"."Aliases : " . implode(",",array_keys($compute_resource->hostAliases)) ."\n";
-	echo "\t"."Ip addresses : " . implode(",",array_keys($compute_resource->ipAddresses)) ."\n";
-	echo "\t".count($compute_resource->jobSubmissionProtocols)." Job Submission Protocols Supported"."\n";
-	foreach($compute_resource->jobSubmissionProtocols as $protocol_data_id => $protocol_type){
-		echo "\t\t".$protocol_data_id."[".JobSubmissionProtocol::$__names[$protocol_type]. "]"."\n";
-		switch ($protocol_type){
-			case JobSubmissionProtocol::GRAM:
-				$globus_data=$airavataclient->getGlobusJobSubmissionProtocol($protocol_data_id);
-				echo "\t\t\tGate Keeper Endpoint(s) : ".implode(",",($globus_data->globusGateKeeperEndPoint))."\n";
-				break;
-			case JobSubmissionProtocol::GSISSH:
-				$gsissh_data=$airavataclient->getGSISSHJobSubmissionProtocol($protocol_data_id);
-				echo "\t\t\tResource Job Manager : ".ResourceJobManager::$__names[$gsissh_data->resourceJobManager]."\n";
-				echo "\t\t\tInstalled Path : ".$gsissh_data->installedPath."\n";
-				echo "\t\t\tSSH port : ".$gsissh_data->sshPort."\n";
-				echo "\t\t\tMonitor Mode : ".$gsissh_data->monitorMode."\n";
-				break;
-		}
-	}
-	echo "\t".count($compute_resource->dataMovementProtocols)." Data Movement Protocols Supported"."\n";
-	foreach($compute_resource->dataMovementProtocols as $protocol_data_id => $protocol_type){
-		echo "\t\t".$protocol_data_id."[".DataMovementProtocol::$__names[$protocol_type] . "]"."\n";
-			switch ($protocol_type){
-			case DataMovementProtocol::GridFTP:
-				$gridftp_data=$airavataclient->getGridFTPDataMovementProtocol($protocol_data_id);
-				echo "\t\t\tGrid FTP Endpoint(s) : ".implode(",",($gridftp_data->gridFTPEndPoint))."\n";
-				break;
-		}
-	}
-}
-
-//$compute_resource = new \ComputeResourceDescription();
-//$compute_resource->hostName="localhost";
-//$compute_resource->hostAliases=array("localhost");
-//$compute_resource->ipAddresses=array("127.0.0.1");
-
-//Create a Experiment
-$transport->close();
-
-?>
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_application.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_application.php b/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_application.php
deleted file mode 100644
index cd98694..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_application.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try
-{
-
-    if ($argc != 3) {
-        echo 'php search_experiments_by_application.php <username> <project_ID>';
-    }
-
-    else {
-        $experiments = $airavataclient->searchExperimentsByApplication($argv[1], $argv[2]);
-        echo '# results = ' . sizeof($experiments) . '         <br><br>';
-        var_dump($experiments);
-    }
-
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_description.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_description.php b/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_description.php
deleted file mode 100644
index 8243c0b..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_description.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try
-{
-
-    if ($argc != 3) {
-        echo 'php search_experiments_by_description.php <username> <project_ID>';
-    }
-
-    else {
-        $experiments = $airavataclient->searchExperimentsByDesc($argv[1], $argv[2]);
-        echo '# results = ' . sizeof($experiments) . '         <br><br>';
-        var_dump($experiments);
-    }
-
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_name.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_name.php b/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_name.php
deleted file mode 100644
index 4a51a15..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/search_experiments_by_name.php
+++ /dev/null
@@ -1,82 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try
-{
-
-    if ($argc != 3) {
-        echo 'php search_experiments_by_name.php <username> <project_ID>';
-    }
-
-    else {
-        $experiments = $airavataclient->searchExperimentsByName($argv[1], $argv[2]);
-        echo '# results = ' . sizeof($experiments) . '         <br><br>';
-        var_dump($experiments);
-    }
-
-
-}
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-
-
-
-
-$transport->close();
-
-?>
-


[06/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Thrift.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Thrift.php b/Airavata-PHP-Client-Samples/lib/Thrift/Thrift.php
deleted file mode 100644
index c845395..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Thrift.php
+++ /dev/null
@@ -1,789 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-
-/**
- * Data types that can be sent via Thrift
- */
-class TType {
-  const STOP   = 0;
-  const VOID   = 1;
-  const BOOL   = 2;
-  const BYTE   = 3;
-  const I08    = 3;
-  const DOUBLE = 4;
-  const I16    = 6;
-  const I32    = 8;
-  const I64    = 10;
-  const STRING = 11;
-  const UTF7   = 11;
-  const STRUCT = 12;
-  const MAP    = 13;
-  const SET    = 14;
-  const LST    = 15;    // N.B. cannot use LIST keyword in PHP!
-  const UTF8   = 16;
-  const UTF16  = 17;
-}
-
-/**
- * Message types for RPC
- */
-class TMessageType {
-  const CALL  = 1;
-  const REPLY = 2;
-  const EXCEPTION = 3;
-  const ONEWAY = 4;
-}
-
-/**
- * NOTE(mcslee): This currently contains a ton of duplicated code from TBase
- * because we need to save CPU cycles and this is not yet in an extension.
- * Ideally we'd multiply-inherit TException from both Exception and Base, but
- * that's not possible in PHP and there are no modules either, so for now we
- * apologetically take a trip to HackTown.
- *
- * Can be called with standard Exception constructor (message, code) or with
- * Thrift Base object constructor (spec, vals).
- *
- * @param mixed $p1 Message (string) or type-spec (array)
- * @param mixed $p2 Code (integer) or values (array)
- */
-class TException extends Exception {
-  function __construct($p1=null, $p2=0) {
-    if (is_array($p1) && is_array($p2)) {
-      $spec = $p1;
-      $vals = $p2;
-      foreach ($spec as $fid => $fspec) {
-        $var = $fspec['var'];
-        if (isset($vals[$var])) {
-          $this->$var = $vals[$var];
-        }
-      }
-    } else {
-      parent::__construct($p1, $p2);
-    }
-  }
-
-  static $tmethod = array(TType::BOOL   => 'Bool',
-                          TType::BYTE   => 'Byte',
-                          TType::I16    => 'I16',
-                          TType::I32    => 'I32',
-                          TType::I64    => 'I64',
-                          TType::DOUBLE => 'Double',
-                          TType::STRING => 'String');
-
-  private function _readMap(&$var, $spec, $input) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kread = $vread = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kread = 'read'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vread = 'read'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $var = array();
-    $_ktype = $_vtype = $size = 0;
-    $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
-    for ($i = 0; $i < $size; ++$i) {
-      $key = $val = null;
-      if ($kread !== null) {
-        $xfer += $input->$kread($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $class = $kspec['class'];
-          $key = new $class();
-          $xfer += $key->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($key, $kspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($key, $kspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($key, $kspec, $input, true);
-          break;
-        }
-      }
-      if ($vread !== null) {
-        $xfer += $input->$vread($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $class = $vspec['class'];
-          $val = new $class();
-          $xfer += $val->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($val, $vspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($val, $vspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($val, $vspec, $input, true);
-          break;
-        }
-      }
-      $var[$key] = $val;
-    }
-    $xfer += $input->readMapEnd();
-    return $xfer;
-  }
-
-  private function _readList(&$var, $spec, $input, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $eread = $vread = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $eread = 'read'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    $var = array();
-    $_etype = $size = 0;
-    if ($set) {
-      $xfer += $input->readSetBegin($_etype, $size);
-    } else {
-      $xfer += $input->readListBegin($_etype, $size);
-    }
-    for ($i = 0; $i < $size; ++$i) {
-      $elem = null;
-      if ($eread !== null) {
-        $xfer += $input->$eread($elem);
-      } else {
-        $espec = $spec['elem'];
-        switch ($etype) {
-        case TType::STRUCT:
-          $class = $espec['class'];
-          $elem = new $class();
-          $xfer += $elem->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($elem, $espec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($elem, $espec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($elem, $espec, $input, true);
-          break;
-        }
-      }
-      if ($set) {
-        $var[$elem] = true;
-      } else {
-        $var []= $elem;
-      }
-    }
-    if ($set) {
-      $xfer += $input->readSetEnd();
-    } else {
-      $xfer += $input->readListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _read($class, $spec, $input) {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true) {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      if (isset($spec[$fid])) {
-        $fspec = $spec[$fid];
-        $var = $fspec['var'];
-        if ($ftype == $fspec['type']) {
-          $xfer = 0;
-          if (isset(TBase::$tmethod[$ftype])) {
-            $func = 'read'.TBase::$tmethod[$ftype];
-            $xfer += $input->$func($this->$var);
-          } else {
-            switch ($ftype) {
-            case TType::STRUCT:
-              $class = $fspec['class'];
-              $this->$var = new $class();
-              $xfer += $this->$var->read($input);
-              break;
-            case TType::MAP:
-              $xfer += $this->_readMap($this->$var, $fspec, $input);
-              break;
-            case TType::LST:
-              $xfer += $this->_readList($this->$var, $fspec, $input, false);
-              break;
-            case TType::SET:
-              $xfer += $this->_readList($this->$var, $fspec, $input, true);
-              break;
-            }
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-      } else {
-        $xfer += $input->skip($ftype);
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  private function _writeMap($var, $spec, $output) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kwrite = $vwrite = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kwrite = 'write'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vwrite = 'write'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
-    foreach ($var as $key => $val) {
-      if (isset($kwrite)) {
-        $xfer += $output->$kwrite($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $xfer += $key->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($key, $kspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($key, $kspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($key, $kspec, $output, true);
-          break;
-        }
-      }
-      if (isset($vwrite)) {
-        $xfer += $output->$vwrite($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $xfer += $val->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($val, $vspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($val, $vspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($val, $vspec, $output, true);
-          break;
-        }
-      }
-    }
-    $xfer += $output->writeMapEnd();
-    return $xfer;
-  }
-
-  private function _writeList($var, $spec, $output, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $ewrite = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $ewrite = 'write'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    if ($set) {
-      $xfer += $output->writeSetBegin($etype, count($var));
-    } else {
-      $xfer += $output->writeListBegin($etype, count($var));
-    }
-    foreach ($var as $key => $val) {
-      $elem = $set ? $key : $val;
-      if (isset($ewrite)) {
-        $xfer += $output->$ewrite($elem);
-      } else {
-        switch ($etype) {
-        case TType::STRUCT:
-          $xfer += $elem->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($elem, $espec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($elem, $espec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($elem, $espec, $output, true);
-          break;
-        }
-      }
-    }
-    if ($set) {
-      $xfer += $output->writeSetEnd();
-    } else {
-      $xfer += $output->writeListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _write($class, $spec, $output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin($class);
-    foreach ($spec as $fid => $fspec) {
-      $var = $fspec['var'];
-      if ($this->$var !== null) {
-        $ftype = $fspec['type'];
-        $xfer += $output->writeFieldBegin($var, $ftype, $fid);
-        if (isset(TBase::$tmethod[$ftype])) {
-          $func = 'write'.TBase::$tmethod[$ftype];
-          $xfer += $output->$func($this->$var);
-        } else {
-          switch ($ftype) {
-          case TType::STRUCT:
-            $xfer += $this->$var->write($output);
-            break;
-          case TType::MAP:
-            $xfer += $this->_writeMap($this->$var, $fspec, $output);
-            break;
-          case TType::LST:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, false);
-            break;
-          case TType::SET:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, true);
-            break;
-          }
-        }
-        $xfer += $output->writeFieldEnd();
-      }
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-/**
- * Base class from which other Thrift structs extend. This is so that we can
- * cut back on the size of the generated code which is turning out to have a
- * nontrivial cost just to load thanks to the wondrously abysmal implementation
- * of PHP. Note that code is intentionally duplicated in here to avoid making
- * function calls for every field or member of a container..
- */
-abstract class TBase {
-
-  static $tmethod = array(TType::BOOL   => 'Bool',
-                          TType::BYTE   => 'Byte',
-                          TType::I16    => 'I16',
-                          TType::I32    => 'I32',
-                          TType::I64    => 'I64',
-                          TType::DOUBLE => 'Double',
-                          TType::STRING => 'String');
-
-  abstract function read($input);
-
-  abstract function write($output);
-
-  public function __construct($spec=null, $vals=null) {
-    if (is_array($spec) && is_array($vals)) {
-      foreach ($spec as $fid => $fspec) {
-        $var = $fspec['var'];
-        if (isset($vals[$var])) {
-          $this->$var = $vals[$var];
-        }
-      }
-    }
-  }
-
-  private function _readMap(&$var, $spec, $input) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kread = $vread = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kread = 'read'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vread = 'read'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $var = array();
-    $_ktype = $_vtype = $size = 0;
-    $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
-    for ($i = 0; $i < $size; ++$i) {
-      $key = $val = null;
-      if ($kread !== null) {
-        $xfer += $input->$kread($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $class = $kspec['class'];
-          $key = new $class();
-          $xfer += $key->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($key, $kspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($key, $kspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($key, $kspec, $input, true);
-          break;
-        }
-      }
-      if ($vread !== null) {
-        $xfer += $input->$vread($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $class = $vspec['class'];
-          $val = new $class();
-          $xfer += $val->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($val, $vspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($val, $vspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($val, $vspec, $input, true);
-          break;
-        }
-      }
-      $var[$key] = $val;
-    }
-    $xfer += $input->readMapEnd();
-    return $xfer;
-  }
-
-  private function _readList(&$var, $spec, $input, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $eread = $vread = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $eread = 'read'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    $var = array();
-    $_etype = $size = 0;
-    if ($set) {
-      $xfer += $input->readSetBegin($_etype, $size);
-    } else {
-      $xfer += $input->readListBegin($_etype, $size);
-    }
-    for ($i = 0; $i < $size; ++$i) {
-      $elem = null;
-      if ($eread !== null) {
-        $xfer += $input->$eread($elem);
-      } else {
-        $espec = $spec['elem'];
-        switch ($etype) {
-        case TType::STRUCT:
-          $class = $espec['class'];
-          $elem = new $class();
-          $xfer += $elem->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($elem, $espec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($elem, $espec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($elem, $espec, $input, true);
-          break;
-        }
-      }
-      if ($set) {
-        $var[$elem] = true;
-      } else {
-        $var []= $elem;
-      }
-    }
-    if ($set) {
-      $xfer += $input->readSetEnd();
-    } else {
-      $xfer += $input->readListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _read($class, $spec, $input) {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true) {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      if (isset($spec[$fid])) {
-        $fspec = $spec[$fid];
-        $var = $fspec['var'];
-        if ($ftype == $fspec['type']) {
-          $xfer = 0;
-          if (isset(TBase::$tmethod[$ftype])) {
-            $func = 'read'.TBase::$tmethod[$ftype];
-            $xfer += $input->$func($this->$var);
-          } else {
-            switch ($ftype) {
-            case TType::STRUCT:
-              $class = $fspec['class'];
-              $this->$var = new $class();
-              $xfer += $this->$var->read($input);
-              break;
-            case TType::MAP:
-              $xfer += $this->_readMap($this->$var, $fspec, $input);
-              break;
-            case TType::LST:
-              $xfer += $this->_readList($this->$var, $fspec, $input, false);
-              break;
-            case TType::SET:
-              $xfer += $this->_readList($this->$var, $fspec, $input, true);
-              break;
-            }
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-      } else {
-        $xfer += $input->skip($ftype);
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  private function _writeMap($var, $spec, $output) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kwrite = $vwrite = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kwrite = 'write'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vwrite = 'write'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
-    foreach ($var as $key => $val) {
-      if (isset($kwrite)) {
-        $xfer += $output->$kwrite($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $xfer += $key->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($key, $kspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($key, $kspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($key, $kspec, $output, true);
-          break;
-        }
-      }
-      if (isset($vwrite)) {
-        $xfer += $output->$vwrite($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $xfer += $val->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($val, $vspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($val, $vspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($val, $vspec, $output, true);
-          break;
-        }
-      }
-    }
-    $xfer += $output->writeMapEnd();
-    return $xfer;
-  }
-
-  private function _writeList($var, $spec, $output, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $ewrite = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $ewrite = 'write'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    if ($set) {
-      $xfer += $output->writeSetBegin($etype, count($var));
-    } else {
-      $xfer += $output->writeListBegin($etype, count($var));
-    }
-    foreach ($var as $key => $val) {
-      $elem = $set ? $key : $val;
-      if (isset($ewrite)) {
-        $xfer += $output->$ewrite($elem);
-      } else {
-        switch ($etype) {
-        case TType::STRUCT:
-          $xfer += $elem->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($elem, $espec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($elem, $espec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($elem, $espec, $output, true);
-          break;
-        }
-      }
-    }
-    if ($set) {
-      $xfer += $output->writeSetEnd();
-    } else {
-      $xfer += $output->writeListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _write($class, $spec, $output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin($class);
-    foreach ($spec as $fid => $fspec) {
-      $var = $fspec['var'];
-      if ($this->$var !== null) {
-        $ftype = $fspec['type'];
-        $xfer += $output->writeFieldBegin($var, $ftype, $fid);
-        if (isset(TBase::$tmethod[$ftype])) {
-          $func = 'write'.TBase::$tmethod[$ftype];
-          $xfer += $output->$func($this->$var);
-        } else {
-          switch ($ftype) {
-          case TType::STRUCT:
-            $xfer += $this->$var->write($output);
-            break;
-          case TType::MAP:
-            $xfer += $this->_writeMap($this->$var, $fspec, $output);
-            break;
-          case TType::LST:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, false);
-            break;
-          case TType::SET:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, true);
-            break;
-          }
-        }
-        $xfer += $output->writeFieldEnd();
-      }
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-}
-
-class TApplicationException extends TException {
-  static $_TSPEC =
-    array(1 => array('var' => 'message',
-                     'type' => TType::STRING),
-          2 => array('var' => 'code',
-                     'type' => TType::I32));
-
-  const UNKNOWN = 0;
-  const UNKNOWN_METHOD = 1;
-  const INVALID_MESSAGE_TYPE = 2;
-  const WRONG_METHOD_NAME = 3;
-  const BAD_SEQUENCE_ID = 4;
-  const MISSING_RESULT = 5;
-  const INTERNAL_ERROR = 6;
-  const PROTOCOL_ERROR = 7;
-
-  function __construct($message=null, $code=0) {
-    parent::__construct($message, $code);
-  }
-
-  public function read($output) {
-    return $this->_read('TApplicationException', self::$_TSPEC, $output);
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('TApplicationException');
-    if ($message = $this->getMessage()) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
-      $xfer += $output->writeString($message);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($code = $this->getCode()) {
-      $xfer += $output->writeFieldBegin('type', TType::I32, 2);
-      $xfer += $output->writeI32($code);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-}
-
-/**
- * Set global THRIFT ROOT automatically via inclusion here
- */
-if (!isset($GLOBALS['THRIFT_ROOT'])) {
-  $GLOBALS['THRIFT_ROOT'] = dirname(__FILE__);
-}
-include_once $GLOBALS['THRIFT_ROOT'].'/protocol/TProtocol.php';
-include_once $GLOBALS['THRIFT_ROOT'].'/transport/TTransport.php';
-include_once $GLOBALS['THRIFT_ROOT'].'/TStringUtils.php';
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TBufferedTransport.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TBufferedTransport.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TBufferedTransport.php
deleted file mode 100644
index 0d3ad98..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TBufferedTransport.php
+++ /dev/null
@@ -1,165 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Buffered transport. Stores data to an internal buffer that it doesn't
- * actually write out until flush is called. For reading, we do a greedy
- * read and then serve data out of the internal buffer.
- *
- * @package thrift.transport
- */
-class TBufferedTransport extends TTransport {
-
-  /**
-   * Constructor. Creates a buffered transport around an underlying transport
-   */
-  public function __construct($transport=null, $rBufSize=512, $wBufSize=512) {
-    $this->transport_ = $transport;
-    $this->rBufSize_ = $rBufSize;
-    $this->wBufSize_ = $wBufSize;
-  }
-
-  /**
-   * The underlying transport
-   *
-   * @var TTransport
-   */
-  protected $transport_ = null;
-
-  /**
-   * The receive buffer size
-   *
-   * @var int
-   */
-  protected $rBufSize_ = 512;
-
-  /**
-   * The write buffer size
-   *
-   * @var int
-   */
-  protected $wBufSize_ = 512;
-
-  /**
-   * The write buffer.
-   *
-   * @var string
-   */
-  protected $wBuf_ = '';
-
-  /**
-   * The read buffer.
-   *
-   * @var string
-   */
-  protected $rBuf_ = '';
-
-  public function isOpen() {
-    return $this->transport_->isOpen();
-  }
-
-  public function open() {
-    $this->transport_->open();
-  }
-
-  public function close() {
-    $this->transport_->close();
-  }
-
-  public function putBack($data) {
-    if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
-      $this->rBuf_ = $data;
-    } else {
-      $this->rBuf_ = ($data . $this->rBuf_);
-    }
-  }
-
-  /**
-   * The reason that we customize readAll here is that the majority of PHP
-   * streams are already internally buffered by PHP. The socket stream, for
-   * example, buffers internally and blocks if you call read with $len greater
-   * than the amount of data available, unlike recv() in C.
-   *
-   * Therefore, use the readAll method of the wrapped transport inside
-   * the buffered readAll.
-   */
-  public function readAll($len) {
-    $have = TStringFuncFactory::create()->strlen($this->rBuf_);
-    if ($have == 0) {
-      $data = $this->transport_->readAll($len);
-    } else if ($have < $len) {
-      $data = $this->rBuf_;
-      $this->rBuf_ = '';
-      $data .= $this->transport_->readAll($len - $have);
-    } else if ($have == $len) {
-      $data = $this->rBuf_;
-      $this->rBuf_ = '';
-    } else if ($have > $len) {
-      $data = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);
-      $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);
-    }
-    return $data;
-  }
-
-  public function read($len) {
-    if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
-      $this->rBuf_ = $this->transport_->read($this->rBufSize_);
-    }
-
-    if (TStringFuncFactory::create()->strlen($this->rBuf_) <= $len) {
-      $ret = $this->rBuf_;
-      $this->rBuf_ = '';
-      return $ret;
-    }
-
-    $ret = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);
-    $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);
-    return $ret;
-  }
-
-  public function write($buf) {
-    $this->wBuf_ .= $buf;
-    if (TStringFuncFactory::create()->strlen($this->wBuf_) >= $this->wBufSize_) {
-      $out = $this->wBuf_;
-
-      // Note that we clear the internal wBuf_ prior to the underlying write
-      // to ensure we're in a sane state (i.e. internal buffer cleaned)
-      // if the underlying write throws up an exception
-      $this->wBuf_ = '';
-      $this->transport_->write($out);
-    }
-  }
-
-  public function flush() {
-    if (TStringFuncFactory::create()->strlen($this->wBuf_) > 0) {
-      $this->transport_->write($this->wBuf_);
-      $this->wBuf_ = '';
-    }
-    $this->transport_->flush();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TFramedTransport.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TFramedTransport.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TFramedTransport.php
deleted file mode 100644
index d80d548..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TFramedTransport.php
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Framed transport. Writes and reads data in chunks that are stamped with
- * their length.
- *
- * @package thrift.transport
- */
-class TFramedTransport extends TTransport {
-
-  /**
-   * Underlying transport object.
-   *
-   * @var TTransport
-   */
-  private $transport_;
-
-  /**
-   * Buffer for read data.
-   *
-   * @var string
-   */
-  private $rBuf_;
-
-  /**
-   * Buffer for queued output data
-   *
-   * @var string
-   */
-  private $wBuf_;
-
-  /**
-   * Whether to frame reads
-   *
-   * @var bool
-   */
-  private $read_;
-
-  /**
-   * Whether to frame writes
-   *
-   * @var bool
-   */
-  private $write_;
-
-  /**
-   * Constructor.
-   *
-   * @param TTransport $transport Underlying transport
-   */
-  public function __construct($transport=null, $read=true, $write=true) {
-    $this->transport_ = $transport;
-    $this->read_ = $read;
-    $this->write_ = $write;
-  }
-
-  public function isOpen() {
-    return $this->transport_->isOpen();
-  }
-
-  public function open() {
-    $this->transport_->open();
-  }
-
-  public function close() {
-    $this->transport_->close();
-  }
-
-  /**
-   * Reads from the buffer. When more data is required reads another entire
-   * chunk and serves future reads out of that.
-   *
-   * @param int $len How much data
-   */
-  public function read($len) {
-    if (!$this->read_) {
-      return $this->transport_->read($len);
-    }
-
-    if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
-      $this->readFrame();
-    }
-
-    // Just return full buff
-    if ($len >= TStringFuncFactory::create()->strlen($this->rBuf_)) {
-      $out = $this->rBuf_;
-      $this->rBuf_ = null;
-      return $out;
-    }
-
-    // Return TStringFuncFactory::create()->substr
-    $out = TStringFuncFactory::create()->substr($this->rBuf_, 0, $len);
-    $this->rBuf_ = TStringFuncFactory::create()->substr($this->rBuf_, $len);
-    return $out;
-  }
-
-  /**
-   * Put previously read data back into the buffer
-   *
-   * @param string $data data to return
-   */
-  public function putBack($data) {
-    if (TStringFuncFactory::create()->strlen($this->rBuf_) === 0) {
-      $this->rBuf_ = $data;
-    } else {
-      $this->rBuf_ = ($data . $this->rBuf_);
-    }
-  }
-
-  /**
-   * Reads a chunk of data into the internal read buffer.
-   */
-  private function readFrame() {
-    $buf = $this->transport_->readAll(4);
-    $val = unpack('N', $buf);
-    $sz = $val[1];
-
-    $this->rBuf_ = $this->transport_->readAll($sz);
-  }
-
-  /**
-   * Writes some data to the pending output buffer.
-   *
-   * @param string $buf The data
-   * @param int    $len Limit of bytes to write
-   */
-  public function write($buf, $len=null) {
-    if (!$this->write_) {
-      return $this->transport_->write($buf, $len);
-    }
-
-    if ($len !== null && $len < TStringFuncFactory::create()->strlen($buf)) {
-      $buf = TStringFuncFactory::create()->substr($buf, 0, $len);
-    }
-    $this->wBuf_ .= $buf;
-  }
-
-  /**
-   * Writes the output buffer to the stream in the format of a 4-byte length
-   * followed by the actual data.
-   */
-  public function flush() {
-    if (!$this->write_ || TStringFuncFactory::create()->strlen($this->wBuf_) == 0) {
-      return $this->transport_->flush();
-    }
-
-    $out = pack('N', TStringFuncFactory::create()->strlen($this->wBuf_));
-    $out .= $this->wBuf_;
-
-    // Note that we clear the internal wBuf_ prior to the underlying write
-    // to ensure we're in a sane state (i.e. internal buffer cleaned)
-    // if the underlying write throws up an exception
-    $this->wBuf_ = '';
-    $this->transport_->write($out);
-    $this->transport_->flush();
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/THttpClient.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/THttpClient.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/THttpClient.php
deleted file mode 100644
index f46b18a..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/THttpClient.php
+++ /dev/null
@@ -1,221 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * HTTP client for Thrift
- *
- * @package thrift.transport
- */
-class THttpClient extends TTransport {
-
-  /**
-   * The host to connect to
-   *
-   * @var string
-   */
-  protected $host_;
-
-  /**
-   * The port to connect on
-   *
-   * @var int
-   */
-  protected $port_;
-
-  /**
-   * The URI to request
-   *
-   * @var string
-   */
-  protected $uri_;
-
-  /**
-   * The scheme to use for the request, i.e. http, https
-   *
-   * @var string
-   */
-  protected $scheme_;
-
-  /**
-   * Buffer for the HTTP request data
-   *
-   * @var string
-   */
-  protected $buf_;
-
-  /**
-   * Input socket stream.
-   *
-   * @var resource
-   */
-  protected $handle_;
-
-  /**
-   * Read timeout
-   *
-   * @var float
-   */
-  protected $timeout_;
-
-  /**
-   * http headers
-   *
-   * @var array
-   */
-  protected $headers_;
-
-  /**
-   * Make a new HTTP client.
-   *
-   * @param string $host
-   * @param int    $port
-   * @param string $uri
-   */
-  public function __construct($host, $port=80, $uri='', $scheme = 'http') {
-    if ((TStringFuncFactory::create()->strlen($uri) > 0) && ($uri{0} != '/')) {
-      $uri = '/'.$uri;
-    }
-    $this->scheme_ = $scheme;
-    $this->host_ = $host;
-    $this->port_ = $port;
-    $this->uri_ = $uri;
-    $this->buf_ = '';
-    $this->handle_ = null;
-    $this->timeout_ = null;
-    $this->headers_ = array();
-  }
-
-  /**
-   * Set read timeout
-   *
-   * @param float $timeout
-   */
-  public function setTimeoutSecs($timeout) {
-    $this->timeout_ = $timeout;
-  }
-
-  /**
-   * Whether this transport is open.
-   *
-   * @return boolean true if open
-   */
-  public function isOpen() {
-    return true;
-  }
-
-  /**
-   * Open the transport for reading/writing
-   *
-   * @throws TTransportException if cannot open
-   */
-  public function open() {}
-
-  /**
-   * Close the transport.
-   */
-  public function close() {
-    if ($this->handle_) {
-      @fclose($this->handle_);
-      $this->handle_ = null;
-    }
-  }
-
-  /**
-   * Read some data into the array.
-   *
-   * @param int    $len How much to read
-   * @return string The data that has been read
-   * @throws TTransportException if cannot read any more data
-   */
-  public function read($len) {
-    $data = @fread($this->handle_, $len);
-    if ($data === FALSE || $data === '') {
-      $md = stream_get_meta_data($this->handle_);
-      if ($md['timed_out']) {
-        throw new TTransportException('THttpClient: timed out reading '.$len.' bytes from '.$this->host_.':'.$this->port_.$this->uri_, TTransportException::TIMED_OUT);
-      } else {
-        throw new TTransportException('THttpClient: Could not read '.$len.' bytes from '.$this->host_.':'.$this->port_.$this->uri_, TTransportException::UNKNOWN);
-      }
-    }
-    return $data;
-  }
-
-  /**
-   * Writes some data into the pending buffer
-   *
-   * @param string $buf  The data to write
-   * @throws TTransportException if writing fails
-   */
-  public function write($buf) {
-    $this->buf_ .= $buf;
-  }
-
-  /**
-   * Opens and sends the actual request over the HTTP connection
-   *
-   * @throws TTransportException if a writing error occurs
-   */
-  public function flush() {
-    // God, PHP really has some esoteric ways of doing simple things.
-    $host = $this->host_.($this->port_ != 80 ? ':'.$this->port_ : '');
-
-    $headers = array();
-    $defaultHeaders = array('Host' => $host,
-                            'Accept' => 'application/x-thrift',
-                            'User-Agent' => 'PHP/THttpClient',
-                            'Content-Type' => 'application/x-thrift',
-                            'Content-Length' => TStringFuncFactory::create()->strlen($this->buf_));
-    foreach (array_merge($defaultHeaders, $this->headers_) as $key => $value) {
-        $headers[] = "$key: $value";
-    }
-
-    $options = array('method' => 'POST',
-                     'header' => implode("\r\n", $headers),
-                     'max_redirects' => 1,
-                     'content' => $this->buf_);
-    if ($this->timeout_ > 0) {
-      $options['timeout'] = $this->timeout_;
-    }
-    $this->buf_ = '';
-
-    $contextid = stream_context_create(array('http' => $options));
-    $this->handle_ = @fopen($this->scheme_.'://'.$host.$this->uri_, 'r', false, $contextid);
-
-    // Connect failed?
-    if ($this->handle_ === FALSE) {
-      $this->handle_ = null;
-      $error = 'THttpClient: Could not connect to '.$host.$this->uri_;
-      throw new TTransportException($error, TTransportException::NOT_OPEN);
-    }
-  }
-
-  public function addHeaders($headers) {
-    $this->headers_ = array_merge($this->headers_, $headers);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TMemoryBuffer.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TMemoryBuffer.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TMemoryBuffer.php
deleted file mode 100644
index 911fab6..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TMemoryBuffer.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * A memory buffer is a tranpsort that simply reads from and writes to an
- * in-memory string buffer. Anytime you call write on it, the data is simply
- * placed into a buffer, and anytime you call read, data is read from that
- * buffer.
- *
- * @package thrift.transport
- */
-class TMemoryBuffer extends TTransport {
-
-  /**
-   * Constructor. Optionally pass an initial value
-   * for the buffer.
-   */
-  public function __construct($buf = '') {
-    $this->buf_ = $buf;
-  }
-
-  protected $buf_ = '';
-
-  public function isOpen() {
-    return true;
-  }
-
-  public function open() {}
-
-  public function close() {}
-
-  public function write($buf) {
-    $this->buf_ .= $buf;
-  }
-
-  public function read($len) {
-    $bufLength = TStringFuncFactory::create()->strlen($this->buf_);
-
-    if ($bufLength === 0) {
-      throw new TTransportException('TMemoryBuffer: Could not read ' .
-                                    $len . ' bytes from buffer.',
-                                    TTransportException::UNKNOWN);
-    }
-
-    if ($bufLength <= $len) {
-      $ret = $this->buf_;
-      $this->buf_ = '';
-      return $ret;
-    }
-
-    $ret = TStringFuncFactory::create()->substr($this->buf_, 0, $len);
-    $this->buf_ = TStringFuncFactory::create()->substr($this->buf_, $len);
-
-    return $ret;
-  }
-
-  function getBuffer() {
-    return $this->buf_;
-  }
-
-  public function available() {
-    return TStringFuncFactory::create()->strlen($this->buf_);
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TNullTransport.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TNullTransport.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TNullTransport.php
deleted file mode 100644
index 4bf10ed..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TNullTransport.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TTransportException;
-
-/**
- * Transport that only accepts writes and ignores them.
- * This is useful for measuring the serialized size of structures.
- *
- * @package thrift.transport
- */
-class TNullTransport extends TTransport {
-
-  public function isOpen() {
-    return true;
-  }
-
-  public function open() {}
-
-  public function close() {}
-
-  public function read($len) {
-    throw new TTransportException("Can't read from TNullTransport.");
-  }
-
-  public function write($buf) {}
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TPhpStream.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TPhpStream.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TPhpStream.php
deleted file mode 100644
index 691d0cf..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TPhpStream.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Php stream transport. Reads to and writes from the php standard streams
- * php://input and php://output
- *
- * @package thrift.transport
- */
-class TPhpStream extends TTransport {
-
-  const MODE_R = 1;
-  const MODE_W = 2;
-
-  private $inStream_ = null;
-
-  private $outStream_ = null;
-
-  private $read_ = false;
-
-  private $write_ = false;
-
-  public function __construct($mode) {
-    $this->read_ = $mode & self::MODE_R;
-    $this->write_ = $mode & self::MODE_W;
-  }
-
-  public function open() {
-    if ($this->read_) {
-      $this->inStream_ = @fopen(self::inStreamName(), 'r');
-      if (!is_resource($this->inStream_)) {
-        throw new TException('TPhpStream: Could not open php://input');
-      }
-    }
-    if ($this->write_) {
-      $this->outStream_ = @fopen('php://output', 'w');
-      if (!is_resource($this->outStream_)) {
-        throw new TException('TPhpStream: Could not open php://output');
-      }
-    }
-  }
-
-  public function close() {
-    if ($this->read_) {
-      @fclose($this->inStream_);
-      $this->inStream_ = null;
-    }
-    if ($this->write_) {
-      @fclose($this->outStream_);
-      $this->outStream_ = null;
-    }
-  }
-
-  public function isOpen() {
-    return
-      (!$this->read_ || is_resource($this->inStream_)) &&
-      (!$this->write_ || is_resource($this->outStream_));
-  }
-
-  public function read($len) {
-    $data = @fread($this->inStream_, $len);
-    if ($data === FALSE || $data === '') {
-      throw new TException('TPhpStream: Could not read '.$len.' bytes');
-    }
-    return $data;
-  }
-
-  public function write($buf) {
-    while (TStringFuncFactory::create()->strlen($buf) > 0) {
-      $got = @fwrite($this->outStream_, $buf);
-      if ($got === 0 || $got === FALSE) {
-        throw new TException('TPhpStream: Could not write '.TStringFuncFactory::create()->strlen($buf).' bytes');
-      }
-      $buf = TStringFuncFactory::create()->substr($buf, $got);
-    }
-  }
-
-  public function flush() {
-    @fflush($this->outStream_);
-  }
-
-  private static function inStreamName() {
-    if (php_sapi_name() == 'cli') {
-      return 'php://stdin';
-    }
-    return 'php://input';
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocket.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocket.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocket.php
deleted file mode 100644
index 3ad3bf7..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocket.php
+++ /dev/null
@@ -1,326 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TException;
-use Thrift\Exception\TTransportException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Sockets implementation of the TTransport interface.
- *
- * @package thrift.transport
- */
-class TSocket extends TTransport {
-
-  /**
-   * Handle to PHP socket
-   *
-   * @var resource
-   */
-  private $handle_ = null;
-
-  /**
-   * Remote hostname
-   *
-   * @var string
-   */
-  protected $host_ = 'localhost';
-
-  /**
-   * Remote port
-   *
-   * @var int
-   */
-  protected $port_ = '9090';
-
-  /**
-   * Send timeout in seconds.
-   *
-   * Combined with sendTimeoutUsec this is used for send timeouts.
-   *
-   * @var int
-   */
-  private $sendTimeoutSec_ = 0;
-
-  /**
-   * Send timeout in microseconds.
-   *
-   * Combined with sendTimeoutSec this is used for send timeouts.
-   *
-   * @var int
-   */
-  private $sendTimeoutUsec_ = 100000;
-
-  /**
-   * Recv timeout in seconds
-   *
-   * Combined with recvTimeoutUsec this is used for recv timeouts.
-   *
-   * @var int
-   */
-  private $recvTimeoutSec_ = 0;
-
-  /**
-   * Recv timeout in microseconds
-   *
-   * Combined with recvTimeoutSec this is used for recv timeouts.
-   *
-   * @var int
-   */
-  private $recvTimeoutUsec_ = 750000;
-
-  /**
-   * Persistent socket or plain?
-   *
-   * @var bool
-   */
-  protected $persist_ = FALSE;
-
-  /**
-   * Debugging on?
-   *
-   * @var bool
-   */
-  protected $debug_ = FALSE;
-
-  /**
-   * Debug handler
-   *
-   * @var mixed
-   */
-  protected $debugHandler_ = null;
-
-  /**
-   * Socket constructor
-   *
-   * @param string $host         Remote hostname
-   * @param int    $port         Remote port
-   * @param bool   $persist      Whether to use a persistent socket
-   * @param string $debugHandler Function to call for error logging
-   */
-  public function __construct($host='localhost',
-                              $port=9090,
-                              $persist=FALSE,
-                              $debugHandler=null) {
-    $this->host_ = $host;
-    $this->port_ = $port;
-    $this->persist_ = $persist;
-    $this->debugHandler_ = $debugHandler ? $debugHandler : 'error_log';
-  }
-
-  /**
-   * @param resource $handle
-   * @return void
-   */
-  public function setHandle($handle) {
-    $this->handle_ = $handle;
-  }
-
-  /**
-   * Sets the send timeout.
-   *
-   * @param int $timeout  Timeout in milliseconds.
-   */
-  public function setSendTimeout($timeout) {
-    $this->sendTimeoutSec_ = floor($timeout / 1000);
-    $this->sendTimeoutUsec_ =
-            ($timeout - ($this->sendTimeoutSec_ * 1000)) * 1000;
-  }
-
-  /**
-   * Sets the receive timeout.
-   *
-   * @param int $timeout  Timeout in milliseconds.
-   */
-  public function setRecvTimeout($timeout) {
-    $this->recvTimeoutSec_ = floor($timeout / 1000);
-    $this->recvTimeoutUsec_ =
-            ($timeout - ($this->recvTimeoutSec_ * 1000)) * 1000;
-  }
-
-  /**
-   * Sets debugging output on or off
-   *
-   * @param bool $debug
-   */
-  public function setDebug($debug) {
-    $this->debug_ = $debug;
-  }
-
-  /**
-   * Get the host that this socket is connected to
-   *
-   * @return string host
-   */
-  public function getHost() {
-    return $this->host_;
-  }
-
-  /**
-   * Get the remote port that this socket is connected to
-   *
-   * @return int port
-   */
-  public function getPort() {
-    return $this->port_;
-  }
-
-  /**
-   * Tests whether this is open
-   *
-   * @return bool true if the socket is open
-   */
-  public function isOpen() {
-    return is_resource($this->handle_);
-  }
-
-  /**
-   * Connects the socket.
-   */
-  public function open() {
-    if ($this->isOpen()) {
-      throw new TTransportException('Socket already connected', TTransportException::ALREADY_OPEN);
-    }
-
-    if (empty($this->host_)) {
-      throw new TTransportException('Cannot open null host', TTransportException::NOT_OPEN);
-    }
-
-    if ($this->port_ <= 0) {
-      throw new TTransportException('Cannot open without port', TTransportException::NOT_OPEN);
-    }
-
-    if ($this->persist_) {
-      $this->handle_ = @pfsockopen($this->host_,
-                                   $this->port_,
-                                   $errno,
-                                   $errstr,
-                                   $this->sendTimeoutSec_ + ($this->sendTimeoutUsec_ / 1000000));
-    } else {
-      $this->handle_ = @fsockopen($this->host_,
-                                  $this->port_,
-                                  $errno,
-                                  $errstr,
-                                  $this->sendTimeoutSec_ + ($this->sendTimeoutUsec_ / 1000000));
-    }
-
-    // Connect failed?
-    if ($this->handle_ === FALSE) {
-      $error = 'TSocket: Could not connect to '.$this->host_.':'.$this->port_.' ('.$errstr.' ['.$errno.'])';
-      if ($this->debug_) {
-        call_user_func($this->debugHandler_, $error);
-      }
-      throw new TException($error);
-    }
-  }
-
-  /**
-   * Closes the socket.
-   */
-  public function close() {
-    if (!$this->persist_) {
-      @fclose($this->handle_);
-      $this->handle_ = null;
-    }
-  }
-
-  /**
-   * Read from the socket at most $len bytes.
-   *
-   * This method will not wait for all the requested data, it will return as
-   * soon as any data is received.
-   *
-   * @param int $len Maximum number of bytes to read.
-   * @return string Binary data
-   */
-  public function read($len) {
-    $null = null;
-    $read = array($this->handle_);
-    $readable = @stream_select($read, $null, $null, $this->recvTimeoutSec_, $this->recvTimeoutUsec_);
-
-    if ($readable > 0) {
-      $data = @stream_socket_recvfrom($this->handle_, $len);
-      if ($data === false) {
-          throw new TTransportException('TSocket: Could not read '.$len.' bytes from '.
-                               $this->host_.':'.$this->port_);
-      } elseif($data == '' && feof($this->handle_)) {
-          throw new TTransportException('TSocket read 0 bytes');
-        }
-
-      return $data;
-    } else if ($readable === 0) {
-        throw new TTransportException('TSocket: timed out reading '.$len.' bytes from '.
-                             $this->host_.':'.$this->port_);
-      } else {
-        throw new TTransportException('TSocket: Could not read '.$len.' bytes from '.
-                             $this->host_.':'.$this->port_);
-      }
-    }
-
-  /**
-   * Write to the socket.
-   *
-   * @param string $buf The data to write
-   */
-  public function write($buf) {
-    $null = null;
-    $write = array($this->handle_);
-
-    // keep writing until all the data has been written
-    while (TStringFuncFactory::create()->strlen($buf) > 0) {
-      // wait for stream to become available for writing
-      $writable = @stream_select($null, $write, $null, $this->sendTimeoutSec_, $this->sendTimeoutUsec_);
-      if ($writable > 0) {
-        // write buffer to stream
-        $written = @stream_socket_sendto($this->handle_, $buf);
-        if ($written === -1 || $written === false) {
-          throw new TTransportException('TSocket: Could not write '.TStringFuncFactory::create()->strlen($buf).' bytes '.
-                                   $this->host_.':'.$this->port_);
-        }
-        // determine how much of the buffer is left to write
-        $buf = TStringFuncFactory::create()->substr($buf, $written);
-      } else if ($writable === 0) {
-          throw new TTransportException('TSocket: timed out writing '.TStringFuncFactory::create()->strlen($buf).' bytes from '.
-                               $this->host_.':'.$this->port_);
-        } else {
-            throw new TTransportException('TSocket: Could not write '.TStringFuncFactory::create()->strlen($buf).' bytes '.
-                                 $this->host_.':'.$this->port_);
-        }
-      }
-    }
-
-  /**
-   * Flush output to the socket.
-   *
-   * Since read(), readAll() and write() operate on the sockets directly,
-   * this is a no-op
-   *
-   * If you wish to have flushable buffering behaviour, wrap this TSocket
-   * in a TBufferedTransport.
-   */
-  public function flush() {
-    // no-op
-    }
-  }

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocketPool.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocketPool.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocketPool.php
deleted file mode 100644
index e1610cb..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TSocketPool.php
+++ /dev/null
@@ -1,295 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Transport\TSocket;
-use Thrift\Exception\TException;
-
-/**
- * This library makes use of APC cache to make hosts as down in a web
- * environment. If you are running from the CLI or on a system without APC
- * installed, then these null functions will step in and act like cache
- * misses.
- */
-if (!function_exists('apc_fetch')) {
-  function apc_fetch($key) { return FALSE; }
-  function apc_store($key, $var, $ttl=0) { return FALSE; }
-}
-
-/**
- * Sockets implementation of the TTransport interface that allows connection
- * to a pool of servers.
- *
- * @package thrift.transport
- */
-class TSocketPool extends TSocket {
-
-  /**
-   * Remote servers. Array of associative arrays with 'host' and 'port' keys
-   */
-  private $servers_ = array();
-
-  /**
-   * How many times to retry each host in connect
-   *
-   * @var int
-   */
-  private $numRetries_ = 1;
-
-  /**
-   * Retry interval in seconds, how long to not try a host if it has been
-   * marked as down.
-   *
-   * @var int
-   */
-  private $retryInterval_ = 60;
-
-  /**
-   * Max consecutive failures before marking a host down.
-   *
-   * @var int
-   */
-  private $maxConsecutiveFailures_ = 1;
-
-  /**
-   * Try hosts in order? or Randomized?
-   *
-   * @var bool
-   */
-  private $randomize_ = TRUE;
-
-  /**
-   * Always try last host, even if marked down?
-   *
-   * @var bool
-   */
-  private $alwaysTryLast_ = TRUE;
-
-  /**
-   * Socket pool constructor
-   *
-   * @param array  $hosts        List of remote hostnames
-   * @param mixed  $ports        Array of remote ports, or a single common port
-   * @param bool   $persist      Whether to use a persistent socket
-   * @param mixed  $debugHandler Function for error logging
-   */
-  public function __construct($hosts=array('localhost'),
-                              $ports=array(9090),
-                              $persist=FALSE,
-                              $debugHandler=null) {
-    parent::__construct(null, 0, $persist, $debugHandler);
-
-    if (!is_array($ports)) {
-      $port = $ports;
-      $ports = array();
-      foreach ($hosts as $key => $val) {
-        $ports[$key] = $port;
-      }
-    }
-
-    foreach ($hosts as $key => $host) {
-      $this->servers_ []= array('host' => $host,
-                                'port' => $ports[$key]);
-    }
-  }
-
-  /**
-   * Add a server to the pool
-   *
-   * This function does not prevent you from adding a duplicate server entry.
-   *
-   * @param string $host hostname or IP
-   * @param int $port port
-   */
-  public function addServer($host, $port) {
-    $this->servers_[] = array('host' => $host, 'port' => $port);
-  }
-
-  /**
-   * Sets how many time to keep retrying a host in the connect function.
-   *
-   * @param int $numRetries
-   */
-  public function setNumRetries($numRetries) {
-    $this->numRetries_ = $numRetries;
-  }
-
-  /**
-   * Sets how long to wait until retrying a host if it was marked down
-   *
-   * @param int $numRetries
-   */
-  public function setRetryInterval($retryInterval) {
-    $this->retryInterval_ = $retryInterval;
-  }
-
-  /**
-   * Sets how many time to keep retrying a host before marking it as down.
-   *
-   * @param int $numRetries
-   */
-  public function setMaxConsecutiveFailures($maxConsecutiveFailures) {
-    $this->maxConsecutiveFailures_ = $maxConsecutiveFailures;
-  }
-
-  /**
-   * Turns randomization in connect order on or off.
-   *
-   * @param bool $randomize
-   */
-  public function setRandomize($randomize) {
-    $this->randomize_ = $randomize;
-  }
-
-  /**
-   * Whether to always try the last server.
-   *
-   * @param bool $alwaysTryLast
-   */
-  public function setAlwaysTryLast($alwaysTryLast) {
-    $this->alwaysTryLast_ = $alwaysTryLast;
-  }
-
-
-  /**
-   * Connects the socket by iterating through all the servers in the pool
-   * and trying to find one that works.
-   */
-  public function open() {
-    // Check if we want order randomization
-    if ($this->randomize_) {
-      shuffle($this->servers_);
-    }
-
-    // Count servers to identify the "last" one
-    $numServers = count($this->servers_);
-
-    for ($i = 0; $i < $numServers; ++$i) {
-
-      // This extracts the $host and $port variables
-      extract($this->servers_[$i]);
-
-      // Check APC cache for a record of this server being down
-      $failtimeKey = 'thrift_failtime:'.$host.':'.$port.'~';
-
-      // Cache miss? Assume it's OK
-      $lastFailtime = apc_fetch($failtimeKey);
-      if ($lastFailtime === FALSE) {
-        $lastFailtime = 0;
-      }
-
-      $retryIntervalPassed = FALSE;
-
-      // Cache hit...make sure enough the retry interval has elapsed
-      if ($lastFailtime > 0) {
-        $elapsed = time() - $lastFailtime;
-        if ($elapsed > $this->retryInterval_) {
-          $retryIntervalPassed = TRUE;
-          if ($this->debug_) {
-            call_user_func($this->debugHandler_,
-                           'TSocketPool: retryInterval '.
-                           '('.$this->retryInterval_.') '.
-                           'has passed for host '.$host.':'.$port);
-          }
-        }
-      }
-
-      // Only connect if not in the middle of a fail interval, OR if this
-      // is the LAST server we are trying, just hammer away on it
-      $isLastServer = FALSE;
-      if ($this->alwaysTryLast_) {
-        $isLastServer = ($i == ($numServers - 1));
-      }
-
-      if (($lastFailtime === 0) ||
-          ($isLastServer) ||
-          ($lastFailtime > 0 && $retryIntervalPassed)) {
-
-        // Set underlying TSocket params to this one
-        $this->host_ = $host;
-        $this->port_ = $port;
-
-        // Try up to numRetries_ connections per server
-        for ($attempt = 0; $attempt < $this->numRetries_; $attempt++) {
-          try {
-            // Use the underlying TSocket open function
-            parent::open();
-
-            // Only clear the failure counts if required to do so
-            if ($lastFailtime > 0) {
-              apc_store($failtimeKey, 0);
-            }
-
-            // Successful connection, return now
-            return;
-
-          } catch (TException $tx) {
-            // Connection failed
-          }
-        }
-
-        // Mark failure of this host in the cache
-        $consecfailsKey = 'thrift_consecfails:'.$host.':'.$port.'~';
-
-        // Ignore cache misses
-        $consecfails = apc_fetch($consecfailsKey);
-        if ($consecfails === FALSE) {
-          $consecfails = 0;
-        }
-
-        // Increment by one
-        $consecfails++;
-
-        // Log and cache this failure
-        if ($consecfails >= $this->maxConsecutiveFailures_) {
-          if ($this->debug_) {
-            call_user_func($this->debugHandler_,
-                           'TSocketPool: marking '.$host.':'.$port.
-                           ' as down for '.$this->retryInterval_.' secs '.
-                           'after '.$consecfails.' failed attempts.');
-          }
-          // Store the failure time
-          apc_store($failtimeKey, time());
-
-          // Clear the count of consecutive failures
-          apc_store($consecfailsKey, 0);
-        } else {
-          apc_store($consecfailsKey, $consecfails);
-        }
-      }
-    }
-
-    // Oh no; we failed them all. The system is totally ill!
-    $error = 'TSocketPool: All hosts in pool are down. ';
-    $hosts = array();
-    foreach ($this->servers_ as $server) {
-      $hosts []= $server['host'].':'.$server['port'];
-    }
-    $hostlist = implode(',', $hosts);
-    $error .= '('.$hostlist.')';
-    if ($this->debug_) {
-      call_user_func($this->debugHandler_, $error);
-    }
-    throw new TException($error);
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TTransport.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TTransport.php b/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TTransport.php
deleted file mode 100644
index 2e44366..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Transport/TTransport.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Transport;
-
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Base interface for a transport agent.
- *
- * @package thrift.transport
- */
-abstract class TTransport {
-
-  /**
-   * Whether this transport is open.
-   *
-   * @return boolean true if open
-   */
-  public abstract function isOpen();
-
-  /**
-   * Open the transport for reading/writing
-   *
-   * @throws TTransportException if cannot open
-   */
-  public abstract function open();
-
-  /**
-   * Close the transport.
-   */
-  public abstract function close();
-
-  /**
-   * Read some data into the array.
-   *
-   * @param int    $len How much to read
-   * @return string The data that has been read
-   * @throws TTransportException if cannot read any more data
-   */
-  public abstract function read($len);
-
-  /**
-   * Guarantees that the full amount of data is read.
-   *
-   * @return string The data, of exact length
-   * @throws TTransportException if cannot read data
-   */
-  public function readAll($len) {
-    // return $this->read($len);
-
-    $data = '';
-    $got = 0;
-    while (($got = TStringFuncFactory::create()->strlen($data)) < $len) {
-      $data .= $this->read($len - $got);
-    }
-    return $data;
-  }
-
-  /**
-   * Writes the given data out.
-   *
-   * @param string $buf  The data to write
-   * @throws TTransportException if writing fails
-   */
-  public abstract function write($buf);
-
-  /**
-   * Flushes any pending data out of a buffer
-   *
-   * @throws TTransportException if a writing error occurs
-   */
-  public function flush() {}
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Type/TMessageType.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Type/TMessageType.php b/Airavata-PHP-Client-Samples/lib/Thrift/Type/TMessageType.php
deleted file mode 100644
index 681c45c..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Type/TMessageType.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-namespace Thrift\Type;
-
-/**
- * Message types for RPC
- */
-class TMessageType {
-  const CALL  = 1;
-  const REPLY = 2;
-  const EXCEPTION = 3;
-  const ONEWAY = 4;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Type/TType.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Type/TType.php b/Airavata-PHP-Client-Samples/lib/Thrift/Type/TType.php
deleted file mode 100644
index c1cf228..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Type/TType.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-namespace Thrift\Type;
-
-/**
- * Data types that can be sent via Thrift
- */
-class TType {
-  const STOP   = 0;
-  const VOID   = 1;
-  const BOOL   = 2;
-  const BYTE   = 3;
-  const I08    = 3;
-  const DOUBLE = 4;
-  const I16    = 6;
-  const I32    = 8;
-  const I64    = 10;
-  const STRING = 11;
-  const UTF7   = 11;
-  const STRUCT = 12;
-  const MAP    = 13;
-  const SET    = 14;
-  const LST    = 15;    // N.B. cannot use LIST keyword in PHP!
-  const UTF8   = 16;
-  const UTF16  = 17;
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/autoload.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/autoload.php b/Airavata-PHP-Client-Samples/lib/Thrift/autoload.php
deleted file mode 100644
index 3a35545..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/autoload.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-
-/**
- * Include this file if you wish to use autoload with your PHP generated Thrift
- * code. The generated code will *not* include any defined Thrift classes by
- * default, except for the service interfaces. The generated code will populate
- * values into $GLOBALS['THRIFT_AUTOLOAD'] which can be used by the autoload
- * method below. If you have your own autoload system already in place, rename your
- * __autoload function to something else and then do:
- * $GLOBALS['AUTOLOAD_HOOKS'][] = 'my_autoload_func';
- *
- * Generate this code using the --gen php:autoload Thrift generator flag.
- */
-
-$GLOBALS['THRIFT_AUTOLOAD'] = array();
-$GLOBALS['AUTOLOAD_HOOKS'] = array();
-
-if (!function_exists('__autoload')) {
-  function __autoload($class) {
-    global $THRIFT_AUTOLOAD;
-    $classl = strtolower($class);
-    if (isset($THRIFT_AUTOLOAD[$classl])) {
-      include_once $GLOBALS['THRIFT_ROOT'].'/packages/'.$THRIFT_AUTOLOAD[$classl];
-    } else if (!empty($GLOBALS['AUTOLOAD_HOOKS'])) {
-      foreach ($GLOBALS['AUTOLOAD_HOOKS'] as $hook) {
-        $hook($class);
-      }
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
index 4969f15..599de49 100644
--- a/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
+++ b/airavata-api/airavata-api-server/src/main/java/org/apache/airavata/api/server/AiravataAPIServer.java
@@ -58,7 +58,7 @@ public class AiravataAPIServer implements IServer{
     public void StartAiravataServer(Airavata.Processor<Airavata.Iface> airavataAPIServer) throws AiravataSystemException {
         try {
             AiravataUtils.setExecutionAsServer();
-            RegistryInitUtil.initializeDB();
+            //RegistryInitUtil.initializeDB();
             final int serverPort = Integer.parseInt(ServerSettings.getSetting(Constants.API_SERVER_PORT,"8930"));
             final String serverHost = ServerSettings.getSetting(Constants.API_SERVER_HOST, null);
             


[03/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php
new file mode 100644
index 0000000..35e0f2c
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/ComputeHost/Types.php
@@ -0,0 +1,1262 @@
+<?php
+namespace Airavata\Model\ComputeHost;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class ResourceJobManager {
+  const FORK = 0;
+  const PBS = 1;
+  const UGE = 2;
+  const SLURM = 3;
+  static public $__names = array(
+    0 => 'FORK',
+    1 => 'PBS',
+    2 => 'UGE',
+    3 => 'SLURM',
+  );
+}
+
+final class JobSubmissionProtocol {
+  const SSH = 0;
+  const GSISSH = 1;
+  const GRAM = 2;
+  const UNICORE = 3;
+  static public $__names = array(
+    0 => 'SSH',
+    1 => 'GSISSH',
+    2 => 'GRAM',
+    3 => 'UNICORE',
+  );
+}
+
+final class DataMovementProtocol {
+  const SCP = 0;
+  const SFTP = 1;
+  const GridFTP = 2;
+  const UNICORE_STORAGE_SERVICE = 3;
+  static public $__names = array(
+    0 => 'SCP',
+    1 => 'SFTP',
+    2 => 'GridFTP',
+    3 => 'UNICORE_STORAGE_SERVICE',
+  );
+}
+
+final class SecurityProtocol {
+  const USERNAME_PASSWORD = 0;
+  const SSH_KEYS = 1;
+  const GSI = 2;
+  const KERBEROS = 3;
+  const OAUTH = 4;
+  static public $__names = array(
+    0 => 'USERNAME_PASSWORD',
+    1 => 'SSH_KEYS',
+    2 => 'GSI',
+    3 => 'KERBEROS',
+    4 => 'OAUTH',
+  );
+}
+
+class SCPDataMovement {
+  static $_TSPEC;
+
+  public $dataMovementDataID = "DO_NOT_SET_AT_CLIENTS";
+  public $securityProtocol = null;
+  public $sshPort = 22;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'dataMovementDataID',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'securityProtocol',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'sshPort',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['dataMovementDataID'])) {
+        $this->dataMovementDataID = $vals['dataMovementDataID'];
+      }
+      if (isset($vals['securityProtocol'])) {
+        $this->securityProtocol = $vals['securityProtocol'];
+      }
+      if (isset($vals['sshPort'])) {
+        $this->sshPort = $vals['sshPort'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SCPDataMovement';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->dataMovementDataID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->securityProtocol);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->sshPort);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SCPDataMovement');
+    if ($this->dataMovementDataID !== null) {
+      $xfer += $output->writeFieldBegin('dataMovementDataID', TType::STRING, 1);
+      $xfer += $output->writeString($this->dataMovementDataID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->securityProtocol !== null) {
+      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+      $xfer += $output->writeI32($this->securityProtocol);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->sshPort !== null) {
+      $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
+      $xfer += $output->writeI32($this->sshPort);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class GridFTPDataMovement {
+  static $_TSPEC;
+
+  public $dataMovementDataID = "DO_NOT_SET_AT_CLIENTS";
+  public $securityProtocol = null;
+  public $gridFTPEndPoint = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'dataMovementDataID',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'securityProtocol',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'gridFTPEndPoint',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['dataMovementDataID'])) {
+        $this->dataMovementDataID = $vals['dataMovementDataID'];
+      }
+      if (isset($vals['securityProtocol'])) {
+        $this->securityProtocol = $vals['securityProtocol'];
+      }
+      if (isset($vals['gridFTPEndPoint'])) {
+        $this->gridFTPEndPoint = $vals['gridFTPEndPoint'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'GridFTPDataMovement';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->dataMovementDataID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->securityProtocol);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::LST) {
+            $this->gridFTPEndPoint = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $xfer += $input->readString($elem5);
+              $this->gridFTPEndPoint []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('GridFTPDataMovement');
+    if ($this->dataMovementDataID !== null) {
+      $xfer += $output->writeFieldBegin('dataMovementDataID', TType::STRING, 1);
+      $xfer += $output->writeString($this->dataMovementDataID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->securityProtocol !== null) {
+      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+      $xfer += $output->writeI32($this->securityProtocol);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->gridFTPEndPoint !== null) {
+      if (!is_array($this->gridFTPEndPoint)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('gridFTPEndPoint', TType::LST, 3);
+      {
+        $output->writeListBegin(TType::STRING, count($this->gridFTPEndPoint));
+        {
+          foreach ($this->gridFTPEndPoint as $iter6)
+          {
+            $xfer += $output->writeString($iter6);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class SSHJobSubmission {
+  static $_TSPEC;
+
+  public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
+  public $resourceJobManager = null;
+  public $sshPort = 22;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'jobSubmissionDataID',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'resourceJobManager',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'sshPort',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['jobSubmissionDataID'])) {
+        $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
+      }
+      if (isset($vals['resourceJobManager'])) {
+        $this->resourceJobManager = $vals['resourceJobManager'];
+      }
+      if (isset($vals['sshPort'])) {
+        $this->sshPort = $vals['sshPort'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SSHJobSubmission';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->jobSubmissionDataID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->resourceJobManager);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->sshPort);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SSHJobSubmission');
+    if ($this->jobSubmissionDataID !== null) {
+      $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
+      $xfer += $output->writeString($this->jobSubmissionDataID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceJobManager !== null) {
+      $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
+      $xfer += $output->writeI32($this->resourceJobManager);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->sshPort !== null) {
+      $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
+      $xfer += $output->writeI32($this->sshPort);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class GlobusJobSubmission {
+  static $_TSPEC;
+
+  public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
+  public $securityProtocol = null;
+  public $resourceJobManager = null;
+  public $globusGateKeeperEndPoint = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'jobSubmissionDataID',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'securityProtocol',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'resourceJobManager',
+          'type' => TType::I32,
+          ),
+        4 => array(
+          'var' => 'globusGateKeeperEndPoint',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['jobSubmissionDataID'])) {
+        $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
+      }
+      if (isset($vals['securityProtocol'])) {
+        $this->securityProtocol = $vals['securityProtocol'];
+      }
+      if (isset($vals['resourceJobManager'])) {
+        $this->resourceJobManager = $vals['resourceJobManager'];
+      }
+      if (isset($vals['globusGateKeeperEndPoint'])) {
+        $this->globusGateKeeperEndPoint = $vals['globusGateKeeperEndPoint'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'GlobusJobSubmission';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->jobSubmissionDataID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->securityProtocol);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->resourceJobManager);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::LST) {
+            $this->globusGateKeeperEndPoint = array();
+            $_size7 = 0;
+            $_etype10 = 0;
+            $xfer += $input->readListBegin($_etype10, $_size7);
+            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
+            {
+              $elem12 = null;
+              $xfer += $input->readString($elem12);
+              $this->globusGateKeeperEndPoint []= $elem12;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('GlobusJobSubmission');
+    if ($this->jobSubmissionDataID !== null) {
+      $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
+      $xfer += $output->writeString($this->jobSubmissionDataID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->securityProtocol !== null) {
+      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
+      $xfer += $output->writeI32($this->securityProtocol);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceJobManager !== null) {
+      $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
+      $xfer += $output->writeI32($this->resourceJobManager);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->globusGateKeeperEndPoint !== null) {
+      if (!is_array($this->globusGateKeeperEndPoint)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('globusGateKeeperEndPoint', TType::LST, 4);
+      {
+        $output->writeListBegin(TType::STRING, count($this->globusGateKeeperEndPoint));
+        {
+          foreach ($this->globusGateKeeperEndPoint as $iter13)
+          {
+            $xfer += $output->writeString($iter13);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class GSISSHJobSubmission {
+  static $_TSPEC;
+
+  public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
+  public $resourceJobManager = null;
+  public $sshPort = 22;
+  public $exports = null;
+  public $preJobCommands = null;
+  public $postJobCommands = null;
+  public $installedPath = null;
+  public $monitorMode = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'jobSubmissionDataID',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'resourceJobManager',
+          'type' => TType::I32,
+          ),
+        3 => array(
+          'var' => 'sshPort',
+          'type' => TType::I32,
+          ),
+        4 => array(
+          'var' => 'exports',
+          'type' => TType::SET,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        5 => array(
+          'var' => 'preJobCommands',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        6 => array(
+          'var' => 'postJobCommands',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        7 => array(
+          'var' => 'installedPath',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'monitorMode',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['jobSubmissionDataID'])) {
+        $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
+      }
+      if (isset($vals['resourceJobManager'])) {
+        $this->resourceJobManager = $vals['resourceJobManager'];
+      }
+      if (isset($vals['sshPort'])) {
+        $this->sshPort = $vals['sshPort'];
+      }
+      if (isset($vals['exports'])) {
+        $this->exports = $vals['exports'];
+      }
+      if (isset($vals['preJobCommands'])) {
+        $this->preJobCommands = $vals['preJobCommands'];
+      }
+      if (isset($vals['postJobCommands'])) {
+        $this->postJobCommands = $vals['postJobCommands'];
+      }
+      if (isset($vals['installedPath'])) {
+        $this->installedPath = $vals['installedPath'];
+      }
+      if (isset($vals['monitorMode'])) {
+        $this->monitorMode = $vals['monitorMode'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'GSISSHJobSubmission';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->jobSubmissionDataID);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->resourceJobManager);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->sshPort);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::SET) {
+            $this->exports = array();
+            $_size14 = 0;
+            $_etype17 = 0;
+            $xfer += $input->readSetBegin($_etype17, $_size14);
+            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
+            {
+              $elem19 = null;
+              $xfer += $input->readString($elem19);
+              if (is_scalar($elem19)) {
+                $this->exports[$elem19] = true;
+              } else {
+                $this->exports []= $elem19;
+              }
+            }
+            $xfer += $input->readSetEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::LST) {
+            $this->preJobCommands = array();
+            $_size20 = 0;
+            $_etype23 = 0;
+            $xfer += $input->readListBegin($_etype23, $_size20);
+            for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
+            {
+              $elem25 = null;
+              $xfer += $input->readString($elem25);
+              $this->preJobCommands []= $elem25;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::LST) {
+            $this->postJobCommands = array();
+            $_size26 = 0;
+            $_etype29 = 0;
+            $xfer += $input->readListBegin($_etype29, $_size26);
+            for ($_i30 = 0; $_i30 < $_size26; ++$_i30)
+            {
+              $elem31 = null;
+              $xfer += $input->readString($elem31);
+              $this->postJobCommands []= $elem31;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->installedPath);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->monitorMode);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('GSISSHJobSubmission');
+    if ($this->jobSubmissionDataID !== null) {
+      $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
+      $xfer += $output->writeString($this->jobSubmissionDataID);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceJobManager !== null) {
+      $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
+      $xfer += $output->writeI32($this->resourceJobManager);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->sshPort !== null) {
+      $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
+      $xfer += $output->writeI32($this->sshPort);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->exports !== null) {
+      if (!is_array($this->exports)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('exports', TType::SET, 4);
+      {
+        $output->writeSetBegin(TType::STRING, count($this->exports));
+        {
+          foreach ($this->exports as $iter32 => $iter33)
+          {
+            if (is_scalar($iter33)) {
+            $xfer += $output->writeString($iter32);
+            } else {
+            $xfer += $output->writeString($iter33);
+            }
+          }
+        }
+        $output->writeSetEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->preJobCommands !== null) {
+      if (!is_array($this->preJobCommands)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('preJobCommands', TType::LST, 5);
+      {
+        $output->writeListBegin(TType::STRING, count($this->preJobCommands));
+        {
+          foreach ($this->preJobCommands as $iter34)
+          {
+            $xfer += $output->writeString($iter34);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->postJobCommands !== null) {
+      if (!is_array($this->postJobCommands)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('postJobCommands', TType::LST, 6);
+      {
+        $output->writeListBegin(TType::STRING, count($this->postJobCommands));
+        {
+          foreach ($this->postJobCommands as $iter35)
+          {
+            $xfer += $output->writeString($iter35);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->installedPath !== null) {
+      $xfer += $output->writeFieldBegin('installedPath', TType::STRING, 7);
+      $xfer += $output->writeString($this->installedPath);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->monitorMode !== null) {
+      $xfer += $output->writeFieldBegin('monitorMode', TType::STRING, 8);
+      $xfer += $output->writeString($this->monitorMode);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ComputeResourceDescription {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $resourceId = "DO_NOT_SET_AT_CLIENTS";
+  public $hostName = null;
+  public $hostAliases = null;
+  public $ipAddresses = null;
+  public $resourceDescription = null;
+  public $preferredJobSubmissionProtocol = null;
+  public $jobSubmissionProtocols = null;
+  public $dataMovementProtocols = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'resourceId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'hostName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'hostAliases',
+          'type' => TType::SET,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        5 => array(
+          'var' => 'ipAddresses',
+          'type' => TType::SET,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        6 => array(
+          'var' => 'resourceDescription',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'preferredJobSubmissionProtocol',
+          'type' => TType::STRING,
+          ),
+        9 => array(
+          'var' => 'jobSubmissionProtocols',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::I32,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::I32,
+            ),
+          ),
+        10 => array(
+          'var' => 'dataMovementProtocols',
+          'type' => TType::MAP,
+          'ktype' => TType::STRING,
+          'vtype' => TType::I32,
+          'key' => array(
+            'type' => TType::STRING,
+          ),
+          'val' => array(
+            'type' => TType::I32,
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['resourceId'])) {
+        $this->resourceId = $vals['resourceId'];
+      }
+      if (isset($vals['hostName'])) {
+        $this->hostName = $vals['hostName'];
+      }
+      if (isset($vals['hostAliases'])) {
+        $this->hostAliases = $vals['hostAliases'];
+      }
+      if (isset($vals['ipAddresses'])) {
+        $this->ipAddresses = $vals['ipAddresses'];
+      }
+      if (isset($vals['resourceDescription'])) {
+        $this->resourceDescription = $vals['resourceDescription'];
+      }
+      if (isset($vals['preferredJobSubmissionProtocol'])) {
+        $this->preferredJobSubmissionProtocol = $vals['preferredJobSubmissionProtocol'];
+      }
+      if (isset($vals['jobSubmissionProtocols'])) {
+        $this->jobSubmissionProtocols = $vals['jobSubmissionProtocols'];
+      }
+      if (isset($vals['dataMovementProtocols'])) {
+        $this->dataMovementProtocols = $vals['dataMovementProtocols'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ComputeResourceDescription';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->hostName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::SET) {
+            $this->hostAliases = array();
+            $_size36 = 0;
+            $_etype39 = 0;
+            $xfer += $input->readSetBegin($_etype39, $_size36);
+            for ($_i40 = 0; $_i40 < $_size36; ++$_i40)
+            {
+              $elem41 = null;
+              $xfer += $input->readString($elem41);
+              if (is_scalar($elem41)) {
+                $this->hostAliases[$elem41] = true;
+              } else {
+                $this->hostAliases []= $elem41;
+              }
+            }
+            $xfer += $input->readSetEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::SET) {
+            $this->ipAddresses = array();
+            $_size42 = 0;
+            $_etype45 = 0;
+            $xfer += $input->readSetBegin($_etype45, $_size42);
+            for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
+            {
+              $elem47 = null;
+              $xfer += $input->readString($elem47);
+              if (is_scalar($elem47)) {
+                $this->ipAddresses[$elem47] = true;
+              } else {
+                $this->ipAddresses []= $elem47;
+              }
+            }
+            $xfer += $input->readSetEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->resourceDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->preferredJobSubmissionProtocol);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::MAP) {
+            $this->jobSubmissionProtocols = array();
+            $_size48 = 0;
+            $_ktype49 = 0;
+            $_vtype50 = 0;
+            $xfer += $input->readMapBegin($_ktype49, $_vtype50, $_size48);
+            for ($_i52 = 0; $_i52 < $_size48; ++$_i52)
+            {
+              $key53 = '';
+              $val54 = 0;
+              $xfer += $input->readString($key53);
+              $xfer += $input->readI32($val54);
+              $this->jobSubmissionProtocols[$key53] = $val54;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::MAP) {
+            $this->dataMovementProtocols = array();
+            $_size55 = 0;
+            $_ktype56 = 0;
+            $_vtype57 = 0;
+            $xfer += $input->readMapBegin($_ktype56, $_vtype57, $_size55);
+            for ($_i59 = 0; $_i59 < $_size55; ++$_i59)
+            {
+              $key60 = '';
+              $val61 = 0;
+              $xfer += $input->readString($key60);
+              $xfer += $input->readI32($val61);
+              $this->dataMovementProtocols[$key60] = $val61;
+            }
+            $xfer += $input->readMapEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ComputeResourceDescription');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceId !== null) {
+      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
+      $xfer += $output->writeString($this->resourceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->hostName !== null) {
+      $xfer += $output->writeFieldBegin('hostName', TType::STRING, 3);
+      $xfer += $output->writeString($this->hostName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->hostAliases !== null) {
+      if (!is_array($this->hostAliases)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('hostAliases', TType::SET, 4);
+      {
+        $output->writeSetBegin(TType::STRING, count($this->hostAliases));
+        {
+          foreach ($this->hostAliases as $iter62 => $iter63)
+          {
+            if (is_scalar($iter63)) {
+            $xfer += $output->writeString($iter62);
+            } else {
+            $xfer += $output->writeString($iter63);
+            }
+          }
+        }
+        $output->writeSetEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->ipAddresses !== null) {
+      if (!is_array($this->ipAddresses)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('ipAddresses', TType::SET, 5);
+      {
+        $output->writeSetBegin(TType::STRING, count($this->ipAddresses));
+        {
+          foreach ($this->ipAddresses as $iter64 => $iter65)
+          {
+            if (is_scalar($iter65)) {
+            $xfer += $output->writeString($iter64);
+            } else {
+            $xfer += $output->writeString($iter65);
+            }
+          }
+        }
+        $output->writeSetEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->resourceDescription !== null) {
+      $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 6);
+      $xfer += $output->writeString($this->resourceDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->preferredJobSubmissionProtocol !== null) {
+      $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::STRING, 8);
+      $xfer += $output->writeString($this->preferredJobSubmissionProtocol);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->jobSubmissionProtocols !== null) {
+      if (!is_array($this->jobSubmissionProtocols)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('jobSubmissionProtocols', TType::MAP, 9);
+      {
+        $output->writeMapBegin(TType::STRING, TType::I32, count($this->jobSubmissionProtocols));
+        {
+          foreach ($this->jobSubmissionProtocols as $kiter66 => $viter67)
+          {
+            $xfer += $output->writeString($kiter66);
+            $xfer += $output->writeI32($viter67);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->dataMovementProtocols !== null) {
+      if (!is_array($this->dataMovementProtocols)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('dataMovementProtocols', TType::MAP, 10);
+      {
+        $output->writeMapBegin(TType::STRING, TType::I32, count($this->dataMovementProtocols));
+        {
+          foreach ($this->dataMovementProtocols as $kiter68 => $viter69)
+          {
+            $xfer += $output->writeString($kiter68);
+            $xfer += $output->writeI32($viter69);
+          }
+        }
+        $output->writeMapEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+$GLOBALS['computeHostModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java
new file mode 100644
index 0000000..b5e96b6
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidationResults.java
@@ -0,0 +1,543 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.workspace.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ValidationResults implements org.apache.thrift.TBase<ValidationResults, ValidationResults._Fields>, java.io.Serializable, Cloneable, Comparable<ValidationResults> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidationResults");
+
+  private static final org.apache.thrift.protocol.TField VALIDATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("validationState", org.apache.thrift.protocol.TType.BOOL, (short)1);
+  private static final org.apache.thrift.protocol.TField VALIDATION_RESULT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("validationResultList", org.apache.thrift.protocol.TType.LIST, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ValidationResultsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ValidationResultsTupleSchemeFactory());
+  }
+
+  private boolean validationState; // required
+  private List<ValidatorResult> validationResultList; // required
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    VALIDATION_STATE((short)1, "validationState"),
+    VALIDATION_RESULT_LIST((short)2, "validationResultList");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // VALIDATION_STATE
+          return VALIDATION_STATE;
+        case 2: // VALIDATION_RESULT_LIST
+          return VALIDATION_RESULT_LIST;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __VALIDATIONSTATE_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.VALIDATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("validationState", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.VALIDATION_RESULT_LIST, new org.apache.thrift.meta_data.FieldMetaData("validationResultList", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ValidatorResult.class))));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidationResults.class, metaDataMap);
+  }
+
+  public ValidationResults() {
+  }
+
+  public ValidationResults(
+    boolean validationState,
+    List<ValidatorResult> validationResultList)
+  {
+    this();
+    this.validationState = validationState;
+    setValidationStateIsSet(true);
+    this.validationResultList = validationResultList;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ValidationResults(ValidationResults other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.validationState = other.validationState;
+    if (other.isSetValidationResultList()) {
+      List<ValidatorResult> __this__validationResultList = new ArrayList<ValidatorResult>(other.validationResultList.size());
+      for (ValidatorResult other_element : other.validationResultList) {
+        __this__validationResultList.add(new ValidatorResult(other_element));
+      }
+      this.validationResultList = __this__validationResultList;
+    }
+  }
+
+  public ValidationResults deepCopy() {
+    return new ValidationResults(this);
+  }
+
+  @Override
+  public void clear() {
+    setValidationStateIsSet(false);
+    this.validationState = false;
+    this.validationResultList = null;
+  }
+
+  public boolean isValidationState() {
+    return this.validationState;
+  }
+
+  public void setValidationState(boolean validationState) {
+    this.validationState = validationState;
+    setValidationStateIsSet(true);
+  }
+
+  public void unsetValidationState() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
+  }
+
+  /** Returns true if field validationState is set (has been assigned a value) and false otherwise */
+  public boolean isSetValidationState() {
+    return EncodingUtils.testBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID);
+  }
+
+  public void setValidationStateIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALIDATIONSTATE_ISSET_ID, value);
+  }
+
+  public int getValidationResultListSize() {
+    return (this.validationResultList == null) ? 0 : this.validationResultList.size();
+  }
+
+  public java.util.Iterator<ValidatorResult> getValidationResultListIterator() {
+    return (this.validationResultList == null) ? null : this.validationResultList.iterator();
+  }
+
+  public void addToValidationResultList(ValidatorResult elem) {
+    if (this.validationResultList == null) {
+      this.validationResultList = new ArrayList<ValidatorResult>();
+    }
+    this.validationResultList.add(elem);
+  }
+
+  public List<ValidatorResult> getValidationResultList() {
+    return this.validationResultList;
+  }
+
+  public void setValidationResultList(List<ValidatorResult> validationResultList) {
+    this.validationResultList = validationResultList;
+  }
+
+  public void unsetValidationResultList() {
+    this.validationResultList = null;
+  }
+
+  /** Returns true if field validationResultList is set (has been assigned a value) and false otherwise */
+  public boolean isSetValidationResultList() {
+    return this.validationResultList != null;
+  }
+
+  public void setValidationResultListIsSet(boolean value) {
+    if (!value) {
+      this.validationResultList = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case VALIDATION_STATE:
+      if (value == null) {
+        unsetValidationState();
+      } else {
+        setValidationState((Boolean)value);
+      }
+      break;
+
+    case VALIDATION_RESULT_LIST:
+      if (value == null) {
+        unsetValidationResultList();
+      } else {
+        setValidationResultList((List<ValidatorResult>)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case VALIDATION_STATE:
+      return Boolean.valueOf(isValidationState());
+
+    case VALIDATION_RESULT_LIST:
+      return getValidationResultList();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case VALIDATION_STATE:
+      return isSetValidationState();
+    case VALIDATION_RESULT_LIST:
+      return isSetValidationResultList();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ValidationResults)
+      return this.equals((ValidationResults)that);
+    return false;
+  }
+
+  public boolean equals(ValidationResults that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_validationState = true;
+    boolean that_present_validationState = true;
+    if (this_present_validationState || that_present_validationState) {
+      if (!(this_present_validationState && that_present_validationState))
+        return false;
+      if (this.validationState != that.validationState)
+        return false;
+    }
+
+    boolean this_present_validationResultList = true && this.isSetValidationResultList();
+    boolean that_present_validationResultList = true && that.isSetValidationResultList();
+    if (this_present_validationResultList || that_present_validationResultList) {
+      if (!(this_present_validationResultList && that_present_validationResultList))
+        return false;
+      if (!this.validationResultList.equals(that.validationResultList))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(ValidationResults other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetValidationState()).compareTo(other.isSetValidationState());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValidationState()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationState, other.validationState);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetValidationResultList()).compareTo(other.isSetValidationResultList());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetValidationResultList()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.validationResultList, other.validationResultList);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ValidationResults(");
+    boolean first = true;
+
+    sb.append("validationState:");
+    sb.append(this.validationState);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("validationResultList:");
+    if (this.validationResultList == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.validationResultList);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetValidationState()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationState' is unset! Struct:" + toString());
+    }
+
+    if (!isSetValidationResultList()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'validationResultList' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class ValidationResultsStandardSchemeFactory implements SchemeFactory {
+    public ValidationResultsStandardScheme getScheme() {
+      return new ValidationResultsStandardScheme();
+    }
+  }
+
+  private static class ValidationResultsStandardScheme extends StandardScheme<ValidationResults> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ValidationResults struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // VALIDATION_STATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.validationState = iprot.readBool();
+              struct.setValidationStateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // VALIDATION_RESULT_LIST
+            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+              {
+                org.apache.thrift.protocol.TList _list88 = iprot.readListBegin();
+                struct.validationResultList = new ArrayList<ValidatorResult>(_list88.size);
+                for (int _i89 = 0; _i89 < _list88.size; ++_i89)
+                {
+                  ValidatorResult _elem90;
+                  _elem90 = new ValidatorResult();
+                  _elem90.read(iprot);
+                  struct.validationResultList.add(_elem90);
+                }
+                iprot.readListEnd();
+              }
+              struct.setValidationResultListIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, ValidationResults struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(VALIDATION_STATE_FIELD_DESC);
+      oprot.writeBool(struct.validationState);
+      oprot.writeFieldEnd();
+      if (struct.validationResultList != null) {
+        oprot.writeFieldBegin(VALIDATION_RESULT_LIST_FIELD_DESC);
+        {
+          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.validationResultList.size()));
+          for (ValidatorResult _iter91 : struct.validationResultList)
+          {
+            _iter91.write(oprot);
+          }
+          oprot.writeListEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ValidationResultsTupleSchemeFactory implements SchemeFactory {
+    public ValidationResultsTupleScheme getScheme() {
+      return new ValidationResultsTupleScheme();
+    }
+  }
+
+  private static class ValidationResultsTupleScheme extends TupleScheme<ValidationResults> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBool(struct.validationState);
+      {
+        oprot.writeI32(struct.validationResultList.size());
+        for (ValidatorResult _iter92 : struct.validationResultList)
+        {
+          _iter92.write(oprot);
+        }
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ValidationResults struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.validationState = iprot.readBool();
+      struct.setValidationStateIsSet(true);
+      {
+        org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+        struct.validationResultList = new ArrayList<ValidatorResult>(_list93.size);
+        for (int _i94 = 0; _i94 < _list93.size; ++_i94)
+        {
+          ValidatorResult _elem95;
+          _elem95 = new ValidatorResult();
+          _elem95.read(iprot);
+          struct.validationResultList.add(_elem95);
+        }
+      }
+      struct.setValidationResultListIsSet(true);
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java
new file mode 100644
index 0000000..8736761
--- /dev/null
+++ b/airavata-api/airavata-data-models/src/main/java/org/apache/airavata/model/workspace/experiment/ValidatorResult.java
@@ -0,0 +1,505 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.model.workspace.experiment;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * This data structure can be used to store the validation results
+ * captured during validation step and during the launchExperiment
+ * operation it can be easilly checked to see the errors occured
+ * during the experiment launch operation
+ * 
+ */
+@SuppressWarnings("all") public class ValidatorResult implements org.apache.thrift.TBase<ValidatorResult, ValidatorResult._Fields>, java.io.Serializable, Cloneable, Comparable<ValidatorResult> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ValidatorResult");
+
+  private static final org.apache.thrift.protocol.TField RESULT_FIELD_DESC = new org.apache.thrift.protocol.TField("result", org.apache.thrift.protocol.TType.BOOL, (short)1);
+  private static final org.apache.thrift.protocol.TField ERROR_DETAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("errorDetails", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new ValidatorResultStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new ValidatorResultTupleSchemeFactory());
+  }
+
+  private boolean result; // required
+  private String errorDetails; // optional
+
+  /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+  @SuppressWarnings("all") public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+    RESULT((short)1, "result"),
+    ERROR_DETAILS((short)2, "errorDetails");
+
+    private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+    static {
+      for (_Fields field : EnumSet.allOf(_Fields.class)) {
+        byName.put(field.getFieldName(), field);
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, or null if its not found.
+     */
+    public static _Fields findByThriftId(int fieldId) {
+      switch(fieldId) {
+        case 1: // RESULT
+          return RESULT;
+        case 2: // ERROR_DETAILS
+          return ERROR_DETAILS;
+        default:
+          return null;
+      }
+    }
+
+    /**
+     * Find the _Fields constant that matches fieldId, throwing an exception
+     * if it is not found.
+     */
+    public static _Fields findByThriftIdOrThrow(int fieldId) {
+      _Fields fields = findByThriftId(fieldId);
+      if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+      return fields;
+    }
+
+    /**
+     * Find the _Fields constant that matches name, or null if its not found.
+     */
+    public static _Fields findByName(String name) {
+      return byName.get(name);
+    }
+
+    private final short _thriftId;
+    private final String _fieldName;
+
+    _Fields(short thriftId, String fieldName) {
+      _thriftId = thriftId;
+      _fieldName = fieldName;
+    }
+
+    public short getThriftFieldId() {
+      return _thriftId;
+    }
+
+    public String getFieldName() {
+      return _fieldName;
+    }
+  }
+
+  // isset id assignments
+  private static final int __RESULT_ISSET_ID = 0;
+  private byte __isset_bitfield = 0;
+  private _Fields optionals[] = {_Fields.ERROR_DETAILS};
+  public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+  static {
+    Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+    tmpMap.put(_Fields.RESULT, new org.apache.thrift.meta_data.FieldMetaData("result", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+    tmpMap.put(_Fields.ERROR_DETAILS, new org.apache.thrift.meta_data.FieldMetaData("errorDetails", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ValidatorResult.class, metaDataMap);
+  }
+
+  public ValidatorResult() {
+  }
+
+  public ValidatorResult(
+    boolean result)
+  {
+    this();
+    this.result = result;
+    setResultIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public ValidatorResult(ValidatorResult other) {
+    __isset_bitfield = other.__isset_bitfield;
+    this.result = other.result;
+    if (other.isSetErrorDetails()) {
+      this.errorDetails = other.errorDetails;
+    }
+  }
+
+  public ValidatorResult deepCopy() {
+    return new ValidatorResult(this);
+  }
+
+  @Override
+  public void clear() {
+    setResultIsSet(false);
+    this.result = false;
+    this.errorDetails = null;
+  }
+
+  public boolean isResult() {
+    return this.result;
+  }
+
+  public void setResult(boolean result) {
+    this.result = result;
+    setResultIsSet(true);
+  }
+
+  public void unsetResult() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RESULT_ISSET_ID);
+  }
+
+  /** Returns true if field result is set (has been assigned a value) and false otherwise */
+  public boolean isSetResult() {
+    return EncodingUtils.testBit(__isset_bitfield, __RESULT_ISSET_ID);
+  }
+
+  public void setResultIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RESULT_ISSET_ID, value);
+  }
+
+  public String getErrorDetails() {
+    return this.errorDetails;
+  }
+
+  public void setErrorDetails(String errorDetails) {
+    this.errorDetails = errorDetails;
+  }
+
+  public void unsetErrorDetails() {
+    this.errorDetails = null;
+  }
+
+  /** Returns true if field errorDetails is set (has been assigned a value) and false otherwise */
+  public boolean isSetErrorDetails() {
+    return this.errorDetails != null;
+  }
+
+  public void setErrorDetailsIsSet(boolean value) {
+    if (!value) {
+      this.errorDetails = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case RESULT:
+      if (value == null) {
+        unsetResult();
+      } else {
+        setResult((Boolean)value);
+      }
+      break;
+
+    case ERROR_DETAILS:
+      if (value == null) {
+        unsetErrorDetails();
+      } else {
+        setErrorDetails((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case RESULT:
+      return Boolean.valueOf(isResult());
+
+    case ERROR_DETAILS:
+      return getErrorDetails();
+
+    }
+    throw new IllegalStateException();
+  }
+
+  /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+  public boolean isSet(_Fields field) {
+    if (field == null) {
+      throw new IllegalArgumentException();
+    }
+
+    switch (field) {
+    case RESULT:
+      return isSetResult();
+    case ERROR_DETAILS:
+      return isSetErrorDetails();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof ValidatorResult)
+      return this.equals((ValidatorResult)that);
+    return false;
+  }
+
+  public boolean equals(ValidatorResult that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_result = true;
+    boolean that_present_result = true;
+    if (this_present_result || that_present_result) {
+      if (!(this_present_result && that_present_result))
+        return false;
+      if (this.result != that.result)
+        return false;
+    }
+
+    boolean this_present_errorDetails = true && this.isSetErrorDetails();
+    boolean that_present_errorDetails = true && that.isSetErrorDetails();
+    if (this_present_errorDetails || that_present_errorDetails) {
+      if (!(this_present_errorDetails && that_present_errorDetails))
+        return false;
+      if (!this.errorDetails.equals(that.errorDetails))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    return 0;
+  }
+
+  @Override
+  public int compareTo(ValidatorResult other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetResult()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetErrorDetails()).compareTo(other.isSetErrorDetails());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetErrorDetails()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorDetails, other.errorDetails);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    return 0;
+  }
+
+  public _Fields fieldForId(int fieldId) {
+    return _Fields.findByThriftId(fieldId);
+  }
+
+  public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+    schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+  }
+
+  public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+    schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder sb = new StringBuilder("ValidatorResult(");
+    boolean first = true;
+
+    sb.append("result:");
+    sb.append(this.result);
+    first = false;
+    if (isSetErrorDetails()) {
+      if (!first) sb.append(", ");
+      sb.append("errorDetails:");
+      if (this.errorDetails == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.errorDetails);
+      }
+      first = false;
+    }
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    if (!isSetResult()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'result' is unset! Struct:" + toString());
+    }
+
+    // check for sub-struct validity
+  }
+
+  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+    try {
+      write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+    try {
+      // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+      __isset_bitfield = 0;
+      read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+    } catch (org.apache.thrift.TException te) {
+      throw new java.io.IOException(te);
+    }
+  }
+
+  private static class ValidatorResultStandardSchemeFactory implements SchemeFactory {
+    public ValidatorResultStandardScheme getScheme() {
+      return new ValidatorResultStandardScheme();
+    }
+  }
+
+  private static class ValidatorResultStandardScheme extends StandardScheme<ValidatorResult> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, ValidatorResult struct) throws org.apache.thrift.TException {
+      org.apache.thrift.protocol.TField schemeField;
+      iprot.readStructBegin();
+      while (true)
+      {
+        schemeField = iprot.readFieldBegin();
+        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
+          break;
+        }
+        switch (schemeField.id) {
+          case 1: // RESULT
+            if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+              struct.result = iprot.readBool();
+              struct.setResultIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // ERROR_DETAILS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.errorDetails = iprot.readString();
+              struct.setErrorDetailsIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          default:
+            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+        }
+        iprot.readFieldEnd();
+      }
+      iprot.readStructEnd();
+      struct.validate();
+    }
+
+    public void write(org.apache.thrift.protocol.TProtocol oprot, ValidatorResult struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      oprot.writeFieldBegin(RESULT_FIELD_DESC);
+      oprot.writeBool(struct.result);
+      oprot.writeFieldEnd();
+      if (struct.errorDetails != null) {
+        if (struct.isSetErrorDetails()) {
+          oprot.writeFieldBegin(ERROR_DETAILS_FIELD_DESC);
+          oprot.writeString(struct.errorDetails);
+          oprot.writeFieldEnd();
+        }
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class ValidatorResultTupleSchemeFactory implements SchemeFactory {
+    public ValidatorResultTupleScheme getScheme() {
+      return new ValidatorResultTupleScheme();
+    }
+  }
+
+  private static class ValidatorResultTupleScheme extends TupleScheme<ValidatorResult> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      oprot.writeBool(struct.result);
+      BitSet optionals = new BitSet();
+      if (struct.isSetErrorDetails()) {
+        optionals.set(0);
+      }
+      oprot.writeBitSet(optionals, 1);
+      if (struct.isSetErrorDetails()) {
+        oprot.writeString(struct.errorDetails);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, ValidatorResult struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      struct.result = iprot.readBool();
+      struct.setResultIsSet(true);
+      BitSet incoming = iprot.readBitSet(1);
+      if (incoming.get(0)) {
+        struct.errorDetails = iprot.readString();
+        struct.setErrorDetailsIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/generate-thrift-files.sh
----------------------------------------------------------------------
diff --git a/airavata-api/generate-thrift-files.sh b/airavata-api/generate-thrift-files.sh
index ed989c4..c8c1f74 100755
--- a/airavata-api/generate-thrift-files.sh
+++ b/airavata-api/generate-thrift-files.sh
@@ -146,8 +146,6 @@ rm -rf ${JAVA_GEN_DIR}
 #   The airavataAPI.thrift includes rest of data models.
 thrift ${THRIFT_ARGS} --gen java ${THRIFT_IDL_DIR}/airavataAPI.thrift || fail unable to generate java thrift classes on AiravataAPI
 
-thrift ${THRIFT_ARGS} --gen java ${THRIFT_IDL_DIR}/applicationCatalogAPI.thrift || fail unable to generate java thrift classes on App Catalog API
-
 # For the generated java classes add the ASF V2 License header
 add_license_header $JAVA_GEN_DIR
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
index 7b2ec60..1bc8c99 100644
--- a/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
+++ b/airavata-api/thrift-interface-descriptions/airavataAPI.thrift
@@ -28,7 +28,10 @@ include "airavataErrors.thrift"
 include "airavataDataModel.thrift"
 include "experimentModel.thrift"
 include "workspaceModel.thrift"
-include "applicationCatalogAPI.thrift"
+include "computeHostModel.thrift"
+include "applicationDeploymentModel.thrift"
+include "applicationInterfaceModel.thrift"
+include "gatewayProfileModel.thrift"
 
 namespace java org.apache.airavata.api
 namespace php Airavata.API
@@ -513,4 +516,87 @@ service Airavata {
             2: airavataErrors.ExperimentNotFoundException enf,
             3: airavataErrors.AiravataClientException ace,
             4: airavataErrors.AiravataSystemException ase)
-}
+
+/*
+ * API definitions for App Catalog related operations
+ *
+*/
+
+/*
+ * Application Module is a specific computational application. Many applications, particularly scientific applications
+ *  are really a suite of applications or encompass an ecosystem. For instance, Amber is referred to dozens of binaries.
+ *  WRF is referred for an ecosystem of applications. In this context, we refer to module as a single binary.
+ *
+ * Note: A module has to be defined before a deployment can be registered. .
+ *
+*/
+
+  /**
+   * Register a Application Module.
+   *
+   * @param applicationModule
+   *    Application Module Object created from the datamodel.
+   *
+   * @return appModuleId
+   *   Returns a server-side generated airavata appModule globally unique identifier.
+   *
+   *
+  */
+  string registerAppicationModule(1: required applicationDeploymentModel.ApplicationModule applicationModule)
+    	throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.AiravataClientException ace,
+              3: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Fetch a Application Module.
+   *
+   * @param appModuleId
+   *   The identifier for the requested application module
+   *
+   * @return applicationModule
+   *   Returns a application Module Object.
+   *
+   *
+  */
+  applicationDeploymentModel.ApplicationModule getAppicationModule(1: required string appModuleId)
+      	throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Update a Application Module.
+   *
+   * @param appModuleId
+   *   The identifier for the requested application module to be updated.
+   *
+   * @param applicationModule
+   *    Application Module Object created from the datamodel.
+   *
+   * @return status
+   *   Returns a success/failure of the update.
+   *
+   *
+  */
+  bool updateAppicationModule(1: required string appModuleId,
+            2: required applicationDeploymentModel.ApplicationModule applicationModule)
+      	throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Delete a Application Module.
+   *
+   * @param appModuleId
+   *   The identifier for the requested application module to be deleted.
+   *
+   * @return status
+   *   Returns a success/failure of the deletion.
+   *
+   *
+  */
+  bool deleteAppicationModule(1: required string appModuleId)
+         	throws (1: airavataErrors.InvalidRequestException ire,
+                   2: airavataErrors.AiravataClientException ace,
+                   3: airavataErrors.AiravataSystemException ase)
+
+}
\ No newline at end of file


[05/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/ApplicationCatalogAPI.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/ApplicationCatalogAPI.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/ApplicationCatalogAPI.java
new file mode 100644
index 0000000..6f4f060
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/ApplicationCatalogAPI.java
@@ -0,0 +1,31134 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.api.appcatalog;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class ApplicationCatalogAPI {
+
+  public interface Iface {
+
+    /**
+     * Query Airavata to fetch the API version
+     */
+    public String GetAPIVersion() throws org.apache.thrift.TException;
+
+    /**
+     * Manage Computer Resources
+     * 
+     * @param computeResourceDescription
+     */
+    public String addComputeResourceDescription(org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String addSSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String addGSISSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String addGlobusJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String addSCPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.SCPDataMovement dataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public String addGridFTPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public List<String> listComputeResourceDescriptions() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.ComputeResourceDescription getComputeResourceDescription(String computeResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.SSHJobSubmission getSSHJobSubmissionProtocol(String sshJobSubmissionProtocolResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.GSISSHJobSubmission getGSISSHJobSubmissionProtocol(String gsisshJobSubmissionProtocolResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.GlobusJobSubmission getGlobusJobSubmissionProtocol(String globusJobSubmissionProtocolResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.SCPDataMovement getSCPDataMovementProtocol(String scpDataMovementResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.GridFTPDataMovement getGridFTPDataMovementProtocol(String gridFTPDataMovementResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean isComputeResourceDescriptionRegistered(String hostName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.computehost.ComputeResourceDescription getComputeResourceDescriptionFromHostName(String hostName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    /**
+     * Manage Application Interfaces
+     * 
+     * @param applicationInterface
+     */
+    public String addApplicationInterface(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public List<String> listApplicationInterfaceIds() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription getApplicationInterface(String applicationInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    /**
+     * Manage application modules
+     * 
+     * @param applicationModule
+     * @param publish
+     */
+    public String registerAppicationModule(org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, boolean publish) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule getAppicationModule(String appModuleId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean updateAppicationModule(String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public boolean deleteAppicationModule(String appModuleId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    /**
+     * Manage application modules
+     * 
+     * @param applicationInterfaceId
+     * @param applicationDeployment
+     */
+    public String addApplicationDeployment(String applicationInterfaceId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public List<String> listApplicationDeploymentIds(String applicationInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+    public org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription getApplicationDeployment(String applicationInterfaceId, String applicationDeploymentId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException;
+
+  }
+
+  public interface AsyncIface {
+
+    public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addComputeResourceDescription(org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addSSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addGSISSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addGlobusJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addSCPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.SCPDataMovement dataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addGridFTPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void listComputeResourceDescriptions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getComputeResourceDescription(String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getSSHJobSubmissionProtocol(String sshJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getGSISSHJobSubmissionProtocol(String gsisshJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getGlobusJobSubmissionProtocol(String globusJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getSCPDataMovementProtocol(String scpDataMovementResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getGridFTPDataMovementProtocol(String gridFTPDataMovementResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void isComputeResourceDescriptionRegistered(String hostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getComputeResourceDescriptionFromHostName(String hostName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addApplicationInterface(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void listApplicationInterfaceIds(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getApplicationInterface(String applicationInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void registerAppicationModule(org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, boolean publish, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getAppicationModule(String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void updateAppicationModule(String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void deleteAppicationModule(String appModuleId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void addApplicationDeployment(String applicationInterfaceId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void listApplicationDeploymentIds(String applicationInterfaceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+    public void getApplicationDeployment(String applicationInterfaceId, String applicationDeploymentId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+
+  }
+
+  public static class Client extends org.apache.thrift.TServiceClient implements Iface {
+    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
+      public Factory() {}
+      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
+        return new Client(prot);
+      }
+      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+        return new Client(iprot, oprot);
+      }
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol prot)
+    {
+      super(prot, prot);
+    }
+
+    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
+      super(iprot, oprot);
+    }
+
+    public String GetAPIVersion() throws org.apache.thrift.TException
+    {
+      send_GetAPIVersion();
+      return recv_GetAPIVersion();
+    }
+
+    public void send_GetAPIVersion() throws org.apache.thrift.TException
+    {
+      GetAPIVersion_args args = new GetAPIVersion_args();
+      sendBase("GetAPIVersion", args);
+    }
+
+    public String recv_GetAPIVersion() throws org.apache.thrift.TException
+    {
+      GetAPIVersion_result result = new GetAPIVersion_result();
+      receiveBase(result, "GetAPIVersion");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "GetAPIVersion failed: unknown result");
+    }
+
+    public String addComputeResourceDescription(org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addComputeResourceDescription(computeResourceDescription);
+      return recv_addComputeResourceDescription();
+    }
+
+    public void send_addComputeResourceDescription(org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription) throws org.apache.thrift.TException
+    {
+      addComputeResourceDescription_args args = new addComputeResourceDescription_args();
+      args.setComputeResourceDescription(computeResourceDescription);
+      sendBase("addComputeResourceDescription", args);
+    }
+
+    public String recv_addComputeResourceDescription() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addComputeResourceDescription_result result = new addComputeResourceDescription_result();
+      receiveBase(result, "addComputeResourceDescription");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addComputeResourceDescription failed: unknown result");
+    }
+
+    public String addSSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addSSHJobSubmissionProtocol(computeResourceId, jobSubmission);
+      return recv_addSSHJobSubmissionProtocol();
+    }
+
+    public void send_addSSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission) throws org.apache.thrift.TException
+    {
+      addSSHJobSubmissionProtocol_args args = new addSSHJobSubmissionProtocol_args();
+      args.setComputeResourceId(computeResourceId);
+      args.setJobSubmission(jobSubmission);
+      sendBase("addSSHJobSubmissionProtocol", args);
+    }
+
+    public String recv_addSSHJobSubmissionProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addSSHJobSubmissionProtocol_result result = new addSSHJobSubmissionProtocol_result();
+      receiveBase(result, "addSSHJobSubmissionProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSSHJobSubmissionProtocol failed: unknown result");
+    }
+
+    public String addGSISSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addGSISSHJobSubmissionProtocol(computeResourceId, jobSubmission);
+      return recv_addGSISSHJobSubmissionProtocol();
+    }
+
+    public void send_addGSISSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission) throws org.apache.thrift.TException
+    {
+      addGSISSHJobSubmissionProtocol_args args = new addGSISSHJobSubmissionProtocol_args();
+      args.setComputeResourceId(computeResourceId);
+      args.setJobSubmission(jobSubmission);
+      sendBase("addGSISSHJobSubmissionProtocol", args);
+    }
+
+    public String recv_addGSISSHJobSubmissionProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addGSISSHJobSubmissionProtocol_result result = new addGSISSHJobSubmissionProtocol_result();
+      receiveBase(result, "addGSISSHJobSubmissionProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addGSISSHJobSubmissionProtocol failed: unknown result");
+    }
+
+    public String addGlobusJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addGlobusJobSubmissionProtocol(computeResourceId, jobSubmission);
+      return recv_addGlobusJobSubmissionProtocol();
+    }
+
+    public void send_addGlobusJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission) throws org.apache.thrift.TException
+    {
+      addGlobusJobSubmissionProtocol_args args = new addGlobusJobSubmissionProtocol_args();
+      args.setComputeResourceId(computeResourceId);
+      args.setJobSubmission(jobSubmission);
+      sendBase("addGlobusJobSubmissionProtocol", args);
+    }
+
+    public String recv_addGlobusJobSubmissionProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addGlobusJobSubmissionProtocol_result result = new addGlobusJobSubmissionProtocol_result();
+      receiveBase(result, "addGlobusJobSubmissionProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addGlobusJobSubmissionProtocol failed: unknown result");
+    }
+
+    public String addSCPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.SCPDataMovement dataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addSCPDataMovementProtocol(computeResourceId, dataMovement);
+      return recv_addSCPDataMovementProtocol();
+    }
+
+    public void send_addSCPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.SCPDataMovement dataMovement) throws org.apache.thrift.TException
+    {
+      addSCPDataMovementProtocol_args args = new addSCPDataMovementProtocol_args();
+      args.setComputeResourceId(computeResourceId);
+      args.setDataMovement(dataMovement);
+      sendBase("addSCPDataMovementProtocol", args);
+    }
+
+    public String recv_addSCPDataMovementProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addSCPDataMovementProtocol_result result = new addSCPDataMovementProtocol_result();
+      receiveBase(result, "addSCPDataMovementProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addSCPDataMovementProtocol failed: unknown result");
+    }
+
+    public String addGridFTPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addGridFTPDataMovementProtocol(computeResourceId, dataMovement);
+      return recv_addGridFTPDataMovementProtocol();
+    }
+
+    public void send_addGridFTPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement) throws org.apache.thrift.TException
+    {
+      addGridFTPDataMovementProtocol_args args = new addGridFTPDataMovementProtocol_args();
+      args.setComputeResourceId(computeResourceId);
+      args.setDataMovement(dataMovement);
+      sendBase("addGridFTPDataMovementProtocol", args);
+    }
+
+    public String recv_addGridFTPDataMovementProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addGridFTPDataMovementProtocol_result result = new addGridFTPDataMovementProtocol_result();
+      receiveBase(result, "addGridFTPDataMovementProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addGridFTPDataMovementProtocol failed: unknown result");
+    }
+
+    public List<String> listComputeResourceDescriptions() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_listComputeResourceDescriptions();
+      return recv_listComputeResourceDescriptions();
+    }
+
+    public void send_listComputeResourceDescriptions() throws org.apache.thrift.TException
+    {
+      listComputeResourceDescriptions_args args = new listComputeResourceDescriptions_args();
+      sendBase("listComputeResourceDescriptions", args);
+    }
+
+    public List<String> recv_listComputeResourceDescriptions() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      listComputeResourceDescriptions_result result = new listComputeResourceDescriptions_result();
+      receiveBase(result, "listComputeResourceDescriptions");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listComputeResourceDescriptions failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.ComputeResourceDescription getComputeResourceDescription(String computeResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getComputeResourceDescription(computeResourceId);
+      return recv_getComputeResourceDescription();
+    }
+
+    public void send_getComputeResourceDescription(String computeResourceId) throws org.apache.thrift.TException
+    {
+      getComputeResourceDescription_args args = new getComputeResourceDescription_args();
+      args.setComputeResourceId(computeResourceId);
+      sendBase("getComputeResourceDescription", args);
+    }
+
+    public org.apache.airavata.model.computehost.ComputeResourceDescription recv_getComputeResourceDescription() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getComputeResourceDescription_result result = new getComputeResourceDescription_result();
+      receiveBase(result, "getComputeResourceDescription");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getComputeResourceDescription failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.SSHJobSubmission getSSHJobSubmissionProtocol(String sshJobSubmissionProtocolResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getSSHJobSubmissionProtocol(sshJobSubmissionProtocolResourceId);
+      return recv_getSSHJobSubmissionProtocol();
+    }
+
+    public void send_getSSHJobSubmissionProtocol(String sshJobSubmissionProtocolResourceId) throws org.apache.thrift.TException
+    {
+      getSSHJobSubmissionProtocol_args args = new getSSHJobSubmissionProtocol_args();
+      args.setSshJobSubmissionProtocolResourceId(sshJobSubmissionProtocolResourceId);
+      sendBase("getSSHJobSubmissionProtocol", args);
+    }
+
+    public org.apache.airavata.model.computehost.SSHJobSubmission recv_getSSHJobSubmissionProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getSSHJobSubmissionProtocol_result result = new getSSHJobSubmissionProtocol_result();
+      receiveBase(result, "getSSHJobSubmissionProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSSHJobSubmissionProtocol failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.GSISSHJobSubmission getGSISSHJobSubmissionProtocol(String gsisshJobSubmissionProtocolResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getGSISSHJobSubmissionProtocol(gsisshJobSubmissionProtocolResourceId);
+      return recv_getGSISSHJobSubmissionProtocol();
+    }
+
+    public void send_getGSISSHJobSubmissionProtocol(String gsisshJobSubmissionProtocolResourceId) throws org.apache.thrift.TException
+    {
+      getGSISSHJobSubmissionProtocol_args args = new getGSISSHJobSubmissionProtocol_args();
+      args.setGsisshJobSubmissionProtocolResourceId(gsisshJobSubmissionProtocolResourceId);
+      sendBase("getGSISSHJobSubmissionProtocol", args);
+    }
+
+    public org.apache.airavata.model.computehost.GSISSHJobSubmission recv_getGSISSHJobSubmissionProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getGSISSHJobSubmissionProtocol_result result = new getGSISSHJobSubmissionProtocol_result();
+      receiveBase(result, "getGSISSHJobSubmissionProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGSISSHJobSubmissionProtocol failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.GlobusJobSubmission getGlobusJobSubmissionProtocol(String globusJobSubmissionProtocolResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getGlobusJobSubmissionProtocol(globusJobSubmissionProtocolResourceId);
+      return recv_getGlobusJobSubmissionProtocol();
+    }
+
+    public void send_getGlobusJobSubmissionProtocol(String globusJobSubmissionProtocolResourceId) throws org.apache.thrift.TException
+    {
+      getGlobusJobSubmissionProtocol_args args = new getGlobusJobSubmissionProtocol_args();
+      args.setGlobusJobSubmissionProtocolResourceId(globusJobSubmissionProtocolResourceId);
+      sendBase("getGlobusJobSubmissionProtocol", args);
+    }
+
+    public org.apache.airavata.model.computehost.GlobusJobSubmission recv_getGlobusJobSubmissionProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getGlobusJobSubmissionProtocol_result result = new getGlobusJobSubmissionProtocol_result();
+      receiveBase(result, "getGlobusJobSubmissionProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGlobusJobSubmissionProtocol failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.SCPDataMovement getSCPDataMovementProtocol(String scpDataMovementResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getSCPDataMovementProtocol(scpDataMovementResourceId);
+      return recv_getSCPDataMovementProtocol();
+    }
+
+    public void send_getSCPDataMovementProtocol(String scpDataMovementResourceId) throws org.apache.thrift.TException
+    {
+      getSCPDataMovementProtocol_args args = new getSCPDataMovementProtocol_args();
+      args.setScpDataMovementResourceId(scpDataMovementResourceId);
+      sendBase("getSCPDataMovementProtocol", args);
+    }
+
+    public org.apache.airavata.model.computehost.SCPDataMovement recv_getSCPDataMovementProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getSCPDataMovementProtocol_result result = new getSCPDataMovementProtocol_result();
+      receiveBase(result, "getSCPDataMovementProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSCPDataMovementProtocol failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.GridFTPDataMovement getGridFTPDataMovementProtocol(String gridFTPDataMovementResourceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getGridFTPDataMovementProtocol(gridFTPDataMovementResourceId);
+      return recv_getGridFTPDataMovementProtocol();
+    }
+
+    public void send_getGridFTPDataMovementProtocol(String gridFTPDataMovementResourceId) throws org.apache.thrift.TException
+    {
+      getGridFTPDataMovementProtocol_args args = new getGridFTPDataMovementProtocol_args();
+      args.setGridFTPDataMovementResourceId(gridFTPDataMovementResourceId);
+      sendBase("getGridFTPDataMovementProtocol", args);
+    }
+
+    public org.apache.airavata.model.computehost.GridFTPDataMovement recv_getGridFTPDataMovementProtocol() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getGridFTPDataMovementProtocol_result result = new getGridFTPDataMovementProtocol_result();
+      receiveBase(result, "getGridFTPDataMovementProtocol");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getGridFTPDataMovementProtocol failed: unknown result");
+    }
+
+    public boolean isComputeResourceDescriptionRegistered(String hostName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_isComputeResourceDescriptionRegistered(hostName);
+      return recv_isComputeResourceDescriptionRegistered();
+    }
+
+    public void send_isComputeResourceDescriptionRegistered(String hostName) throws org.apache.thrift.TException
+    {
+      isComputeResourceDescriptionRegistered_args args = new isComputeResourceDescriptionRegistered_args();
+      args.setHostName(hostName);
+      sendBase("isComputeResourceDescriptionRegistered", args);
+    }
+
+    public boolean recv_isComputeResourceDescriptionRegistered() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      isComputeResourceDescriptionRegistered_result result = new isComputeResourceDescriptionRegistered_result();
+      receiveBase(result, "isComputeResourceDescriptionRegistered");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isComputeResourceDescriptionRegistered failed: unknown result");
+    }
+
+    public org.apache.airavata.model.computehost.ComputeResourceDescription getComputeResourceDescriptionFromHostName(String hostName) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getComputeResourceDescriptionFromHostName(hostName);
+      return recv_getComputeResourceDescriptionFromHostName();
+    }
+
+    public void send_getComputeResourceDescriptionFromHostName(String hostName) throws org.apache.thrift.TException
+    {
+      getComputeResourceDescriptionFromHostName_args args = new getComputeResourceDescriptionFromHostName_args();
+      args.setHostName(hostName);
+      sendBase("getComputeResourceDescriptionFromHostName", args);
+    }
+
+    public org.apache.airavata.model.computehost.ComputeResourceDescription recv_getComputeResourceDescriptionFromHostName() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getComputeResourceDescriptionFromHostName_result result = new getComputeResourceDescriptionFromHostName_result();
+      receiveBase(result, "getComputeResourceDescriptionFromHostName");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getComputeResourceDescriptionFromHostName failed: unknown result");
+    }
+
+    public String addApplicationInterface(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addApplicationInterface(applicationInterface);
+      return recv_addApplicationInterface();
+    }
+
+    public void send_addApplicationInterface(org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription applicationInterface) throws org.apache.thrift.TException
+    {
+      addApplicationInterface_args args = new addApplicationInterface_args();
+      args.setApplicationInterface(applicationInterface);
+      sendBase("addApplicationInterface", args);
+    }
+
+    public String recv_addApplicationInterface() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addApplicationInterface_result result = new addApplicationInterface_result();
+      receiveBase(result, "addApplicationInterface");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addApplicationInterface failed: unknown result");
+    }
+
+    public List<String> listApplicationInterfaceIds() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_listApplicationInterfaceIds();
+      return recv_listApplicationInterfaceIds();
+    }
+
+    public void send_listApplicationInterfaceIds() throws org.apache.thrift.TException
+    {
+      listApplicationInterfaceIds_args args = new listApplicationInterfaceIds_args();
+      sendBase("listApplicationInterfaceIds", args);
+    }
+
+    public List<String> recv_listApplicationInterfaceIds() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      listApplicationInterfaceIds_result result = new listApplicationInterfaceIds_result();
+      receiveBase(result, "listApplicationInterfaceIds");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listApplicationInterfaceIds failed: unknown result");
+    }
+
+    public org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription getApplicationInterface(String applicationInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getApplicationInterface(applicationInterfaceId);
+      return recv_getApplicationInterface();
+    }
+
+    public void send_getApplicationInterface(String applicationInterfaceId) throws org.apache.thrift.TException
+    {
+      getApplicationInterface_args args = new getApplicationInterface_args();
+      args.setApplicationInterfaceId(applicationInterfaceId);
+      sendBase("getApplicationInterface", args);
+    }
+
+    public org.apache.airavata.model.appcatalog.appinterface.ApplicationInterfaceDescription recv_getApplicationInterface() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getApplicationInterface_result result = new getApplicationInterface_result();
+      receiveBase(result, "getApplicationInterface");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getApplicationInterface failed: unknown result");
+    }
+
+    public String registerAppicationModule(org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, boolean publish) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_registerAppicationModule(applicationModule, publish);
+      return recv_registerAppicationModule();
+    }
+
+    public void send_registerAppicationModule(org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule, boolean publish) throws org.apache.thrift.TException
+    {
+      registerAppicationModule_args args = new registerAppicationModule_args();
+      args.setApplicationModule(applicationModule);
+      args.setPublish(publish);
+      sendBase("registerAppicationModule", args);
+    }
+
+    public String recv_registerAppicationModule() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      registerAppicationModule_result result = new registerAppicationModule_result();
+      receiveBase(result, "registerAppicationModule");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerAppicationModule failed: unknown result");
+    }
+
+    public org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule getAppicationModule(String appModuleId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getAppicationModule(appModuleId);
+      return recv_getAppicationModule();
+    }
+
+    public void send_getAppicationModule(String appModuleId) throws org.apache.thrift.TException
+    {
+      getAppicationModule_args args = new getAppicationModule_args();
+      args.setAppModuleId(appModuleId);
+      sendBase("getAppicationModule", args);
+    }
+
+    public org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule recv_getAppicationModule() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getAppicationModule_result result = new getAppicationModule_result();
+      receiveBase(result, "getAppicationModule");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAppicationModule failed: unknown result");
+    }
+
+    public boolean updateAppicationModule(String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_updateAppicationModule(appModuleId, applicationModule);
+      return recv_updateAppicationModule();
+    }
+
+    public void send_updateAppicationModule(String appModuleId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationModule applicationModule) throws org.apache.thrift.TException
+    {
+      updateAppicationModule_args args = new updateAppicationModule_args();
+      args.setAppModuleId(appModuleId);
+      args.setApplicationModule(applicationModule);
+      sendBase("updateAppicationModule", args);
+    }
+
+    public boolean recv_updateAppicationModule() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      updateAppicationModule_result result = new updateAppicationModule_result();
+      receiveBase(result, "updateAppicationModule");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateAppicationModule failed: unknown result");
+    }
+
+    public boolean deleteAppicationModule(String appModuleId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_deleteAppicationModule(appModuleId);
+      return recv_deleteAppicationModule();
+    }
+
+    public void send_deleteAppicationModule(String appModuleId) throws org.apache.thrift.TException
+    {
+      deleteAppicationModule_args args = new deleteAppicationModule_args();
+      args.setAppModuleId(appModuleId);
+      sendBase("deleteAppicationModule", args);
+    }
+
+    public boolean recv_deleteAppicationModule() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      deleteAppicationModule_result result = new deleteAppicationModule_result();
+      receiveBase(result, "deleteAppicationModule");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteAppicationModule failed: unknown result");
+    }
+
+    public String addApplicationDeployment(String applicationInterfaceId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_addApplicationDeployment(applicationInterfaceId, applicationDeployment);
+      return recv_addApplicationDeployment();
+    }
+
+    public void send_addApplicationDeployment(String applicationInterfaceId, org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription applicationDeployment) throws org.apache.thrift.TException
+    {
+      addApplicationDeployment_args args = new addApplicationDeployment_args();
+      args.setApplicationInterfaceId(applicationInterfaceId);
+      args.setApplicationDeployment(applicationDeployment);
+      sendBase("addApplicationDeployment", args);
+    }
+
+    public String recv_addApplicationDeployment() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      addApplicationDeployment_result result = new addApplicationDeployment_result();
+      receiveBase(result, "addApplicationDeployment");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addApplicationDeployment failed: unknown result");
+    }
+
+    public List<String> listApplicationDeploymentIds(String applicationInterfaceId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_listApplicationDeploymentIds(applicationInterfaceId);
+      return recv_listApplicationDeploymentIds();
+    }
+
+    public void send_listApplicationDeploymentIds(String applicationInterfaceId) throws org.apache.thrift.TException
+    {
+      listApplicationDeploymentIds_args args = new listApplicationDeploymentIds_args();
+      args.setApplicationInterfaceId(applicationInterfaceId);
+      sendBase("listApplicationDeploymentIds", args);
+    }
+
+    public List<String> recv_listApplicationDeploymentIds() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      listApplicationDeploymentIds_result result = new listApplicationDeploymentIds_result();
+      receiveBase(result, "listApplicationDeploymentIds");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listApplicationDeploymentIds failed: unknown result");
+    }
+
+    public org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription getApplicationDeployment(String applicationInterfaceId, String applicationDeploymentId) throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      send_getApplicationDeployment(applicationInterfaceId, applicationDeploymentId);
+      return recv_getApplicationDeployment();
+    }
+
+    public void send_getApplicationDeployment(String applicationInterfaceId, String applicationDeploymentId) throws org.apache.thrift.TException
+    {
+      getApplicationDeployment_args args = new getApplicationDeployment_args();
+      args.setApplicationInterfaceId(applicationInterfaceId);
+      args.setApplicationDeploymentId(applicationDeploymentId);
+      sendBase("getApplicationDeployment", args);
+    }
+
+    public org.apache.airavata.model.appcatalog.appdeployment.ApplicationDeploymentDescription recv_getApplicationDeployment() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException
+    {
+      getApplicationDeployment_result result = new getApplicationDeployment_result();
+      receiveBase(result, "getApplicationDeployment");
+      if (result.isSetSuccess()) {
+        return result.success;
+      }
+      if (result.ire != null) {
+        throw result.ire;
+      }
+      if (result.ace != null) {
+        throw result.ace;
+      }
+      if (result.ase != null) {
+        throw result.ase;
+      }
+      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getApplicationDeployment failed: unknown result");
+    }
+
+  }
+  public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface {
+    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+      private org.apache.thrift.async.TAsyncClientManager clientManager;
+      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
+      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+        this.clientManager = clientManager;
+        this.protocolFactory = protocolFactory;
+      }
+      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+        return new AsyncClient(protocolFactory, clientManager, transport);
+      }
+    }
+
+    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
+      super(protocolFactory, clientManager, transport);
+    }
+
+    public void GetAPIVersion(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      GetAPIVersion_call method_call = new GetAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class GetAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public GetAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("GetAPIVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        GetAPIVersion_args args = new GetAPIVersion_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_GetAPIVersion();
+      }
+    }
+
+    public void addComputeResourceDescription(org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addComputeResourceDescription_call method_call = new addComputeResourceDescription_call(computeResourceDescription, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addComputeResourceDescription_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription;
+      public addComputeResourceDescription_call(org.apache.airavata.model.computehost.ComputeResourceDescription computeResourceDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceDescription = computeResourceDescription;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addComputeResourceDescription", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addComputeResourceDescription_args args = new addComputeResourceDescription_args();
+        args.setComputeResourceDescription(computeResourceDescription);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_addComputeResourceDescription();
+      }
+    }
+
+    public void addSSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addSSHJobSubmissionProtocol_call method_call = new addSSHJobSubmissionProtocol_call(computeResourceId, jobSubmission, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addSSHJobSubmissionProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      private org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission;
+      public addSSHJobSubmissionProtocol_call(String computeResourceId, org.apache.airavata.model.computehost.SSHJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+        this.jobSubmission = jobSubmission;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSSHJobSubmissionProtocol", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addSSHJobSubmissionProtocol_args args = new addSSHJobSubmissionProtocol_args();
+        args.setComputeResourceId(computeResourceId);
+        args.setJobSubmission(jobSubmission);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_addSSHJobSubmissionProtocol();
+      }
+    }
+
+    public void addGSISSHJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addGSISSHJobSubmissionProtocol_call method_call = new addGSISSHJobSubmissionProtocol_call(computeResourceId, jobSubmission, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addGSISSHJobSubmissionProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      private org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission;
+      public addGSISSHJobSubmissionProtocol_call(String computeResourceId, org.apache.airavata.model.computehost.GSISSHJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+        this.jobSubmission = jobSubmission;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addGSISSHJobSubmissionProtocol", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addGSISSHJobSubmissionProtocol_args args = new addGSISSHJobSubmissionProtocol_args();
+        args.setComputeResourceId(computeResourceId);
+        args.setJobSubmission(jobSubmission);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_addGSISSHJobSubmissionProtocol();
+      }
+    }
+
+    public void addGlobusJobSubmissionProtocol(String computeResourceId, org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addGlobusJobSubmissionProtocol_call method_call = new addGlobusJobSubmissionProtocol_call(computeResourceId, jobSubmission, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addGlobusJobSubmissionProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      private org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission;
+      public addGlobusJobSubmissionProtocol_call(String computeResourceId, org.apache.airavata.model.computehost.GlobusJobSubmission jobSubmission, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+        this.jobSubmission = jobSubmission;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addGlobusJobSubmissionProtocol", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addGlobusJobSubmissionProtocol_args args = new addGlobusJobSubmissionProtocol_args();
+        args.setComputeResourceId(computeResourceId);
+        args.setJobSubmission(jobSubmission);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_addGlobusJobSubmissionProtocol();
+      }
+    }
+
+    public void addSCPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.SCPDataMovement dataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addSCPDataMovementProtocol_call method_call = new addSCPDataMovementProtocol_call(computeResourceId, dataMovement, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addSCPDataMovementProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      private org.apache.airavata.model.computehost.SCPDataMovement dataMovement;
+      public addSCPDataMovementProtocol_call(String computeResourceId, org.apache.airavata.model.computehost.SCPDataMovement dataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+        this.dataMovement = dataMovement;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addSCPDataMovementProtocol", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addSCPDataMovementProtocol_args args = new addSCPDataMovementProtocol_args();
+        args.setComputeResourceId(computeResourceId);
+        args.setDataMovement(dataMovement);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_addSCPDataMovementProtocol();
+      }
+    }
+
+    public void addGridFTPDataMovementProtocol(String computeResourceId, org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      addGridFTPDataMovementProtocol_call method_call = new addGridFTPDataMovementProtocol_call(computeResourceId, dataMovement, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class addGridFTPDataMovementProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      private org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement;
+      public addGridFTPDataMovementProtocol_call(String computeResourceId, org.apache.airavata.model.computehost.GridFTPDataMovement dataMovement, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+        this.dataMovement = dataMovement;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addGridFTPDataMovementProtocol", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        addGridFTPDataMovementProtocol_args args = new addGridFTPDataMovementProtocol_args();
+        args.setComputeResourceId(computeResourceId);
+        args.setDataMovement(dataMovement);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public String getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_addGridFTPDataMovementProtocol();
+      }
+    }
+
+    public void listComputeResourceDescriptions(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      listComputeResourceDescriptions_call method_call = new listComputeResourceDescriptions_call(resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class listComputeResourceDescriptions_call extends org.apache.thrift.async.TAsyncMethodCall {
+      public listComputeResourceDescriptions_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("listComputeResourceDescriptions", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        listComputeResourceDescriptions_args args = new listComputeResourceDescriptions_args();
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public List<String> getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_listComputeResourceDescriptions();
+      }
+    }
+
+    public void getComputeResourceDescription(String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getComputeResourceDescription_call method_call = new getComputeResourceDescription_call(computeResourceId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getComputeResourceDescription_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String computeResourceId;
+      public getComputeResourceDescription_call(String computeResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.computeResourceId = computeResourceId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getComputeResourceDescription", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getComputeResourceDescription_args args = new getComputeResourceDescription_args();
+        args.setComputeResourceId(computeResourceId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.model.computehost.ComputeResourceDescription getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getComputeResourceDescription();
+      }
+    }
+
+    public void getSSHJobSubmissionProtocol(String sshJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getSSHJobSubmissionProtocol_call method_call = new getSSHJobSubmissionProtocol_call(sshJobSubmissionProtocolResourceId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getSSHJobSubmissionProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String sshJobSubmissionProtocolResourceId;
+      public getSSHJobSubmissionProtocol_call(String sshJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+        this.sshJobSubmissionProtocolResourceId = sshJobSubmissionProtocolResourceId;
+      }
+
+      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSSHJobSubmissionProtocol", org.apache.thrift.protocol.TMessageType.CALL, 0));
+        getSSHJobSubmissionProtocol_args args = new getSSHJobSubmissionProtocol_args();
+        args.setSshJobSubmissionProtocolResourceId(sshJobSubmissionProtocolResourceId);
+        args.write(prot);
+        prot.writeMessageEnd();
+      }
+
+      public org.apache.airavata.model.computehost.SSHJobSubmission getResult() throws org.apache.airavata.model.error.InvalidRequestException, org.apache.airavata.model.error.AiravataClientException, org.apache.airavata.model.error.AiravataSystemException, org.apache.thrift.TException {
+        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
+        }
+        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+        return (new Client(prot)).recv_getSSHJobSubmissionProtocol();
+      }
+    }
+
+    public void getGSISSHJobSubmissionProtocol(String gsisshJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+      checkReady();
+      getGSISSHJobSubmissionProtocol_call method_call = new getGSISSHJobSubmissionProtocol_call(gsisshJobSubmissionProtocolResourceId, resultHandler, this, ___protocolFactory, ___transport);
+      this.___currentMethod = method_call;
+      ___manager.call(method_call);
+    }
+
+    public static class getGSISSHJobSubmissionProtocol_call extends org.apache.thrift.async.TAsyncMethodCall {
+      private String gsisshJobSubmissionProtocolResourceId;
+      public getGSISSHJobSubmissionProtocol_call(String gsisshJobSubmissionProtocolResourceId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+        super(client, protocolFactory, transport, resultHandler, false);
+       

<TRUNCATED>

[02/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/thrift-interface-descriptions/appCatalogAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/appCatalogAPI.thrift b/airavata-api/thrift-interface-descriptions/appCatalogAPI.thrift
new file mode 100644
index 0000000..e41ea10
--- /dev/null
+++ b/airavata-api/thrift-interface-descriptions/appCatalogAPI.thrift
@@ -0,0 +1,186 @@
+/*
+ * 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.
+ *
+ */
+
+/*
+ * Application Programming Interface definitions for Apache Airavata App Catalog.
+ *
+*/
+
+include "airavataErrors.thrift"
+include "airavataDataModel.thrift"
+include "appCatalogModels.thrift"
+
+namespace java org.apache.airavata.api.appcatalog
+namespace php Airavata.API.AppCatalog
+namespace cpp airavata.api.appcatalog
+namespace perl AiravataAPI.AppCatalog
+namespace py airavata.api.appcatalog
+namespace js AiravataAPI.AppCatalog
+
+service ApplicationCatalogAPI {
+
+/*
+ * Apache Airavata API Service Methods. For data structures associated in the signatures, please see included thrift files
+*/
+
+  /** Query Airavata to fetch the API version */
+  string GetAPIVersion(),
+  
+  /**
+   * Manage Computer Resources
+  */
+  string addComputeResourceDescription(1: required computeHostModel.ComputeResourceDescription computeResourceDescription)
+    throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+            
+  string addSSHJobSubmissionProtocol(1: required string computeResourceId, 2: required computeHostModel.SSHJobSubmission jobSubmission)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+            
+  string addGSISSHJobSubmissionProtocol(1: required string computeResourceId, 2: required computeHostModel.GSISSHJobSubmission jobSubmission)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+            
+  string addGlobusJobSubmissionProtocol(1: required string computeResourceId, 2: required computeHostModel.GlobusJobSubmission jobSubmission)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)     
+            
+  string addSCPDataMovementProtocol(1: required string computeResourceId, 2: required computeHostModel.SCPDataMovement dataMovement)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase) 
+            
+  string addGridFTPDataMovementProtocol(1: required string computeResourceId, 2: required computeHostModel.GridFTPDataMovement dataMovement)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)             
+            
+  list<string> listComputeResourceDescriptions()
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+
+  computeHostModel.ComputeResourceDescription getComputeResourceDescription(1: required string computeResourceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+
+  computeHostModel.SSHJobSubmission getSSHJobSubmissionProtocol(1: required string sshJobSubmissionProtocolResourceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+            
+  computeHostModel.GSISSHJobSubmission getGSISSHJobSubmissionProtocol(1: required string gsisshJobSubmissionProtocolResourceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+            
+  computeHostModel.GlobusJobSubmission getGlobusJobSubmissionProtocol(1: required string globusJobSubmissionProtocolResourceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)     
+            
+  computeHostModel.SCPDataMovement getSCPDataMovementProtocol(1: required string scpDataMovementResourceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase) 
+              
+  computeHostModel.GridFTPDataMovement getGridFTPDataMovementProtocol(1: required string gridFTPDataMovementResourceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase) 
+
+  bool isComputeResourceDescriptionRegistered(1: required string hostName)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+
+  computeHostModel.ComputeResourceDescription getComputeResourceDescriptionFromHostName(1: required string hostName)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+                       
+  /**
+   * Manage Application Interfaces
+  */
+  string addApplicationInterface(1: required applicationInterfaceModel.ApplicationInterfaceDescription applicationInterface)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)
+            
+  list<string> listApplicationInterfaceIds()
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)  
+
+  applicationInterfaceModel.ApplicationInterfaceDescription getApplicationInterface(1: required string applicationInterfaceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)  
+
+  /**
+   * Manage application modules
+  */
+
+  string registerAppicationModule(1: required applicationDeploymentModel.ApplicationModule applicationModule,
+            2:optional bool publish)
+    	throws (1: airavataErrors.InvalidRequestException ire,
+              2: airavataErrors.AiravataClientException ace,
+              3: airavataErrors.AiravataSystemException ase)
+
+  applicationDeploymentModel.ApplicationModule getAppicationModule(1: required string appModuleId)
+      	throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+
+  bool updateAppicationModule(1: required string appModuleId,
+            2: required applicationDeploymentModel.ApplicationModule applicationModule)
+      	throws (1: airavataErrors.InvalidRequestException ire,
+                2: airavataErrors.AiravataClientException ace,
+                3: airavataErrors.AiravataSystemException ase)
+
+  bool deleteAppicationModule(1: required string appModuleId)
+         	throws (1: airavataErrors.InvalidRequestException ire,
+                   2: airavataErrors.AiravataClientException ace,
+                   3: airavataErrors.AiravataSystemException ase)
+
+  /**
+   * Manage application modules
+  */
+
+  string addApplicationDeployment(1: required string applicationInterfaceId, 2: required applicationDeploymentModel.ApplicationDeploymentDescription applicationDeployment)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)   
+            
+  list<string> listApplicationDeploymentIds(1: required string applicationInterfaceId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)  
+
+  applicationDeploymentModel.ApplicationDeploymentDescription getApplicationDeployment(1: required string applicationInterfaceId, 2: required string applicationDeploymentId)
+  	throws (1: airavataErrors.InvalidRequestException ire,
+            2: airavataErrors.AiravataClientException ace,
+            3: airavataErrors.AiravataSystemException ase)  
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/thrift-interface-descriptions/applicationCatalogAPI.thrift
----------------------------------------------------------------------
diff --git a/airavata-api/thrift-interface-descriptions/applicationCatalogAPI.thrift b/airavata-api/thrift-interface-descriptions/applicationCatalogAPI.thrift
deleted file mode 100644
index c86ca60..0000000
--- a/airavata-api/thrift-interface-descriptions/applicationCatalogAPI.thrift
+++ /dev/null
@@ -1,204 +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.
- *
- */
-
-/*
- * Application Programming Interface definition for Apache Airavata Services.
- *   this parent thrift file is contains all service interfaces. The data models are 
- *   described in respective thrift files.
-*/
-
-include "airavataErrors.thrift"
-include "airavataDataModel.thrift"
-include "computeHostModel.thrift"
-include "applicationInterfaceModel.thrift"
-include "applicationDeploymentModel.thrift"
-
-namespace java org.apache.airavata.api.appcatalog
-namespace php Airavata.API.AppCatalog
-namespace cpp airavata.api.appcatalog
-namespace perl AiravataAPI.AppCatalog
-namespace py airavata.api.appcatalog
-namespace js AiravataAPI.AppCatalog
-
-/*
- * Airavata Interface Versions depend upon this Thrift Interface File. When Making changes, please edit the
- *  Version Constants according to Semantic Versioning Specification (SemVer) http://semver.org.
- *
- * Note: The Airavata API version may be different from the Airavata software release versions.
- *
- * The Airavata API version is composed as a dot delimited string with major, minor, and patch level components.
- *
- *  - Major: Incremented for backward incompatible changes. An example would be changes to interfaces.
- *  - Minor: Incremented for backward compatible changes. An example would be the addition of a new optional methods.
- *  - Patch: Incremented for bug fixes. The patch level should be increased for every edit that doesn't result
- *              in a change to major/minor version numbers.
-*/
-const string AIRAVATA_API_VERSION = "0.12.0"
-
-service ApplicationCatalogAPI {
-
-/*
- * Apache Airavata API Service Methods. For data structures associated in the signatures, please see included thrift files
-*/
-
-  /** Query Airavata to fetch the API version */
-  string GetAPIVersion(),
-  
-  /**
-   * Manage Computer Resources
-  */
-  string addComputeResourceDescription(1: required computeHostModel.ComputeResourceDescription computeResourceDescription)
-    throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-            
-  string addSSHJobSubmissionProtocol(1: required string computeResourceId, 2: required computeHostModel.SSHJobSubmission jobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-            
-  string addGSISSHJobSubmissionProtocol(1: required string computeResourceId, 2: required computeHostModel.GSISSHJobSubmission jobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-            
-  string addGlobusJobSubmissionProtocol(1: required string computeResourceId, 2: required computeHostModel.GlobusJobSubmission jobSubmission)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)     
-            
-  string addSCPDataMovementProtocol(1: required string computeResourceId, 2: required computeHostModel.SCPDataMovement dataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase) 
-            
-  string addGridFTPDataMovementProtocol(1: required string computeResourceId, 2: required computeHostModel.GridFTPDataMovement dataMovement)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)             
-            
-  list<string> listComputeResourceDescriptions()
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  computeHostModel.ComputeResourceDescription getComputeResourceDescription(1: required string computeResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  computeHostModel.SSHJobSubmission getSSHJobSubmissionProtocol(1: required string sshJobSubmissionProtocolResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-            
-  computeHostModel.GSISSHJobSubmission getGSISSHJobSubmissionProtocol(1: required string gsisshJobSubmissionProtocolResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-            
-  computeHostModel.GlobusJobSubmission getGlobusJobSubmissionProtocol(1: required string globusJobSubmissionProtocolResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)     
-            
-  computeHostModel.SCPDataMovement getSCPDataMovementProtocol(1: required string scpDataMovementResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase) 
-              
-  computeHostModel.GridFTPDataMovement getGridFTPDataMovementProtocol(1: required string gridFTPDataMovementResourceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase) 
-
-  bool isComputeResourceDescriptionRegistered(1: required string hostName)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-
-  computeHostModel.ComputeResourceDescription getComputeResourceDescriptionFromHostName(1: required string hostName)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-                       
-  /**
-   * Manage Application Interfaces
-  */
-  string addApplicationInterface(1: required applicationInterfaceModel.ApplicationInterfaceDescription applicationInterface)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)
-            
-  list<string> listApplicationInterfaceIds()
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)  
-
-  applicationInterfaceModel.ApplicationInterfaceDescription getApplicationInterface(1: required string applicationInterfaceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)  
-
-  /**
-   * Manage application modules
-  */
-
-  string registerAppicationModule(1: required applicationDeploymentModel.ApplicationModule applicationModule,
-            2:optional bool publish)
-    	throws (1: airavataErrors.InvalidRequestException ire,
-              2: airavataErrors.AiravataClientException ace,
-              3: airavataErrors.AiravataSystemException ase)
-
-  applicationDeploymentModel.ApplicationModule getAppicationModule(1: required string appModuleId)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  bool updateAppicationModule(1: required string appModuleId,
-            2: required applicationDeploymentModel.ApplicationModule applicationModule)
-      	throws (1: airavataErrors.InvalidRequestException ire,
-                2: airavataErrors.AiravataClientException ace,
-                3: airavataErrors.AiravataSystemException ase)
-
-  bool deleteAppicationModule(1: required string appModuleId)
-         	throws (1: airavataErrors.InvalidRequestException ire,
-                   2: airavataErrors.AiravataClientException ace,
-                   3: airavataErrors.AiravataSystemException ase)
-
-  /**
-   * Manage application modules
-  */
-
-  string addApplicationDeployment(1: required string applicationInterfaceId, 2: required applicationDeploymentModel.ApplicationDeploymentDescription applicationDeployment)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)   
-            
-  list<string> listApplicationDeploymentIds(1: required string applicationInterfaceId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)  
-
-  applicationDeploymentModel.ApplicationDeploymentDescription getApplicationDeployment(1: required string applicationInterfaceId, 2: required string applicationDeploymentId)
-  	throws (1: airavataErrors.InvalidRequestException ire,
-            2: airavataErrors.AiravataClientException ace,
-            3: airavataErrors.AiravataSystemException ase)  
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/GetAPIVersion.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/GetAPIVersion.php b/samples/php-cli-samples/GetAPIVersion.php
new file mode 100644
index 0000000..7a2e82e
--- /dev/null
+++ b/samples/php-cli-samples/GetAPIVersion.php
@@ -0,0 +1,58 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$GLOBALS['THRIFT_ROOT'] = $airavataconfig['THRIFT_LIB_DIR'];
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = $airavataconfig['AIRAVATA_PHP_STUBS_DIR'];
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+try
+{
+    $version = $airavataclient->getAPIVersion();
+}
+catch (TException $texp)
+{
+    print 'Exception: ' . $texp->getMessage()."\n";
+}
+
+
+echo 'Airavata server version is ' . $version;
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/README
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/README b/samples/php-cli-samples/README
new file mode 100644
index 0000000..8684750
--- /dev/null
+++ b/samples/php-cli-samples/README
@@ -0,0 +1,20 @@
+This directory contains files that can be used to test the Apache Airavata client API using PHP command-line tools.  You will need PHP installed on your test environment.  To run a command from a terminal shell prompt, use, for example, 
+        [prompt%> php createProject.php your-name
+
+You can modify PHP files using any text editor.
+
+Run the commands in the following order for your first test.
+1. GetAPIVersion.php (a sanity check)
+2. createProject.php
+3. updateProject.php
+4. getAllUserProjects.php
+5. createExperiment.php
+6. getExperiment.php
+7. updateExperiment.php
+8. cloneExperiment.php
+9. getAllExperimentsInProject.php
+10. getAllUserExperiments.php
+11. launchExperiment.php
+12. getExperimentStatus.php
+13. getExperimentOutputs.php
+14. terminateExperiment.php

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/add-compute-resources.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/add-compute-resources.php b/samples/php-cli-samples/add-compute-resources.php
new file mode 100644
index 0000000..0413903
--- /dev/null
+++ b/samples/php-cli-samples/add-compute-resources.php
@@ -0,0 +1,78 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/AppCatalog/ApplicationCatalogAPI.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
+use Airavata\Model\Workspace\Experiment\DataObjectType;
+use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\AppCatalog\ComputeResourceDescription;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+use Airavata\API\AppCatalog\ApplicationCatalogAPIClient;
+use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\AppCatalog\JobSubmissionProtocol;
+use Airavata\Model\AppCatalog\DataMovementProtocol;
+use Airavata\Model\AppCatalog\GSISSHJobSubmission;
+use Airavata\Model\AppCatalog\ResourceJobManager;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['APP_CATALOG_SERVER'], $airavataconfig['APP_CATALOG_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+
+$airavataclient = new ApplicationCatalogAPIClient($protocol);
+$transport->open();
+
+echo "Airavata Server Version is: " . $airavataclient->getAPIVersion() . "\n";
+
+echo "Add Compute Resources.... "."\n";
+
+$id_list = $airavataclient->listComputeResourceDescriptions();
+$compute_resource = new ComputeResourceDescription();
+$compute_resource->hostName="test-stampede-host"."-".time();
+$compute_resource->hostAliases=array("stampede");
+$compute_resource->ipAddresses=array("stampede.tacc.xsede.org");
+$compute_resource->isEmpty=false;
+$compute_resource->scratchLocation="/home1/01437/ogce";
+$compute_resource->jobSubmissionProtocols=array();
+$compute_resource->dataMovementProtocols=array();
+
+echo "Adding ".$compute_resource->hostName."...";
+$compute_resource_id=$airavataclient->addComputeResourceDescription($compute_resource);
+echo "done [saved in the catalog as ".$compute_resource_id."]\n";
+
+$gsissh_protoco_data=new GSISSHJobSubmission();
+$gsissh_protoco_data->resourceJobManager=ResourceJobManager::SLURM;
+$gsissh_protoco_data->installedPath="/usr/bin/";
+$gsissh_protoco_data->sshPort=2222;
+$gsissh_protoco_data->monitorMode="push";
+
+echo "Adding GSISSH protocol data to ".$compute_resource_id."...";
+$airavataclient->addGSISSHJobSubmissionProtocol($compute_resource_id, $gsissh_protoco_data);
+echo "done\n";
+$transport->close();
+?>

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/airavata-client-api-tester.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/airavata-client-api-tester.php b/samples/php-cli-samples/airavata-client-api-tester.php
new file mode 100755
index 0000000..06c0429
--- /dev/null
+++ b/samples/php-cli-samples/airavata-client-api-tester.php
@@ -0,0 +1,233 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+use Airavata\Model\Workspace\Project;
+use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\Workspace\Experiment\DataObjectType;
+use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
+use Airavata\Model\Workspace\Experiment\DataType;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+/* this is the same as the factory */
+/* - Temporarity overriding to connect to test server.
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+*/
+$transport = new TSocket('gw127.iu.xsede.org', 8930);
+$transport->setRecvTimeout(20000);
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+try
+{
+    if ($argc != 2)
+    {
+        echo 'php airavata-client-api-tester.php <username>';
+    }
+    else
+    {
+
+        /* ComputationalResourceScheduling data for Trestles*/
+        $cmRST = new ComputationalResourceScheduling();
+        $cmRST->resourceHostId = "trestles.sdsc.edu";
+        $cmRST->ComputationalProjectAccount = "sds128";
+        $cmRST->totalCPUCount = 1;
+        $cmRST->nodeCount = 1;
+        $cmRST->numberOfThreads = 0;
+        $cmRST->queueName = "normal";
+        $cmRST->wallTimeLimit = 15;
+        $cmRST->jobStartTime = 0;
+        $cmRST->totalPhysicalMemory = 0;
+
+        /* ComputationalResourceScheduling data for Stampede */
+        $cmRSS = new ComputationalResourceScheduling();
+        $cmRSS->resourceHostId = "stampede.tacc.xsede.org";
+        $cmRSS->ComputationalProjectAccount = "TG-STA110014S";
+        $cmRSS->totalCPUCount = 1;
+        $cmRSS->nodeCount = 1;
+        $cmRSS->numberOfThreads = 0;
+        $cmRSS->queueName = "normal";
+        $cmRSS->wallTimeLimit = 15;
+        $cmRSS->jobStartTime = 0;
+        $cmRSS->totalPhysicalMemory = 0;
+
+        /* UserConfigurationData using either Trestles or Stampede*/
+        //$cmRS = $cmRSS;
+        $cmRS = $cmRST;
+        $userConfigurationData = new UserConfigurationData();
+        $userConfigurationData->airavataAutoSchedule = 0;
+        $userConfigurationData->overrideManualScheduledParams = 0;
+        $userConfigurationData->computationalResourceScheduling = $cmRS;
+        //var_dump($cmRS);
+        //var_dump($userConfigurationData);
+
+        /*Application ID for Trestles or Stamepede */
+        $appId_trestles = "SimpleEcho2";
+        $appId_stampede = "SimpleEcho3";
+        //$appId = $appId_stampede;
+        $appId = $appId_trestles;
+
+        /* Experiment input and output data. */
+        $input = new DataObjectType();
+        $input->key = "echo_input";
+        $input->value = "echo_output=Hello World";
+        $input->type = DataType::STRING;
+        $exInputs = array($input);
+
+        $output = new DataObjectType();
+        $output->key = "echo_output";
+        $output->value = "";
+        $output->type = DataType::STRING;
+        $exOutputs = array($output);
+
+	
+        /* Simple workflow test. */
+        $user = $argv[1];
+        
+        /* Create Project */
+        $project = new Project();
+	$project->owner = $user;
+	$project->name = "LoadTesterProject";
+  	$projId = $airavataclient->createProject($project); 
+	echo "$user created project $projId. \n";
+
+        /* Create Experiment */
+        $experiment = new Experiment();
+        $experiment->projectID = $projId;
+        $experiment->userName = $user;
+        $experiment->name = "LoadTesterExperiment_".time();
+        $experiment->applicationId = $appId;
+        $experiment->userConfigurationData = $userConfigurationData;
+        $experiment->experimentInputs = $exInputs;
+        $experiment->experimentOutputs = $exOutputs;
+        $expId = $airavataclient->createExperiment($experiment);
+	echo "$user created experiment $expId. \n";
+        //var_dump($experiment);
+
+        /* Get whole project */
+	$uproj = $airavataclient->getProject($projId);
+ 	echo "$user $projId detail follows: \n";
+	var_dump($uproj);
+
+        /* Update Project */
+	$uproj->description = "Updated project description: ".time();
+	$airavataclient->updateProject($projId, $uproj);
+	echo "$user updated project $projId. \n";
+
+        /* Get whole experiment */
+	$uexp = $airavataclient->getExperiment($expId);
+        echo "$user experiment $expId detail follows: \n";
+        var_dump($uexp);
+
+	/* Update Experiment */
+	$uexp->description = "Updated experiment description: ".time();
+	$airavataclient->updateExperiment($expId, $uexp);
+	echo "$user updated experiment $expId. \n";
+
+	/* Clone Experiment */
+	$clone_expId = $airavataclient->cloneExperiment($expId, "CloneLoadTesterExperiment_".time());
+	echo "$user cloned experiment $expId as $clone_expId. \n";
+
+	/* Update Experiment Configuration */
+        $update_userConfigurationData = new UserConfigurationData();
+        $update_userConfigurationData->airavataAutoSchedule = 0;
+        $update_userConfigurationData->overrideManualScheduledParams = 0;
+        $update_userConfigurationData->computationalResourceScheduling = $cmRSS; 
+	$airavataclient->updateExperimentConfiguration($expId, $update_userConfigurationData);
+	echo "$user updated user configuration data for experiment $expId. \n";
+
+	/* Update Resource Scheduleing */
+	//$airavataclient->updateResourceScheduleing($expId, $cmRST);
+	//echo "$user updated resource scheduleing for experiment $expId. \n";
+
+	/* Validate experiment */
+	//$valid = $airavataclient->validateExperiment($expId);
+	//echo "$user experiment $expId validation is $valid. \n";
+
+        /* Launch Experiment */
+	//$airavataclient->launchExperiment($expId, 'airavataToken');
+	//echo "$user experiment $expId is launched.";
+
+	/* Get experiment status */ 
+	$experimentStatus = $airavataclient->getExperimentStatus($expId);
+        $experimentStatusString =  ExperimentState::$__names[$experimentStatus->experimentState];
+	echo "$user experiment $expId status is $experimentStatusString. \n";
+
+        /* Get additional information */
+        //$version = $airavataclient->GetAPIVersion();
+        //echo "$user Airavata Server Version is $version. \n"; 
+
+	$userProjects = $airavataclient->getAllUserProjects($user);
+        echo "$user total number of projects is " . sizeof($userProjects) . ". \n";
+
+	$userExperiments = $airavataclient->getAllUserExperiments($user);
+        echo "$user total number of experiments is " . sizeof($userExperiments) . ". \n";
+
+        //echo $projId;
+        $projectExperiments = $airavataclient->getAllExperimentsInProject($projId);
+        echo "$user number of experiments in $projId is " . sizeof($projectExperiments) . ". \n";	
+    }
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+catch (ExperimentNotFoundException $enf)
+{
+    print 'Experiment Not Found Exception: ' . $enf->getMessage()."\n";
+}
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/airavata-client-properties.ini
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/airavata-client-properties.ini b/samples/php-cli-samples/airavata-client-properties.ini
new file mode 100644
index 0000000..87d2f41
--- /dev/null
+++ b/samples/php-cli-samples/airavata-client-properties.ini
@@ -0,0 +1,23 @@
+; The is the configuration file with properties needed by Airavata Clients.
+;   Key properties specify location of Airavata Services, Ports and Such.
+
+; library path to Thrift Libraries
+THRIFT_LIB_DIR = "../../airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Thrift/"
+
+; library of thrift generated Airavata API PHP Stubs
+AIRAVATA_PHP_STUBS_DIR = "../../airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/"
+
+; Host which runs the Airavata Server
+AIRAVATA_SERVER = "gw111.iu.xsede.org"
+
+; Airavata Server thrift port
+AIRAVATA_PORT = 8930
+
+; Time out value to give enough breathing room for client to get synchronous responses back
+AIRAVATA_TIMEOUT = 5000
+
+; Host which runs the Application Catalog Server
+APP_CATALOG_SERVER = "gw111.iu.xsede.org"
+
+; Application Catalog Server thrift port
+APP_CATALOG_PORT = 8931

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/cloneExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/cloneExperiment.php b/samples/php-cli-samples/cloneExperiment.php
new file mode 100644
index 0000000..42a39d7
--- /dev/null
+++ b/samples/php-cli-samples/cloneExperiment.php
@@ -0,0 +1,156 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+use Thrift\Exception\TTransportException;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+//$expId = 'experiment2_8f9c0ccc-6392-47b3-bcde-f4e82557bc32';
+
+
+if ($argc != 2)
+{
+    echo 'php cloneExperiment.php <experiment_id>';
+}
+else
+{
+    $cloneId = clone_experiment($argv[1]);
+
+    $clone = get_experiment($cloneId);
+
+    var_dump($clone);
+
+    echo "Created clone with ID $clone->experimentID named $clone->name \n\n";
+}
+
+
+
+
+//var_dump($experiment);
+
+
+$transport->close();
+
+
+/**
+ * Get the experiment with the given ID
+ * @param $expId
+ * @return null
+ */
+function get_experiment($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        return $airavataclient->getExperiment($expId);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException during get!<br><br>' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!<br><br>' . $tte->getMessage();
+    }
+    catch (\Exception $e)
+    {
+        echo 'Exception!<br><br>' . $e->getMessage();
+    }
+
+}
+
+/**
+ * Clone the experiment with the given ID
+ * @param $expId
+ * @return null
+ */
+function clone_experiment($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        $experiment = $airavataclient->getExperiment($expId);
+
+        return $airavataclient->cloneExperiment($expId, $experiment->name .= time());
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException during clone!<br><br>' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!<br><br>' . $tte->getMessage();
+    }
+}
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/createExperiment.php b/samples/php-cli-samples/createExperiment.php
new file mode 100755
index 0000000..3545a37
--- /dev/null
+++ b/samples/php-cli-samples/createExperiment.php
@@ -0,0 +1,162 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+use Airavata\Model\Workspace\Project;
+use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\Workspace\Experiment\DataObjectType;
+use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
+use Airavata\Model\Workspace\Experiment\DataType;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try
+{
+    if ($argc != 4)
+    {
+        echo 'php createExperiment.php <username> <experiment_name> <project_ID>';
+    }
+    else
+    {
+        /* ComputationalResourceScheduling data for Trestles*/
+        $cmRST = new ComputationalResourceScheduling();
+        $cmRST->resourceHostId = "trestles.sdsc.edu";
+        $cmRST->ComputationalProjectAccount = "sds128";
+        $cmRST->totalCPUCount = 1;
+        $cmRST->nodeCount = 1;
+        $cmRST->numberOfThreads = 0;
+        $cmRST->queueName = "normal";
+        $cmRST->wallTimeLimit = 15;
+        $cmRST->jobStartTime = 0;
+        $cmRST->totalPhysicalMemory = 0;
+
+        /* ComputationalResourceScheduling data for Stampede */
+        $cmRSS = new ComputationalResourceScheduling();
+        $cmRSS->resourceHostId = "stampede.tacc.xsede.org";
+        $cmRSS->ComputationalProjectAccount = "TG-STA110014S";
+        $cmRSS->totalCPUCount = 1;
+        $cmRSS->nodeCount = 1;
+        $cmRSS->numberOfThreads = 0;
+        $cmRSS->queueName = "normal";
+        $cmRSS->wallTimeLimit = 15;
+        $cmRSS->jobStartTime = 0;
+        $cmRSS->totalPhysicalMemory = 0;
+
+        /* UserConfigurationData using either Trestles or Stampede*/
+        //$cmRS = $cmRSS;
+        $cmRS = $cmRST;
+        $userConfigurationData = new UserConfigurationData();
+        $userConfigurationData->airavataAutoSchedule = 0;
+        $userConfigurationData->overrideManualScheduledParams = 0;
+        $userConfigurationData->computationalResourceScheduling = $cmRS;
+        //var_dump($cmRS);
+        //var_dump($userConfigurationData);
+
+        /*Application ID for Trestles or Stamepede */
+        $appId_trestles = "SimpleEcho2";
+        $appId_stampede = "SimpleEcho3";
+        //$appId = $appId_stampede;
+        $appId = $appId_trestles;
+
+        /* Experiment input and output data. */
+        $input = new DataObjectType();
+        $input->key = "echo_input";
+        $input->value = "echo_output=Hello World";
+        $input->type = DataType::STRING;
+        $exInputs = array($input);
+
+        $output = new DataObjectType();
+        $output->key = "echo_output";
+        $output->value = "";
+        $output->type = DataType::STRING;
+        $exOutputs = array($output);
+
+        /* Create Experiment: needs to update using unique project ID. */
+        $user = $argv[1];
+        $exp_name = $argv[2];
+        $proj = $argv[3];
+
+        $experiment = new Experiment();
+        $experiment->projectID = $proj;
+        $experiment->userName = $user;
+        $experiment->name = $exp_name;
+        $experiment->applicationId = $appId;
+        $experiment->userConfigurationData = $userConfigurationData;
+        $experiment->experimentInputs = $exInputs;
+        $experiment->experimentOutputs = $exOutputs;
+
+        $expId = $airavataclient->createExperiment($experiment);
+
+        if ($expId)
+        {
+            var_dump($experiment);
+            echo "Experiment $expId created! \n    ";
+        }
+        else
+        {
+            echo "Failed to create experiment. \n";
+        }
+    }
+
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/createProject.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/createProject.php b/samples/php-cli-samples/createProject.php
new file mode 100755
index 0000000..8a75b6f
--- /dev/null
+++ b/samples/php-cli-samples/createProject.php
@@ -0,0 +1,93 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+use Airavata\Model\Workspace\Project;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try
+{
+    if ($argc != 3)
+    {
+        echo 'php createProject.php <owner> <project_name>';
+    }
+    else
+    {
+        $project = new Project();
+        $project->owner = $argv[1];
+        $project->name = $argv[2];
+
+        $projId = $airavataclient->createProject($project);
+
+        if ($projId)
+        {
+            print "$projId";
+        }
+        else
+        {
+            echo 'Failed to create project.';
+        }
+    }
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/getAllExperimentsInProject.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAllExperimentsInProject.php b/samples/php-cli-samples/getAllExperimentsInProject.php
new file mode 100644
index 0000000..6b42ecc
--- /dev/null
+++ b/samples/php-cli-samples/getAllExperimentsInProject.php
@@ -0,0 +1,82 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+try
+{
+
+   if ($argc != 2) {
+		echo 'php getAllExperimentsInProject.php <project_ID>';
+	}
+
+	else {
+	    $projectExperiments = $airavataclient->getAllExperimentsInProject($argv[1]);
+   	  echo '# of project experiments = ' . sizeof($projectExperiments) . '         <br><br>';
+    	  var_dump($projectExperiments);
+   }
+
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/getAllUserExperiments.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAllUserExperiments.php b/samples/php-cli-samples/getAllUserExperiments.php
new file mode 100644
index 0000000..81e3685
--- /dev/null
+++ b/samples/php-cli-samples/getAllUserExperiments.php
@@ -0,0 +1,89 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+
+
+try
+{
+    if ($argc != 2)
+    {
+        echo 'php getAllUserExperiments.php <username>';
+    }
+    else
+    {
+        $userExperiments = $airavataclient->getAllUserExperiments($argv[1]);
+        echo '# of user experiments = ' . sizeof($userExperiments) . '     ';
+        var_dump($userExperiments);
+    }
+
+
+
+
+
+
+
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/getAllUserProjects.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAllUserProjects.php b/samples/php-cli-samples/getAllUserProjects.php
new file mode 100644
index 0000000..75d6dd4
--- /dev/null
+++ b/samples/php-cli-samples/getAllUserProjects.php
@@ -0,0 +1,83 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+
+
+try
+{
+    if ($argc != 2)
+    {
+        echo 'php getAllUserProjects.php <user>';
+    }
+    else
+    {
+        $userProjects = $airavataclient->getAllUserProjects($argv[1]);
+        echo '# of user projects = ' . sizeof($userProjects) . '       ';
+        var_dump($userProjects);
+    }
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/getExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getExperiment.php b/samples/php-cli-samples/getExperiment.php
new file mode 100644
index 0000000..48f84ea
--- /dev/null
+++ b/samples/php-cli-samples/getExperiment.php
@@ -0,0 +1,110 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+use Thrift\Exception\TTransportException;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+if (count($argv) < 2) {
+    exit("Please provide an experimentID. \n");
+}
+
+$expId = $argv[1];
+
+
+$experiment = get_experiment($expId);
+
+var_dump($experiment);
+
+
+
+
+
+
+$transport->close();
+
+
+/**
+ * Get the experiment with the given ID
+ * @param $expId
+ * @return null
+ */
+function get_experiment($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        return $airavataclient->getExperiment($expId);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException!<br><br>' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!<br><br>' . $tte->getMessage();
+    }
+    catch (\Exception $e)
+    {
+        echo 'Exception!<br><br>' . $e->getMessage();
+    }
+
+}
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/getExperimentOutputs.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getExperimentOutputs.php b/samples/php-cli-samples/getExperimentOutputs.php
new file mode 100644
index 0000000..697c3a0
--- /dev/null
+++ b/samples/php-cli-samples/getExperimentOutputs.php
@@ -0,0 +1,116 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+use Thrift\Exception\TTransportException;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+
+if ($argc != 2)
+{
+    exit("php getExperimentOutputs.php <experiment_id> \n");
+}
+
+$expId = $argv[1];
+
+$outputs = get_experiment_outputs($expId);
+
+foreach ($outputs as $output)
+{
+    echo "$output->type: $output->value      <br><br>";
+}
+
+var_dump($outputs);
+
+
+
+
+
+
+$transport->close();
+
+
+/**
+ * Get the experiment with the given ID
+ * @param $expId
+ * @return null
+ */
+function get_experiment_outputs($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        return $airavataclient->getExperimentOutputs($expId);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException!<br><br>' . $ase->getMessage();
+    }
+    catch (TTransportException $tte)
+    {
+        echo 'TTransportException!<br><br>' . $tte->getMessage();
+    }
+    catch (\Exception $e)
+    {
+        echo 'Exception!<br><br>' . $e->getMessage();
+    }
+
+}
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/getExperimentStatus.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getExperimentStatus.php b/samples/php-cli-samples/getExperimentStatus.php
new file mode 100644
index 0000000..77b7feb
--- /dev/null
+++ b/samples/php-cli-samples/getExperimentStatus.php
@@ -0,0 +1,100 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Airavata\Model\Workspace\Experiment\ExperimentState;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+
+if (count($argv) < 2) {
+    exit("Please provide an experimentID. \n");
+}
+
+$expId = $argv[1];   
+
+$experimentStatusString = get_experiment_status($expId);
+echo "experiment status = " . $experimentStatusString . "       \n<br>";
+
+
+$transport->close();
+
+
+/**
+ * Get a string containing the given experiment's status
+ * @param $expId
+ * @return mixed
+ */
+function get_experiment_status($expId)
+{
+    global $airavataclient;
+
+    try
+    {
+        $experimentStatus = $airavataclient->getExperimentStatus($expId);
+    }
+    catch (InvalidRequestException $ire)
+    {
+        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
+    }
+    catch (ExperimentNotFoundException $enf)
+    {
+        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
+    }
+    catch (AiravataClientException $ace)
+    {
+        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
+    }
+    catch (AiravataSystemException $ase)
+    {
+        echo 'AiravataSystemException!<br><br>' . $ase->getMessage();
+    }
+    catch (\Exception $e)
+    {
+        echo 'Exception!<br><br>' . $e->getMessage();
+    }
+
+    return ExperimentState::$__names[$experimentStatus->experimentState];
+}
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/launchExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/launchExperiment.php b/samples/php-cli-samples/launchExperiment.php
new file mode 100755
index 0000000..fecbf2f
--- /dev/null
+++ b/samples/php-cli-samples/launchExperiment.php
@@ -0,0 +1,86 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+require_once '../lib/AiravataClientFactory.php';
+
+use Airavata\API\Error\AiravataClientException;
+use Airavata\API\Error\AiravataSystemException;
+use Airavata\API\Error\ExperimentNotFoundException;
+use Airavata\API\Error\InvalidRequestException;
+use Airavata\Client\AiravataClientFactory;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TBufferedTransport;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+
+use Airavata\Model\Workspace\Project;
+use Airavata\Model\Workspace\Experiment\Experiment;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+$transport->open();
+$airavataclient = new AiravataClient($protocol);
+
+try
+{
+   if (count($argv) < 2) {
+	exit("Please provide an experimentID. \n");
+   }
+
+   $expId = $argv[1];	
+   $airavataclient->launchExperiment($expId, 'airavataToken');
+   echo "Experiment $expId is launched.";
+}
+catch (InvalidRequestException $ire)
+{
+    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
+}
+catch (AiravataClientException $ace)
+{
+    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
+}
+catch (AiravataSystemException $ase)
+{
+    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
+}
+catch (ExperimentNotFoundException $enf)
+{
+    print 'Experiment Not Found Exception: ' . $enf->getMessage()."\n";
+}
+
+
+
+
+
+
+$transport->close();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/list-application-interfaces.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/list-application-interfaces.php b/samples/php-cli-samples/list-application-interfaces.php
new file mode 100644
index 0000000..7d7c9ce
--- /dev/null
+++ b/samples/php-cli-samples/list-application-interfaces.php
@@ -0,0 +1,76 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/AppCatalog/ApplicationCatalogAPI.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
+use Airavata\Model\Workspace\Experiment\DataObjectType;
+use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\ComputeResourceDescription;
+use Airavata\Model\ApplicationInterface;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+use Airavata\API\AppCatalog\ApplicationCatalogAPIClient;
+use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\AppCatalog\JobSubmissionProtocol;
+use Airavata\Model\AppCatalog\DataMovementProtocol;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['APP_CATALOG_SERVER'], $airavataconfig['APP_CATALOG_PORT']);
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+
+$airavataclient = new ApplicationCatalogAPIClient($protocol);
+$transport->open();
+
+echo "Airavata Server Version is: " . $airavataclient->getAPIVersion() . "\n";
+
+echo "Listing Application Interfaces.... "."\n";
+
+$id_list = $airavataclient->listApplicationInterfaceIds();
+
+foreach($id_list as $id){
+	echo "Application Interface Id : ".$id."\n";
+	$app_interface = $airavataclient->getApplicationInterface($id);
+	echo "\t"."Interface Data : " . $app_interface->applicationInterfaceData."\n";
+	echo "\t".count($app_interface->applicationDeployments)." Deployments"."\n";
+	foreach($app_interface->applicationDeployments as $deployment){
+		echo "\t\t"."Compute Resource : ".$deployment->computeResourceDescription->hostName."\n";
+		echo "\t\t\t"."Application Data".$deployment->applicationDescriptor->applicationDescriptorData."\n";
+	}
+}
+
+//$compute_resource = new \ComputeResourceDescription();
+//$compute_resource->hostName="localhost";
+//$compute_resource->hostAliases=array("localhost");
+//$compute_resource->ipAddresses=array("127.0.0.1");
+
+//Create a Experiment
+$transport->close();
+
+?>
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/samples/php-cli-samples/list-compute-resources.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/list-compute-resources.php b/samples/php-cli-samples/list-compute-resources.php
new file mode 100644
index 0000000..cc5c790
--- /dev/null
+++ b/samples/php-cli-samples/list-compute-resources.php
@@ -0,0 +1,101 @@
+<?php
+namespace Airavata\Client\Samples;
+
+$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
+require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
+
+$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/AppCatalog/ApplicationCatalogAPI.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/Types.php';
+require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
+
+use Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling;
+use Airavata\Model\Workspace\Experiment\DataObjectType;
+use Airavata\Model\Workspace\Experiment\UserConfigurationData;
+use Airavata\Model\ComputeResourceDescription;
+use Thrift\Protocol\TBinaryProtocol;
+use Thrift\Transport\TSocket;
+use Airavata\API\AiravataClient;
+use Airavata\API\AppCatalog\ApplicationCatalogAPIClient;
+use Airavata\Model\Workspace\Experiment\Experiment;
+use Airavata\Model\AppCatalog\JobSubmissionProtocol;
+use Airavata\Model\AppCatalog\DataMovementProtocol;
+use Airavata\Model\AppCatalog\ResourceJobManager;
+
+$airavataconfig = parse_ini_file("airavata-client-properties.ini");
+
+$transport = new TSocket($airavataconfig['APP_CATALOG_SERVER'], $airavataconfig['APP_CATALOG_PORT']);
+echo $airavataconfig['AIRAVATA_TIMEOUT']."\n";
+$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
+
+$protocol = new TBinaryProtocol($transport);
+
+$airavataclient = new ApplicationCatalogAPIClient($protocol);
+$transport->open();
+
+echo "Airavata Server Version is: " . $airavataclient->getAPIVersion() . "\n";
+
+echo "Listing Compute Resources.... "."\n";
+
+$id_list = $airavataclient->listComputeResourceDescriptions();
+
+foreach($id_list as $id){
+	echo "Compute Resource Id : ".$id."\n";
+	$compute_resource = $airavataclient->getComputeResourceDescription($id);
+	echo "\t"."Host name : " . $compute_resource->hostName ."\n";
+	echo "\t"."Aliases : " . implode(",",array_keys($compute_resource->hostAliases)) ."\n";
+	echo "\t"."Ip addresses : " . implode(",",array_keys($compute_resource->ipAddresses)) ."\n";
+	echo "\t".count($compute_resource->jobSubmissionProtocols)." Job Submission Protocols Supported"."\n";
+	foreach($compute_resource->jobSubmissionProtocols as $protocol_data_id => $protocol_type){
+		echo "\t\t".$protocol_data_id."[".JobSubmissionProtocol::$__names[$protocol_type]. "]"."\n";
+		switch ($protocol_type){
+			case JobSubmissionProtocol::GRAM:
+				$globus_data=$airavataclient->getGlobusJobSubmissionProtocol($protocol_data_id);
+				echo "\t\t\tGate Keeper Endpoint(s) : ".implode(",",($globus_data->globusGateKeeperEndPoint))."\n";
+				break;
+			case JobSubmissionProtocol::GSISSH:
+				$gsissh_data=$airavataclient->getGSISSHJobSubmissionProtocol($protocol_data_id);
+				echo "\t\t\tResource Job Manager : ".ResourceJobManager::$__names[$gsissh_data->resourceJobManager]."\n";
+				echo "\t\t\tInstalled Path : ".$gsissh_data->installedPath."\n";
+				echo "\t\t\tSSH port : ".$gsissh_data->sshPort."\n";
+				echo "\t\t\tMonitor Mode : ".$gsissh_data->monitorMode."\n";
+				break;
+		}
+	}
+	echo "\t".count($compute_resource->dataMovementProtocols)." Data Movement Protocols Supported"."\n";
+	foreach($compute_resource->dataMovementProtocols as $protocol_data_id => $protocol_type){
+		echo "\t\t".$protocol_data_id."[".DataMovementProtocol::$__names[$protocol_type] . "]"."\n";
+			switch ($protocol_type){
+			case DataMovementProtocol::GridFTP:
+				$gridftp_data=$airavataclient->getGridFTPDataMovementProtocol($protocol_data_id);
+				echo "\t\t\tGrid FTP Endpoint(s) : ".implode(",",($gridftp_data->gridFTPEndPoint))."\n";
+				break;
+		}
+	}
+}
+
+//$compute_resource = new \ComputeResourceDescription();
+//$compute_resource->hostName="localhost";
+//$compute_resource->hostAliases=array("localhost");
+//$compute_resource->ipAddresses=array("127.0.0.1");
+
+//Create a Experiment
+$transport->close();
+
+?>
+
+


[07/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TCompactProtocol.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TCompactProtocol.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TCompactProtocol.php
deleted file mode 100644
index e637a59..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TCompactProtocol.php
+++ /dev/null
@@ -1,669 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Protocol\TProtocol;
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Compact implementation of the Thrift protocol.
- *
- */
-class TCompactProtocol extends TProtocol {
-
-  const COMPACT_STOP = 0x00;
-  const COMPACT_TRUE = 0x01;
-  const COMPACT_FALSE = 0x02;
-  const COMPACT_BYTE = 0x03;
-  const COMPACT_I16 = 0x04;
-  const COMPACT_I32 = 0x05;
-  const COMPACT_I64 = 0x06;
-  const COMPACT_DOUBLE = 0x07;
-  const COMPACT_BINARY = 0x08;
-  const COMPACT_LIST = 0x09;
-  const COMPACT_SET = 0x0A;
-  const COMPACT_MAP = 0x0B;
-  const COMPACT_STRUCT = 0x0C;
-
-  const STATE_CLEAR = 0;
-  const STATE_FIELD_WRITE = 1;
-  const STATE_VALUE_WRITE = 2;
-  const STATE_CONTAINER_WRITE = 3;
-  const STATE_BOOL_WRITE = 4;
-  const STATE_FIELD_READ = 5;
-  const STATE_CONTAINER_READ = 6;
-  const STATE_VALUE_READ = 7;
-  const STATE_BOOL_READ = 8;
-
-  const VERSION_MASK = 0x1f;
-  const VERSION = 1;
-  const PROTOCOL_ID = 0x82;
-  const TYPE_MASK = 0xe0;
-  const TYPE_SHIFT_AMOUNT = 5;
-
-  protected static $ctypes = array(
-    TType::STOP => TCompactProtocol::COMPACT_STOP,
-    TType::BOOL => TCompactProtocol::COMPACT_TRUE, // used for collection
-    TType::BYTE => TCompactProtocol::COMPACT_BYTE,
-    TType::I16 => TCompactProtocol::COMPACT_I16,
-    TType::I32 => TCompactProtocol::COMPACT_I32,
-    TType::I64 => TCompactProtocol::COMPACT_I64,
-    TType::DOUBLE => TCompactProtocol::COMPACT_DOUBLE,
-    TType::STRING => TCompactProtocol::COMPACT_BINARY,
-    TType::STRUCT => TCompactProtocol::COMPACT_STRUCT,
-    TType::LST => TCompactProtocol::COMPACT_LIST,
-    TType::SET => TCompactProtocol::COMPACT_SET,
-    TType::MAP => TCompactProtocol::COMPACT_MAP,
-  );
-
-  protected static $ttypes = array(
-    TCompactProtocol::COMPACT_STOP => TType::STOP ,
-    TCompactProtocol::COMPACT_TRUE => TType::BOOL, // used for collection
-    TCompactProtocol::COMPACT_FALSE => TType::BOOL,
-    TCompactProtocol::COMPACT_BYTE => TType::BYTE,
-    TCompactProtocol::COMPACT_I16 => TType::I16,
-    TCompactProtocol::COMPACT_I32 => TType::I32,
-    TCompactProtocol::COMPACT_I64 => TType::I64,
-    TCompactProtocol::COMPACT_DOUBLE => TType::DOUBLE,
-    TCompactProtocol::COMPACT_BINARY => TType::STRING,
-    TCompactProtocol::COMPACT_STRUCT => TType::STRUCT,
-    TCompactProtocol::COMPACT_LIST => TType::LST,
-    TCompactProtocol::COMPACT_SET => TType::SET,
-    TCompactProtocol::COMPACT_MAP => TType::MAP,
-  );
-
-  protected $state = TCompactProtocol::STATE_CLEAR;
-  protected $lastFid = 0;
-  protected $boolFid = null;
-  protected $boolValue = null;
-  protected $structs = array();
-  protected $containers = array();
-
-  // Some varint / zigzag helper methods
-  public function toZigZag($n, $bits) {
-    return ($n << 1) ^ ($n >> ($bits - 1));
-  }
-
-  public function fromZigZag($n) {
-    return ($n >> 1) ^ -($n & 1);
-  }
-
-  public function getVarint($data) {
-    $out = "";
-    while (true) {
-      if (($data & ~0x7f) === 0) {
-        $out .= chr($data);
-        break;
-      } else {
-        $out .= chr(($data & 0xff) | 0x80);
-        $data = $data >> 7;
-      }
-    }
-    return $out;
-  }
-
-  public function writeVarint($data) {
-    $out = $this->getVarint($data);
-    $result = TStringFuncFactory::create()->strlen($out);
-    $this->trans_->write($out, $result);
-    return $result;
-  }
-
-  public function readVarint(&$result) {
-    $idx = 0;
-    $shift = 0;
-    $result = 0;
-    while (true) {
-      $x = $this->trans_->readAll(1);
-      $arr = unpack('C', $x);
-      $byte = $arr[1];
-      $idx += 1;
-      $result |= ($byte & 0x7f) << $shift;
-      if (($byte >> 7) === 0) {
-        return $idx;
-      }
-      $shift += 7;
-    }
-
-    return $idx;
-  }
-
-  public function __construct($trans) {
-    parent::__construct($trans);
-  }
-
-  public function writeMessageBegin($name, $type, $seqid) {
-    $written =
-      $this->writeUByte(TCompactProtocol::PROTOCOL_ID) +
-      $this->writeUByte(TCompactProtocol::VERSION |
-                        ($type << TCompactProtocol::TYPE_SHIFT_AMOUNT)) +
-      $this->writeVarint($seqid) +
-      $this->writeString($name);
-    $this->state = TCompactProtocol::STATE_VALUE_WRITE;
-    return $written;
-  }
-
-  public function writeMessageEnd() {
-    $this->state = TCompactProtocol::STATE_CLEAR;
-    return 0;
-  }
-
-  public function writeStructBegin($name) {
-    $this->structs[] = array($this->state, $this->lastFid);
-    $this->state = TCompactProtocol::STATE_FIELD_WRITE;
-    $this->lastFid = 0;
-    return 0;
-  }
-
-  public function writeStructEnd() {
-    $old_values = array_pop($this->structs);
-    $this->state = $old_values[0];
-    $this->lastFid = $old_values[1];
-    return 0;
-  }
-
-  public function writeFieldStop() {
-    return $this->writeByte(0);
-  }
-
-  public function writeFieldHeader($type, $fid) {
-    $written = 0;
-    $delta = $fid - $this->lastFid;
-    if (0 < $delta && $delta <= 15) {
-      $written = $this->writeUByte(($delta << 4) | $type);
-    } else {
-      $written = $this->writeByte($type) +
-        $this->writeI16($fid);
-    }
-    $this->lastFid = $fid;
-    return $written;
-  }
-
-  public function writeFieldBegin($field_name, $field_type, $field_id) {
-    if ($field_type == TTYPE::BOOL) {
-      $this->state = TCompactProtocol::STATE_BOOL_WRITE;
-      $this->boolFid = $field_id;
-      return 0;
-    } else {
-      $this->state = TCompactProtocol::STATE_VALUE_WRITE;
-      return $this->writeFieldHeader(self::$ctypes[$field_type], $field_id);
-    }
-  }
-
-  public function writeFieldEnd() {
-    $this->state = TCompactProtocol::STATE_FIELD_WRITE;
-    return 0;
-  }
-
-  public function writeCollectionBegin($etype, $size) {
-    $written = 0;
-    if ($size <= 14) {
-      $written = $this->writeUByte($size << 4 |
-                                    self::$ctypes[$etype]);
-    } else {
-      $written = $this->writeUByte(0xf0 |
-                                   self::$ctypes[$etype]) +
-        $this->writeVarint($size);
-    }
-    $this->containers[] = $this->state;
-    $this->state = TCompactProtocol::STATE_CONTAINER_WRITE;
-
-    return $written;
-  }
-
-  public function writeMapBegin($key_type, $val_type, $size) {
-    $written = 0;
-    if ($size == 0) {
-      $written = $this->writeByte(0);
-    } else {
-      $written = $this->writeVarint($size) +
-        $this->writeUByte(self::$ctypes[$key_type] << 4 |
-                          self::$ctypes[$val_type]);
-    }
-    $this->containers[] = $this->state;
-    return $written;
-  }
-
-  public function writeCollectionEnd() {
-    $this->state = array_pop($this->containers);
-    return 0;
-  }
-
-  public function writeMapEnd() {
-    return $this->writeCollectionEnd();
-  }
-
-  public function writeListBegin($elem_type, $size) {
-    return $this->writeCollectionBegin($elem_type, $size);
-  }
-
-  public function writeListEnd() {
-    return $this->writeCollectionEnd();
-  }
-
-  public function writeSetBegin($elem_type, $size) {
-    return $this->writeCollectionBegin($elem_type, $size);
-  }
-
-  public function writeSetEnd() {
-    return $this->writeCollectionEnd();
-  }
-
-  public function writeBool($value) {
-    if ($this->state == TCompactProtocol::STATE_BOOL_WRITE) {
-      $ctype = TCompactProtocol::COMPACT_FALSE;
-      if ($value) {
-        $ctype = TCompactProtocol::COMPACT_TRUE;
-      }
-      return $this->writeFieldHeader($ctype, $this->boolFid);
-    } else if ($this->state == TCompactProtocol::STATE_CONTAINER_WRITE) {
-      return $this->writeByte($value ? 1 : 0);
-    } else {
-      throw new TProtocolException('Invalid state in compact protocol');
-    }
-  }
-
-  public function writeByte($value) {
-    $data = pack('c', $value);
-    $this->trans_->write($data, 1);
-    return 1;
-  }
-
-  public function writeUByte($byte) {
-    $this->trans_->write(pack('C', $byte), 1);
-    return 1;
-  }
-
-  public function writeI16($value) {
-    $thing = $this->toZigZag($value, 16);
-    return $this->writeVarint($thing);
-  }
-
-  public function writeI32($value) {
-    $thing = $this->toZigZag($value, 32);
-    return $this->writeVarint($thing);
-  }
-
-  public function writeDouble($value) {
-    $data = pack('d', $value);
-    $this->trans_->write(strrev($data), 8);
-    return 8;
-  }
-
-  public function writeString($value) {
-    $len = TStringFuncFactory::create()->strlen($value);
-    $result = $this->writeVarint($len);
-    if ($len) {
-      $this->trans_->write($value, $len);
-    }
-    return $result + $len;
-  }
-
-  public function readFieldBegin(&$name, &$field_type, &$field_id) {
-    $result = $this->readUByte($field_type);
-
-    if (($field_type & 0x0f) == TType::STOP) {
-      $field_id = 0;
-      return $result;
-    }
-    $delta = $field_type >> 4;
-    if ($delta == 0) {
-      $result += $this->readI16($field_id);
-    } else {
-      $field_id = $this->lastFid + $delta;
-    }
-    $this->lastFid = $field_id;
-    $field_type = $this->getTType($field_type & 0x0f);
-    if ($field_type == TCompactProtocol::COMPACT_TRUE) {
-      $this->state = TCompactProtocol::STATE_BOOL_READ;
-      $this->boolValue = true;
-    } else if ($field_type == TCompactProtocol::COMPACT_FALSE) {
-      $this->state = TCompactProtocol::STATE_BOOL_READ;
-      $this->boolValue = false;
-    } else {
-      $this->state = TCompactProtocol::STATE_VALUE_READ;
-    }
-    return $result;
-  }
-
-  public function readFieldEnd() {
-    $this->state = TCompactProtocol::STATE_FIELD_READ;
-    return 0;
-  }
-
-  public function readUByte(&$value) {
-    $data = $this->trans_->readAll(1);
-    $arr = unpack('C', $data);
-    $value = $arr[1];
-    return 1;
-  }
-
-  public function readByte(&$value) {
-    $data = $this->trans_->readAll(1);
-    $arr = unpack('c', $data);
-    $value = $arr[1];
-    return 1;
-  }
-
-  public function readZigZag(&$value) {
-    $result = $this->readVarint($value);
-    $value = $this->fromZigZag($value);
-    return $result;
-  }
-
-  public function readMessageBegin(&$name, &$type, &$seqid) {
-    $protoId = 0;
-    $result = $this->readUByte($protoId);
-    if ($protoId != TCompactProtocol::PROTOCOL_ID) {
-      throw new TProtocolException('Bad protocol id in TCompact message');
-    }
-    $verType = 0;
-    $result += $this->readUByte($verType);
-    $type = ($verType & TCompactProtocol::TYPE_MASK) >>
-      TCompactProtocol::TYPE_SHIFT_AMOUNT;
-    $version = $verType & TCompactProtocol::VERSION_MASK;
-    if ($version != TCompactProtocol::VERSION) {
-      throw new TProtocolException('Bad version in TCompact message');
-    }
-    $result += $this->readVarint($seqId);
-    $name += $this->readString($name);
-
-    return $result;
-  }
-
-  public function readMessageEnd() {
-    return 0;
-  }
-
-  public function readStructBegin(&$name) {
-    $name = ''; // unused
-    $this->structs[] = array($this->state, $this->lastFid);
-    $this->state = TCompactProtocol::STATE_FIELD_READ;
-    $this->lastFid = 0;
-    return 0;
-  }
-
-  public function readStructEnd() {
-    $last = array_pop($this->structs);
-    $this->state = $last[0];
-    $this->lastFid = $last[1];
-    return 0;
-  }
-
-  public function readCollectionBegin(&$type, &$size) {
-    $sizeType = 0;
-    $result = $this->readUByte($sizeType);
-    $size = $sizeType >> 4;
-    $type = $this->getTType($sizeType);
-    if ($size == 15) {
-      $result += $this->readVarint($size);
-    }
-    $this->containers[] = $this->state;
-    $this->state = TCompactProtocol::STATE_CONTAINER_READ;
-
-    return $result;
-  }
-
-  public function readMapBegin(&$key_type, &$val_type, &$size) {
-    $result = $this->readVarint($size);
-    $types = 0;
-    if ($size > 0) {
-      $result += $this->readUByte($types);
-    }
-    $val_type = $this->getTType($types);
-    $key_type = $this->getTType($types >> 4);
-    $this->containers[] = $this->state;
-    $this->state = TCompactProtocol::STATE_CONTAINER_READ;
-
-    return $result;
-  }
-
-  public function readCollectionEnd() {
-    $this->state = array_pop($this->containers);
-    return 0;
-  }
-
-  public function readMapEnd() {
-    return $this->readCollectionEnd();
-  }
-
-  public function readListBegin(&$elem_type, &$size) {
-    return $this->readCollectionBegin($elem_type, $size);
-  }
-
-  public function readListEnd() {
-    return $this->readCollectionEnd();
-  }
-
-  public function readSetBegin(&$elem_type, &$size) {
-    return $this->readCollectionBegin($elem_type, $size);
-  }
-
-  public function readSetEnd() {
-    return $this->readCollectionEnd();
-  }
-
-  public function readBool(&$value) {
-    if ($this->state == TCompactProtocol::STATE_BOOL_READ) {
-      $value = $this->boolValue;
-      return 0;
-    } else if ($this->state == TCompactProtocol::STATE_CONTAINER_READ) {
-      return $this->readByte($value);
-    } else {
-      throw new TProtocolException('Invalid state in compact protocol');
-    }
-  }
-
-  public function readI16(&$value) {
-    return $this->readZigZag($value);
-  }
-
-  public function readI32(&$value) {
-    return $this->readZigZag($value);
-  }
-
-  public function readDouble(&$value) {
-    $data = strrev($this->trans_->readAll(8));
-    $arr = unpack('d', $data);
-    $value = $arr[1];
-    return 8;
-  }
-
-  public function readString(&$value) {
-    $result = $this->readVarint($len);
-    if ($len) {
-      $value = $this->trans_->readAll($len);
-    } else {
-      $value = '';
-    }
-    return $result + $len;
-  }
-
-  public function getTType($byte) {
-    return self::$ttypes[$byte & 0x0f];
-  }
-
-  // If we are on a 32bit architecture we have to explicitly deal with
-  // 64-bit twos-complement arithmetic since PHP wants to treat all ints
-  // as signed and any int over 2^31 - 1 as a float
-
-  // Read and write I64 as two 32 bit numbers $hi and $lo
-
-  public function readI64(&$value) {
-    // Read varint from wire
-    $hi = 0;
-    $lo = 0;
-
-    $idx = 0;
-    $shift = 0;
-
-    while (true) {
-      $x = $this->trans_->readAll(1);
-      $arr = unpack('C', $x);
-      $byte = $arr[1];
-      $idx += 1;
-      if ($shift < 32) {
-        $lo |= (($byte & 0x7f) << $shift) &
-          0x00000000ffffffff;
-      }
-      // Shift hi and lo together.
-      if ($shift >= 32) {
-        $hi |= (($byte & 0x7f) << ($shift - 32));
-      } else if ($shift > 25) {
-        $hi |= (($byte & 0x7f) >> ($shift - 25));
-      }
-      if (($byte >> 7) === 0) {
-        break;
-      }
-      $shift += 7;
-    }
-
-    // Now, unzig it.
-    $xorer = 0;
-    if ($lo & 1) {
-      $xorer = 0xffffffff;
-    }
-    $lo = ($lo >> 1) & 0x7fffffff;
-    $lo = $lo | (($hi & 1) << 31);
-    $hi = ($hi >> 1) ^ $xorer;
-    $lo = $lo ^ $xorer;
-
-    // Now put $hi and $lo back together
-    if (true) {
-      $isNeg = $hi  < 0;
-
-      // Check for a negative
-      if ($isNeg) {
-        $hi = ~$hi & (int)0xffffffff;
-        $lo = ~$lo & (int)0xffffffff;
-
-        if ($lo == (int)0xffffffff) {
-          $hi++;
-          $lo = 0;
-        } else {
-          $lo++;
-        }
-      }
-
-      // Force 32bit words in excess of 2G to be positive - we deal with sign
-      // explicitly below
-
-      if ($hi & (int)0x80000000) {
-        $hi &= (int)0x7fffffff;
-        $hi += 0x80000000;
-      }
-
-      if ($lo & (int)0x80000000) {
-        $lo &= (int)0x7fffffff;
-        $lo += 0x80000000;
-      }
-
-      $value = $hi * 4294967296 + $lo;
-
-      if ($isNeg) {
-        $value = 0 - $value;
-      }
-    } else {
-
-      // Upcast negatives in LSB bit
-      if ($arr[2] & 0x80000000) {
-        $arr[2] = $arr[2] & 0xffffffff;
-      }
-
-      // Check for a negative
-      if ($arr[1] & 0x80000000) {
-        $arr[1] = $arr[1] & 0xffffffff;
-        $arr[1] = $arr[1] ^ 0xffffffff;
-        $arr[2] = $arr[2] ^ 0xffffffff;
-        $value = 0 - $arr[1] * 4294967296 - $arr[2] - 1;
-      } else {
-        $value = $arr[1] * 4294967296 + $arr[2];
-      }
-    }
-
-    return $idx;
-  }
-
-  public function writeI64($value) {
-    // If we are in an I32 range, use the easy method below.
-    if (($value > 4294967296) || ($value < -4294967296)) {
-      // Convert $value to $hi and $lo
-      $neg = $value < 0;
-
-      if ($neg) {
-        $value *= -1;
-      }
-
-      $hi = (int)$value >> 32;
-      $lo = (int)$value & 0xffffffff;
-
-      if ($neg) {
-        $hi = ~$hi;
-        $lo = ~$lo;
-        if (($lo & (int)0xffffffff) == (int)0xffffffff) {
-          $lo = 0;
-          $hi++;
-        } else {
-          $lo++;
-        }
-      }
-
-      // Now do the zigging and zagging.
-      $xorer = 0;
-      if ($neg) {
-        $xorer = 0xffffffff;
-      }
-      $lowbit = ($lo >> 31) & 1;
-      $hi = ($hi << 1) | $lowbit;
-      $lo = ($lo << 1);
-      $lo = ($lo ^ $xorer) & 0xffffffff;
-      $hi = ($hi ^ $xorer) & 0xffffffff;
-
-      // now write out the varint, ensuring we shift both hi and lo
-      $out = "";
-      while (true) {
-        if (($lo & ~0x7f) === 0 &&
-           $hi === 0) {
-          $out .= chr($lo);
-          break;
-        } else {
-          $out .= chr(($lo & 0xff) | 0x80);
-          $lo = $lo >> 7;
-          $lo = $lo | ($hi << 25);
-          $hi = $hi >> 7;
-          // Right shift carries sign, but we don't want it to.
-          $hi = $hi & (127 << 25);
-        }
-      }
-
-      $ret = TStringFuncFactory::create()->strlen($out);
-      $this->trans_->write($out, $ret);
-
-      return $ret;
-    } else {
-      return $this->writeVarint($this->toZigZag($value, 64));
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TJSONProtocol.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TJSONProtocol.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TJSONProtocol.php
deleted file mode 100644
index 3d39583..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TJSONProtocol.php
+++ /dev/null
@@ -1,694 +0,0 @@
-<?php
-
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Protocol\TProtocol;
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\JSON\BaseContext;
-use Thrift\Protocol\JSON\LookaheadReader;
-use Thrift\Protocol\JSON\PairContext;
-use Thrift\Protocol\JSON\ListContext;
-
-/**
- * JSON implementation of thrift protocol, ported from Java.
- */
-class TJSONProtocol extends TProtocol
-{
-    const COMMA = ',';
-    const COLON = ':';
-    const LBRACE = '{';
-    const RBRACE = '}';
-    const LBRACKET = '[';
-    const RBRACKET = ']';
-    const QUOTE = '"';
-    const BACKSLASH = '\\';
-    const ZERO = '0';
-    const ESCSEQ = '\\';
-    const DOUBLEESC = '__DOUBLE_ESCAPE_SEQUENCE__';
-
-    const VERSION = 1;
-
-    public static $JSON_CHAR_TABLE = array(
-        /*  0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F */
-        0, 0, 0, 0, 0, 0, 0, 0, 'b', 't', 'n', 0, 'f', 'r', 0, 0, // 0
-        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1
-        1, 1, '"', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 2
-    );
-
-    public static $ESCAPE_CHARS = array('"', '\\', "b", "f", "n", "r", "t");
-
-    public static $ESCAPE_CHAR_VALS = array(
-        '"', '\\', "\x08", "\f", "\n", "\r", "\t",
-    );
-
-    const NAME_BOOL = "tf";
-    const NAME_BYTE = "i8";
-    const NAME_I16 = "i16";
-    const NAME_I32 = "i32";
-    const NAME_I64 = "i64";
-    const NAME_DOUBLE = "dbl";
-    const NAME_STRUCT = "rec";
-    const NAME_STRING = "str";
-    const NAME_MAP = "map";
-    const NAME_LIST = "lst";
-    const NAME_SET = "set";
-
-    private function getTypeNameForTypeID($typeID)
-    {
-        switch ($typeID) {
-            case TType::BOOL:
-                return self::NAME_BOOL;
-            case TType::BYTE:
-                return self::NAME_BYTE;
-            case TType::I16:
-                return self::NAME_I16;
-            case TType::I32:
-                return self::NAME_I32;
-            case TType::I64:
-                return self::NAME_I64;
-            case TType::DOUBLE:
-                return self::NAME_DOUBLE;
-            case TType::STRING:
-                return self::NAME_STRING;
-            case TType::STRUCT:
-                return self::NAME_STRUCT;
-            case TType::MAP:
-                return self::NAME_MAP;
-            case TType::SET:
-                return self::NAME_SET;
-            case TType::LST:
-                return self::NAME_LIST;
-            default:
-                throw new TProtocolException("Unrecognized type", TProtocolException::UNKNOWN);
-        }
-    }
-
-    private function getTypeIDForTypeName($name)
-    {
-        $result = TType::STOP;
-
-        if (strlen($name) > 1) {
-            switch (substr($name, 0, 1)) {
-                case 'd':
-                    $result = TType::DOUBLE;
-                    break;
-                case 'i':
-                    switch (substr($name, 1, 1)) {
-                        case '8':
-                            $result = TType::BYTE;
-                            break;
-                        case '1':
-                            $result = TType::I16;
-                            break;
-                        case '3':
-                            $result = TType::I32;
-                            break;
-                        case '6':
-                            $result = TType::I64;
-                            break;
-                    }
-                    break;
-                case 'l':
-                    $result = TType::LST;
-                    break;
-                case 'm':
-                    $result = TType::MAP;
-                    break;
-                case 'r':
-                    $result = TType::STRUCT;
-                    break;
-                case 's':
-                    if (substr($name, 1, 1) == 't') {
-                        $result = TType::STRING;
-                    }
-                    else if (substr($name, 1, 1) == 'e') {
-                        $result = TType::SET;
-                    }
-                    break;
-                case 't':
-                    $result = TType::BOOL;
-                    break;
-            }
-        }
-        if ($result == TType::STOP) {
-            throw new TProtocolException("Unrecognized type", TProtocolException::INVALID_DATA);
-        }
-        return $result;
-    }
-
-    public $contextStack_ = array();
-    public $context_;
-    public $reader_;
-
-    private function pushContext($c) {
-        array_push($this->contextStack_, $this->context_);
-        $this->context_ = $c;
-    }
-
-    private function popContext() {
-        $this->context_ = array_pop($this->contextStack_);
-    }
-
-    public function __construct($trans) {
-        parent::__construct($trans);
-        $this->context_ = new BaseContext();
-        $this->reader_ = new LookaheadReader($this);
-    }
-
-    public function reset() {
-        $this->contextStack_ = array();
-        $this->context_ = new BaseContext();
-        $this->reader_ = new LookaheadReader($this);
-    }
-
-    private $tmpbuf_ = array(4);
-
-    public function readJSONSyntaxChar($b) {
-        $ch = $this->reader_->read();
-
-        if (substr($ch, 0, 1) != $b) {
-            throw new TProtocolException("Unexpected character: " . $ch, TProtocolException::INVALID_DATA);
-        }
-    }
-
-    private function hexVal($s) {
-        for ($i = 0; $i < strlen($s); $i++) {
-            $ch = substr($s, $i, 1);
-
-            if (!($ch >= "a" && $ch <= "f") && !($ch >= "0" && $ch <= "9")) {
-                throw new TProtocolException("Expected hex character " . $ch, TProtocolException::INVALID_DATA);
-            }
-        }
-
-        return hexdec($s);
-    }
-
-    private function hexChar($val) {
-        return dechex($val);
-    }
-
-    private function writeJSONString($b) {
-        $this->context_->write();
-
-        if (is_numeric($b) && $this->context_->escapeNum()) {
-            $this->trans_->write(self::QUOTE);
-        }
-
-        $this->trans_->write(json_encode($b));
-
-        if (is_numeric($b) && $this->context_->escapeNum()) {
-            $this->trans_->write(self::QUOTE);
-        }
-    }
-
-    private function writeJSONInteger($num) {
-        $this->context_->write();
-
-        if ($this->context_->escapeNum()) {
-            $this->trans_->write(self::QUOTE);
-        }
-
-        $this->trans_->write($num);
-
-        if ($this->context_->escapeNum()) {
-            $this->trans_->write(self::QUOTE);
-        }
-    }
-
-    private function writeJSONDouble($num) {
-        $this->context_->write();
-
-        if ($this->context_->escapeNum()) {
-            $this->trans_->write(self::QUOTE);
-        }
-
-        $this->trans_->write(json_encode($num));
-
-        if ($this->context_->escapeNum()) {
-            $this->trans_->write(self::QUOTE);
-        }
-    }
-
-    private function writeJSONBase64($data) {
-        $this->context_->write();
-        $this->trans_->write(self::QUOTE);
-        $this->trans_->write(json_encode(base64_encode($data)));
-        $this->trans_->write(self::QUOTE);
-    }
-
-    private function writeJSONObjectStart() {
-      $this->context_->write();
-      $this->trans_->write(self::LBRACE);
-      $this->pushContext(new PairContext($this));
-    }
-
-    private function writeJSONObjectEnd() {
-      $this->popContext();
-      $this->trans_->write(self::RBRACE);
-    }
-
-    private function writeJSONArrayStart() {
-      $this->context_->write();
-      $this->trans_->write(self::LBRACKET);
-      $this->pushContext(new ListContext($this));
-    }
-
-    private function writeJSONArrayEnd() {
-      $this->popContext();
-      $this->trans_->write(self::RBRACKET);
-    }
-
-    private function readJSONString($skipContext) {
-      if (!$skipContext) {
-        $this->context_->read();
-      }
-
-      $jsonString = '';
-      $lastChar = NULL;
-      while (true) {
-        $ch = $this->reader_->read();
-        $jsonString .= $ch;
-        if ($ch == self::QUOTE &&
-          $lastChar !== NULL &&
-            $lastChar !== self::ESCSEQ) {
-          break;
-        }
-        if ($ch == self::ESCSEQ && $lastChar == self::ESCSEQ) {
-          $lastChar = self::DOUBLEESC;
-        } else {
-          $lastChar = $ch;
-        }
-      }
-      return json_decode($jsonString);
-    }
-
-    private function isJSONNumeric($b) {
-        switch ($b) {
-            case '+':
-            case '-':
-            case '.':
-            case '0':
-            case '1':
-            case '2':
-            case '3':
-            case '4':
-            case '5':
-            case '6':
-            case '7':
-            case '8':
-            case '9':
-            case 'E':
-            case 'e':
-              return true;
-            }
-        return false;
-    }
-
-    private function readJSONNumericChars() {
-        $strbld = array();
-
-        while (true) {
-            $ch = $this->reader_->peek();
-
-            if (!$this->isJSONNumeric($ch)) {
-                break;
-            }
-
-            $strbld[] = $this->reader_->read();
-        }
-
-        return implode("", $strbld);
-    }
-
-    private function readJSONInteger() {
-        $this->context_->read();
-
-        if ($this->context_->escapeNum()) {
-            $this->readJSONSyntaxChar(self::QUOTE);
-        }
-
-        $str = $this->readJSONNumericChars();
-
-        if ($this->context_->escapeNum()) {
-            $this->readJSONSyntaxChar(self::QUOTE);
-        }
-
-        if (!is_numeric($str)) {
-            throw new TProtocolException("Invalid data in numeric: " . $str, TProtocolException::INVALID_DATA);
-        }
-
-        return intval($str);
-    }
-
-    /**
-     * Identical to readJSONInteger but without the final cast.
-     * Needed for proper handling of i64 on 32 bit machines.  Why a
-     * separate function?  So we don't have to force the rest of the
-     * use cases through the extra conditional.
-     */
-    private function readJSONIntegerAsString() {
-        $this->context_->read();
-
-        if ($this->context_->escapeNum()) {
-            $this->readJSONSyntaxChar(self::QUOTE);
-        }
-
-        $str = $this->readJSONNumericChars();
-
-        if ($this->context_->escapeNum()) {
-            $this->readJSONSyntaxChar(self::QUOTE);
-        }
-
-        if (!is_numeric($str)) {
-            throw new TProtocolException("Invalid data in numeric: " . $str, TProtocolException::INVALID_DATA);
-        }
-
-        return $str;
-    }
-
-    private function readJSONDouble() {
-        $this->context_->read();
-
-        if (substr($this->reader_->peek(), 0, 1) == self::QUOTE) {
-            $arr = $this->readJSONString(true);
-
-            if ($arr == "NaN") {
-                return NAN;
-            } else if ($arr == "Infinity") {
-                return INF;
-            } else if (!$this->context_->escapeNum()) {
-                throw new TProtocolException("Numeric data unexpectedly quoted " . $arr,
-                                              TProtocolException::INVALID_DATA);
-            }
-
-            return floatval($arr);
-        } else {
-            if ($this->context_->escapeNum()) {
-                $this->readJSONSyntaxChar(self::QUOTE);
-            }
-
-            return floatval($this->readJSONNumericChars());
-        }
-    }
-
-    private function readJSONBase64() {
-        $arr = $this->readJSONString(false);
-        $data = base64_decode($arr, true);
-
-        if ($data === false) {
-            throw new TProtocolException("Invalid base64 data " . $arr, TProtocolException::INVALID_DATA);
-        }
-
-        return $data;
-    }
-
-    private function readJSONObjectStart() {
-        $this->context_->read();
-        $this->readJSONSyntaxChar(self::LBRACE);
-        $this->pushContext(new PairContext($this));
-    }
-
-    private function readJSONObjectEnd() {
-        $this->readJSONSyntaxChar(self::RBRACE);
-        $this->popContext();
-    }
-
-    private function readJSONArrayStart()
-    {
-        $this->context_->read();
-        $this->readJSONSyntaxChar(self::LBRACKET);
-        $this->pushContext(new ListContext($this));
-    }
-
-    private function readJSONArrayEnd() {
-        $this->readJSONSyntaxChar(self::RBRACKET);
-        $this->popContext();
-    }
-
-    /**
-     * Writes the message header
-     *
-     * @param string $name Function name
-     * @param int $type message type TMessageType::CALL or TMessageType::REPLY
-     * @param int $seqid The sequence id of this message
-     */
-    public function writeMessageBegin($name, $type, $seqid) {
-        $this->writeJSONArrayStart();
-        $this->writeJSONInteger(self::VERSION);
-        $this->writeJSONString($name);
-        $this->writeJSONInteger($type);
-        $this->writeJSONInteger($seqid);
-    }
-
-    /**
-     * Close the message
-     */
-    public function writeMessageEnd() {
-        $this->writeJSONArrayEnd();
-    }
-
-    /**
-     * Writes a struct header.
-     *
-     * @param string     $name Struct name
-     * @throws TException on write error
-     * @return int How many bytes written
-     */
-    public function writeStructBegin($name) {
-        $this->writeJSONObjectStart();
-    }
-
-    /**
-     * Close a struct.
-     *
-     * @throws TException on write error
-     * @return int How many bytes written
-     */
-    public function writeStructEnd() {
-        $this->writeJSONObjectEnd();
-    }
-
-    public function writeFieldBegin($fieldName, $fieldType, $fieldId) {
-        $this->writeJSONInteger($fieldId);
-        $this->writeJSONObjectStart();
-        $this->writeJSONString($this->getTypeNameForTypeID($fieldType));
-    }
-
-    public function writeFieldEnd() {
-        $this->writeJsonObjectEnd();
-    }
-
-    public function writeFieldStop() {
-    }
-
-    public function writeMapBegin($keyType, $valType, $size) {
-        $this->writeJSONArrayStart();
-        $this->writeJSONString($this->getTypeNameForTypeID($keyType));
-        $this->writeJSONString($this->getTypeNameForTypeID($valType));
-        $this->writeJSONInteger($size);
-        $this->writeJSONObjectStart();
-    }
-
-    public function writeMapEnd() {
-        $this->writeJSONObjectEnd();
-        $this->writeJSONArrayEnd();
-    }
-
-    public function writeListBegin($elemType, $size) {
-        $this->writeJSONArrayStart();
-        $this->writeJSONString($this->getTypeNameForTypeID($elemType));
-        $this->writeJSONInteger($size);
-    }
-
-    public function writeListEnd() {
-        $this->writeJSONArrayEnd();
-    }
-
-    public function writeSetBegin($elemType, $size) {
-        $this->writeJSONArrayStart();
-        $this->writeJSONString($this->getTypeNameForTypeID($elemType));
-        $this->writeJSONInteger($size);
-    }
-
-    public function writeSetEnd() {
-        $this->writeJSONArrayEnd();
-    }
-
-    public function writeBool($bool) {
-        $this->writeJSONInteger($bool ? 1 : 0);
-    }
-
-    public function writeByte($byte) {
-        $this->writeJSONInteger($byte);
-    }
-
-    public function writeI16($i16) {
-        $this->writeJSONInteger($i16);
-    }
-
-    public function writeI32($i32) {
-        $this->writeJSONInteger($i32);
-    }
-
-    public function writeI64($i64) {
-        $this->writeJSONInteger($i64);
-    }
-
-    public function writeDouble($dub) {
-        $this->writeJSONDouble($dub);
-    }
-
-    public function writeString($str) {
-        $this->writeJSONString($str);
-    }
-
-    /**
-     * Reads the message header
-     *
-     * @param string $name Function name
-     * @param int $type message type TMessageType::CALL or TMessageType::REPLY
-     * @parem int $seqid The sequence id of this message
-     */
-    public function readMessageBegin(&$name, &$type, &$seqid) {
-        $this->readJSONArrayStart();
-
-        if ($this->readJSONInteger() != self::VERSION) {
-            throw new TProtocolException("Message contained bad version", TProtocolException::BAD_VERSION);
-        }
-
-        $name = $this->readJSONString(false);
-        $type = $this->readJSONInteger();
-        $seqid = $this->readJSONInteger();
-
-        return true;
-    }
-
-    /**
-     * Read the close of message
-     */
-    public function readMessageEnd() {
-        $this->readJSONArrayEnd();
-    }
-
-    public function readStructBegin(&$name) {
-        $this->readJSONObjectStart();
-        return 0;
-    }
-
-    public function readStructEnd() {
-        $this->readJSONObjectEnd();
-    }
-
-    public function readFieldBegin(&$name, &$fieldType, &$fieldId) {
-        $ch = $this->reader_->peek();
-        $name = "";
-
-        if (substr($ch, 0, 1) == self::RBRACE) {
-            $fieldType = TType::STOP;
-        } else {
-            $fieldId = $this->readJSONInteger();
-            $this->readJSONObjectStart();
-            $fieldType = $this->getTypeIDForTypeName($this->readJSONString(false));
-        }
-    }
-
-    public function readFieldEnd() {
-        $this->readJSONObjectEnd();
-    }
-
-    public function readMapBegin(&$keyType, &$valType, &$size) {
-        $this->readJSONArrayStart();
-        $keyType = $this->getTypeIDForTypeName($this->readJSONString(false));
-        $valType = $this->getTypeIDForTypeName($this->readJSONString(false));
-        $size = $this->readJSONInteger();
-        $this->readJSONObjectStart();
-    }
-
-    public function readMapEnd() {
-        $this->readJSONObjectEnd();
-        $this->readJSONArrayEnd();
-    }
-
-    public function readListBegin(&$elemType, &$size) {
-        $this->readJSONArrayStart();
-        $elemType = $this->getTypeIDForTypeName($this->readJSONString(false));
-        $size = $this->readJSONInteger();
-        return true;
-    }
-
-    public function readListEnd() {
-        $this->readJSONArrayEnd();
-    }
-
-    public function readSetBegin(&$elemType, &$size) {
-        $this->readJSONArrayStart();
-        $elemType = $this->getTypeIDForTypeName($this->readJSONString(false));
-        $size = $this->readJSONInteger();
-        return true;
-    }
-
-    public function readSetEnd() {
-        $this->readJSONArrayEnd();
-    }
-
-    public function readBool(&$bool) {
-        $bool = $this->readJSONInteger() == 0 ? false : true;
-        return true;
-    }
-
-    public function readByte(&$byte) {
-        $byte = $this->readJSONInteger();
-        return true;
-    }
-
-    public function readI16(&$i16) {
-        $i16 = $this->readJSONInteger();
-        return true;
-    }
-
-    public function readI32(&$i32) {
-        $i32 = $this->readJSONInteger();
-        return true;
-    }
-
-    public function readI64(&$i64) {
-        if ( PHP_INT_SIZE === 4 ) {
-            $i64 = $this->readJSONIntegerAsString();
-        } else {
-            $i64 = $this->readJSONInteger();
-        }
-        return true;
-    }
-
-    public function readDouble(&$dub) {
-        $dub = $this->readJSONDouble();
-        return true;
-    }
-
-    public function readString(&$str) {
-        $str = $this->readJSONString(false);
-        return true;
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TProtocol.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TProtocol.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TProtocol.php
deleted file mode 100644
index 380ff10..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TProtocol.php
+++ /dev/null
@@ -1,340 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-
-/**
- * Protocol base class module.
- */
-abstract class TProtocol {
-
-  /**
-   * Underlying transport
-   *
-   * @var TTransport
-   */
-  protected $trans_;
-
-  /**
-   * Constructor
-   */
-  protected function __construct($trans) {
-    $this->trans_ = $trans;
-  }
-
-  /**
-   * Accessor for transport
-   *
-   * @return TTransport
-   */
-  public function getTransport() {
-    return $this->trans_;
-  }
-
-  /**
-   * Writes the message header
-   *
-   * @param string $name Function name
-   * @param int $type message type TMessageType::CALL or TMessageType::REPLY
-   * @param int $seqid The sequence id of this message
-   */
-  public abstract function writeMessageBegin($name, $type, $seqid);
-
-  /**
-   * Close the message
-   */
-  public abstract function writeMessageEnd();
-
-  /**
-   * Writes a struct header.
-   *
-   * @param string     $name Struct name
-   * @throws TException on write error
-   * @return int How many bytes written
-   */
-  public abstract function writeStructBegin($name);
-
-  /**
-   * Close a struct.
-   *
-   * @throws TException on write error
-   * @return int How many bytes written
-   */
-  public abstract function writeStructEnd();
-
-  /*
-   * Starts a field.
-   *
-   * @param string     $name Field name
-   * @param int        $type Field type
-   * @param int        $fid  Field id
-   * @throws TException on write error
-   * @return int How many bytes written
-   */
-  public abstract function writeFieldBegin($fieldName, $fieldType, $fieldId);
-
-  public abstract function writeFieldEnd();
-
-  public abstract function writeFieldStop();
-
-  public abstract function writeMapBegin($keyType, $valType, $size);
-
-  public abstract function writeMapEnd();
-
-  public abstract function writeListBegin($elemType, $size);
-
-  public abstract function writeListEnd();
-
-  public abstract function writeSetBegin($elemType, $size);
-
-  public abstract function writeSetEnd();
-
-  public abstract function writeBool($bool);
-
-  public abstract function writeByte($byte);
-
-  public abstract function writeI16($i16);
-
-  public abstract function writeI32($i32);
-
-  public abstract function writeI64($i64);
-
-  public abstract function writeDouble($dub);
-
-  public abstract function writeString($str);
-
-  /**
-   * Reads the message header
-   *
-   * @param string $name Function name
-   * @param int $type message type TMessageType::CALL or TMessageType::REPLY
-   * @parem int $seqid The sequence id of this message
-   */
-  public abstract function readMessageBegin(&$name, &$type, &$seqid);
-
-  /**
-   * Read the close of message
-   */
-  public abstract function readMessageEnd();
-
-  public abstract function readStructBegin(&$name);
-
-  public abstract function readStructEnd();
-
-  public abstract function readFieldBegin(&$name, &$fieldType, &$fieldId);
-
-  public abstract function readFieldEnd();
-
-  public abstract function readMapBegin(&$keyType, &$valType, &$size);
-
-  public abstract function readMapEnd();
-
-  public abstract function readListBegin(&$elemType, &$size);
-
-  public abstract function readListEnd();
-
-  public abstract function readSetBegin(&$elemType, &$size);
-
-  public abstract function readSetEnd();
-
-  public abstract function readBool(&$bool);
-
-  public abstract function readByte(&$byte);
-
-  public abstract function readI16(&$i16);
-
-  public abstract function readI32(&$i32);
-
-  public abstract function readI64(&$i64);
-
-  public abstract function readDouble(&$dub);
-
-  public abstract function readString(&$str);
-
-  /**
-   * The skip function is a utility to parse over unrecognized date without
-   * causing corruption.
-   *
-   * @param TType $type What type is it
-   */
-  public function skip($type) {
-    switch ($type) {
-    case TType::BOOL:
-      return $this->readBool($bool);
-    case TType::BYTE:
-      return $this->readByte($byte);
-    case TType::I16:
-      return $this->readI16($i16);
-    case TType::I32:
-      return $this->readI32($i32);
-    case TType::I64:
-      return $this->readI64($i64);
-    case TType::DOUBLE:
-      return $this->readDouble($dub);
-    case TType::STRING:
-      return $this->readString($str);
-    case TType::STRUCT:
-      {
-        $result = $this->readStructBegin($name);
-        while (true) {
-          $result += $this->readFieldBegin($name, $ftype, $fid);
-          if ($ftype == TType::STOP) {
-            break;
-          }
-          $result += $this->skip($ftype);
-          $result += $this->readFieldEnd();
-        }
-        $result += $this->readStructEnd();
-        return $result;
-      }
-    case TType::MAP:
-      {
-        $result = $this->readMapBegin($keyType, $valType, $size);
-        for ($i = 0; $i < $size; $i++) {
-          $result += $this->skip($keyType);
-          $result += $this->skip($valType);
-        }
-        $result += $this->readMapEnd();
-        return $result;
-      }
-    case TType::SET:
-      {
-        $result = $this->readSetBegin($elemType, $size);
-        for ($i = 0; $i < $size; $i++) {
-          $result += $this->skip($elemType);
-        }
-        $result += $this->readSetEnd();
-        return $result;
-      }
-    case TType::LST:
-      {
-        $result = $this->readListBegin($elemType, $size);
-        for ($i = 0; $i < $size; $i++) {
-          $result += $this->skip($elemType);
-        }
-        $result += $this->readListEnd();
-        return $result;
-      }
-    default:
-      throw new TProtocolException('Unknown field type: '.$type,
-                                   TProtocolException::INVALID_DATA);
-    }
-  }
-
-  /**
-   * Utility for skipping binary data
-   *
-   * @param TTransport $itrans TTransport object
-   * @param int        $type   Field type
-   */
-  public static function skipBinary($itrans, $type) {
-    switch ($type) {
-    case TType::BOOL:
-      return $itrans->readAll(1);
-    case TType::BYTE:
-      return $itrans->readAll(1);
-    case TType::I16:
-      return $itrans->readAll(2);
-    case TType::I32:
-      return $itrans->readAll(4);
-    case TType::I64:
-      return $itrans->readAll(8);
-    case TType::DOUBLE:
-      return $itrans->readAll(8);
-    case TType::STRING:
-      $len = unpack('N', $itrans->readAll(4));
-      $len = $len[1];
-      if ($len > 0x7fffffff) {
-        $len = 0 - (($len - 1) ^ 0xffffffff);
-      }
-      return 4 + $itrans->readAll($len);
-    case TType::STRUCT:
-      {
-        $result = 0;
-        while (true) {
-          $ftype = 0;
-          $fid = 0;
-          $data = $itrans->readAll(1);
-          $arr = unpack('c', $data);
-          $ftype = $arr[1];
-          if ($ftype == TType::STOP) {
-            break;
-          }
-          // I16 field id
-          $result += $itrans->readAll(2);
-          $result += self::skipBinary($itrans, $ftype);
-        }
-        return $result;
-      }
-    case TType::MAP:
-      {
-        // Ktype
-        $data = $itrans->readAll(1);
-        $arr = unpack('c', $data);
-        $ktype = $arr[1];
-        // Vtype
-        $data = $itrans->readAll(1);
-        $arr = unpack('c', $data);
-        $vtype = $arr[1];
-        // Size
-        $data = $itrans->readAll(4);
-        $arr = unpack('N', $data);
-        $size = $arr[1];
-        if ($size > 0x7fffffff) {
-          $size = 0 - (($size - 1) ^ 0xffffffff);
-        }
-        $result = 6;
-        for ($i = 0; $i < $size; $i++) {
-          $result += self::skipBinary($itrans, $ktype);
-          $result += self::skipBinary($itrans, $vtype);
-        }
-        return $result;
-      }
-    case TType::SET:
-    case TType::LST:
-      {
-        // Vtype
-        $data = $itrans->readAll(1);
-        $arr = unpack('c', $data);
-        $vtype = $arr[1];
-        // Size
-        $data = $itrans->readAll(4);
-        $arr = unpack('N', $data);
-        $size = $arr[1];
-        if ($size > 0x7fffffff) {
-          $size = 0 - (($size - 1) ^ 0xffffffff);
-        }
-        $result = 5;
-        for ($i = 0; $i < $size; $i++) {
-          $result += self::skipBinary($itrans, $vtype);
-        }
-        return $result;
-      }
-    default:
-      throw new TProtocolException('Unknown field type: '.$type,
-                                   TProtocolException::INVALID_DATA);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Serializer/TBinarySerializer.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Serializer/TBinarySerializer.php b/Airavata-PHP-Client-Samples/lib/Thrift/Serializer/TBinarySerializer.php
deleted file mode 100644
index 2a7cc3e..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Serializer/TBinarySerializer.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- * @author: rmarin (marin.radu@facebook.com)
- */
-
-namespace Thrift\Serializer;
-
-use Thrift\Transport\TMemoryBuffer;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Type\TMessageType;
-
-/**
- * Utility class for serializing and deserializing
- * a thrift object using TBinaryProtocolAccelerated.
- */
-class TBinarySerializer {
-
-  // NOTE(rmarin): Because thrift_protocol_write_binary
-  // adds a begin message prefix, you cannot specify
-  // a transport in which to serialize an object. It has to
-  // be a string. Otherwise we will break the compatibility with
-  // normal deserialization.
-  public static function serialize($object) {
-    $transport = new TMemoryBuffer();
-    $protocol = new TBinaryProtocolAccelerated($transport);
-    if (function_exists('thrift_protocol_write_binary')) {
-      thrift_protocol_write_binary($protocol, $object->getName(),
-                                   TMessageType::REPLY, $object,
-                                   0, $protocol->isStrictWrite());
-
-      $protocol->readMessageBegin($unused_name, $unused_type,
-                                  $unused_seqid);
-    } else {
-      $object->write($protocol);
-    }
-    $protocol->getTransport()->flush();
-    return $transport->getBuffer();
-  }
-
-  public static function deserialize($string_object, $class_name) {
-     $transport = new TMemoryBuffer();
-     $protocol = new TBinaryProtocolAccelerated($transport);
-     if (function_exists('thrift_protocol_read_binary')) {
-       $protocol->writeMessageBegin('', TMessageType::REPLY, 0);
-       $transport->write($string_object);
-       return thrift_protocol_read_binary($protocol, $class_name,
-                                          $protocol->isStrictRead());
-     } else {
-       $transport->write($string_object);
-       $object = new $class_name();
-       $object->read($protocol);
-       return $object;
-     }
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Server/TForkingServer.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TForkingServer.php b/Airavata-PHP-Client-Samples/lib/Thrift/Server/TForkingServer.php
deleted file mode 100644
index 6fca305..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TForkingServer.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Server\TServer;
-use Thrift\Transport\TTransport;
-use Thrift\Exception\TException;
-use Thrift\Exception\TTransportException;
-
-/**
- * A forking implementation of a Thrift server.
- *
- * @package thrift.server
- */
-class TForkingServer extends TServer {
-  /**
-   * Flag for the main serving loop
-   *
-   * @var bool
-   */
-  private $stop_ = false;
-
-  /**
-   * List of children.
-   *
-   * @var array
-   */
-  protected $children_ = array();
-
-  /**
-   * Listens for new client using the supplied
-   * transport. We fork when a new connection
-   * arrives.
-   *
-   * @return void
-   */
-  public function serve() {
-    $this->transport_->listen();
-
-    while (!$this->stop_) {
-      try {
-        $transport = $this->transport_->accept();
-
-        if ($transport != null) {
-          $pid = pcntl_fork();
-
-          if ($pid > 0) {
-            $this->handleParent($transport, $pid);
-          }
-          else if ($pid === 0) {
-            $this->handleChild($transport);
-          }
-          else {
-            throw new TException('Failed to fork');
-          }
-        }
-      }
-      catch (TTransportException $e) { }
-
-      $this->collectChildren();
-    }
-  }
-
-  /**
-   * Code run by the parent
-   *
-   * @param TTransport $transport
-   * @param int $pid
-   * @return void
-   */
-  private function handleParent(TTransport $transport, $pid) {
-    $this->children_[$pid] = $transport;
-  }
-
-  /**
-   * Code run by the child.
-   *
-   * @param TTransport $transport
-   * @return void
-   */
-  private function handleChild(TTransport $transport) {
-    try {
-      $inputTransport = $this->inputTransportFactory_->getTransport($transport);
-      $outputTransport = $this->outputTransportFactory_->getTransport($transport);
-      $inputProtocol = $this->inputProtocolFactory_->getProtocol($inputTransport);
-      $outputProtocol = $this->outputProtocolFactory_->getProtocol($outputTransport);
-      while ($this->processor_->process($inputProtocol, $outputProtocol)) { }
-      @$transport->close();
-    }
-    catch (TTransportException $e) { }
-
-    exit(0);
-  }
-
-  /**
-   * Collects any children we may have
-   *
-   * @return void
-   */
-  private function collectChildren() {
-    foreach ($this->children_ as $pid => $transport) {
-      if (pcntl_waitpid($pid, $status, WNOHANG) > 0) {
-        unset($this->children_[$pid]);
-        if ($transport) @$transport->close();
-      }
-    }
-  }
-
-  /**
-   * Stops the server running. Kills the transport
-   * and then stops the main serving loop
-   *
-   * @return void
-   */
-  public function stop() {
-    $this->transport_->close();
-    $this->stop_ = true;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServer.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServer.php b/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServer.php
deleted file mode 100644
index 343bf4b..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServer.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Server\TServerTransport;
-use Thrift\Factory\TTransportFactory;
-use Thrift\Factory\TProtocolFactory;
-
-/**
- * Generic class for a Thrift server.
- *
- * @package thrift.server
- */
-abstract class TServer {
-
-  /**
-   * Processor to handle new clients
-   *
-   * @var TProcessor
-   */
-  protected $processor_;
-
-  /**
-   * Server transport to be used for listening
-   * and accepting new clients
-   *
-   * @var TServerTransport
-   */
-  protected $transport_;
-
-  /**
-   * Input transport factory
-   *
-   * @var TTransportFactory
-   */
-  protected $inputTransportFactory_;
-
-  /**
-   * Output transport factory
-   *
-   * @var TTransportFactory
-   */
-  protected $outputTransportFactory_;
-
-  /**
-   * Input protocol factory
-   *
-   * @var TProtocolFactory
-   */
-  protected $inputProtocolFactory_;
-
-  /**
-   * Output protocol factory
-   *
-   * @var TProtocolFactory
-   */
-  protected $outputProtocolFactory_;
-
-  /**
-   * Sets up all the factories, etc
-   *
-   * @param object $processor
-   * @param TServerTransport $transport
-   * @param TTransportFactory $inputTransportFactory
-   * @param TTransportFactory $outputTransportFactory
-   * @param TProtocolFactory $inputProtocolFactory
-   * @param TProtocolFactory $outputProtocolFactory
-   * @return void
-   */
-  public function __construct($processor,
-                              TServerTransport $transport,
-                              TTransportFactory $inputTransportFactory,
-                              TTransportFactory $outputTransportFactory,
-                              TProtocolFactory $inputProtocolFactory,
-                              TProtocolFactory $outputProtocolFactory) {
-    $this->processor_ = $processor;
-    $this->transport_ = $transport;
-    $this->inputTransportFactory_ = $inputTransportFactory;
-    $this->outputTransportFactory_ = $outputTransportFactory;
-    $this->inputProtocolFactory_ = $inputProtocolFactory;
-    $this->outputProtocolFactory_ = $outputProtocolFactory;
-  }
-
-  /**
-   * Serves the server. This should never return
-   * unless a problem permits it to do so or it
-   * is interrupted intentionally
-   *
-   * @abstract
-   * @return void
-   */
-  abstract public function serve();
-
-  /**
-   * Stops the server serving
-   *
-   * @abstract
-   * @return void
-   */
-  abstract public function stop();
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerSocket.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerSocket.php b/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerSocket.php
deleted file mode 100644
index 00a6fb9..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerSocket.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Server\TServerTransport;
-use Thrift\Transport\TSocket;
-
-/**
- * Socket implementation of a server agent.
- *
- * @package thrift.transport
- */
-class TServerSocket extends TServerTransport {
-
-  /**
-   * Handle for the listener socket
-   *
-   * @var resource
-   */
-  private $listener_;
-
-  /**
-   * Port for the listener to listen on
-   *
-   * @var int
-   */
-  private $port_;
-
-  /**
-   * Timeout when listening for a new client
-   *
-   * @var int
-   */
-  private $acceptTimeout_ = 30000;
-
-  /**
-   * Host to listen on
-   *
-   * @var string
-   */
-  private $host_;
-
-  /**
-   * ServerSocket constructor
-   *
-   * @param string $host        Host to listen on
-   * @param int $port           Port to listen on
-   * @return void
-   */
-  public function __construct($host = 'localhost', $port = 9090) {
-    $this->host_ = $host;
-    $this->port_ = $port;
-  }
-
-  /**
-   * Sets the accept timeout
-   *
-   * @param int $acceptTimeout
-   * @return void
-   */
-  public function setAcceptTimeout($acceptTimeout) {
-    $this->acceptTimeout_ = $acceptTimeout;
-  }
-
-  /**
-   * Opens a new socket server handle
-   *
-   * @return void
-   */
-  public function listen() {
-    $this->listener_ = stream_socket_server('tcp://' . $this->host_ . ':' . $this->port_);
-  }
-
-  /**
-   * Closes the socket server handle
-   *
-   * @return void
-   */
-  public function close() {
-    @fclose($this->listener_);
-    $this->listener_ = null;
-  }
-
-  /**
-   * Implementation of accept. If not client is accepted in the given time
-   *
-   * @return TSocket
-   */
-  protected function acceptImpl() {
-    $handle = @stream_socket_accept($this->listener_, $this->acceptTimeout_ / 1000.0);
-    if(!$handle) return null;
-
-    $socket = new TSocket();
-    $socket->setHandle($handle);
-
-    return $socket;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerTransport.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerTransport.php b/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerTransport.php
deleted file mode 100644
index 5324712..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TServerTransport.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Exception\TTransportException;
-
-/**
- * Generic class for Server agent.
- *
- * @package thrift.transport
- */
-abstract class TServerTransport {
-  /**
-   * List for new clients
-   *
-   * @abstract
-   * @return void
-   */
-  abstract public function listen();
-
-  /**
-   * Close the server
-   *
-   * @abstract
-   * @return void
-   */
-  abstract public function close();
-
-  /**
-   * Subclasses should use this to implement
-   * accept.
-   *
-   * @abstract
-   * @return TTransport
-   */
-  protected abstract function acceptImpl();
-
-  /**
-   * Uses the accept implemtation. If null is returned, an
-   * exception is thrown.
-   *
-   * @throws TTransportException
-   * @return TTransport
-   */
-  public function accept() {
-    $transport = $this->acceptImpl();
-
-    if ($transport == null) {
-      throw new TTransportException("accept() may not return NULL");
-    }
-
-    return $transport;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Server/TSimpleServer.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TSimpleServer.php b/Airavata-PHP-Client-Samples/lib/Thrift/Server/TSimpleServer.php
deleted file mode 100644
index 790e48f..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Server/TSimpleServer.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-namespace Thrift\Server;
-
-use Thrift\Server\TServer;
-use Thrift\Exception\TTransportException;
-
-/**
- * Simple implemtation of a Thrift server.
- *
- * @package thrift.server
- */
-class TSimpleServer extends TServer {
-  /**
-   * Flag for the main serving loop
-   *
-   * @var bool
-   */
-  private $stop_ = false;
-
-  /**
-   * Listens for new client using the supplied
-   * transport. It handles TTransportExceptions
-   * to avoid timeouts etc killing it
-   *
-   * @return void
-   */
-  public function serve() {
-    $this->transport_->listen();
-
-    while (!$this->stop_) {
-      try {
-        $transport = $this->transport_->accept();
-
-        if ($transport != null) {
-          $inputTransport = $this->inputTransportFactory_->getTransport($transport);
-          $outputTransport = $this->outputTransportFactory_->getTransport($transport);
-          $inputProtocol = $this->inputProtocolFactory_->getProtocol($inputTransport);
-          $outputProtocol = $this->outputProtocolFactory_->getProtocol($outputTransport);
-          while ($this->processor_->process($inputProtocol, $outputProtocol)) { }
-        }
-      }
-      catch (TTransportException $e) { }
-    }
-  }
-
-  /**
-   * Stops the server running. Kills the transport
-   * and then stops the main serving loop
-   *
-   * @return void
-   */
-  public function stop() {
-    $this->transport_->close();
-    $this->stop_ = true;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Core.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Core.php b/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Core.php
deleted file mode 100644
index e38a5b2..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Core.php
+++ /dev/null
@@ -1,38 +0,0 @@
-<?php
-/*
- * 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.
- *
- */
-
-namespace Thrift\StringFunc;
-
-use Thrift\StringFunc\TStringFunc;
-
-class Core implements TStringFunc {
-    public function substr($str, $start, $length = null) {
-        // specifying a null $length would return an empty string
-        if($length === null) {
-            return substr($str, $start);
-        }
-        return substr($str, $start, $length);
-    }
-
-    public function strlen($str) {
-        return strlen($str);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Mbstring.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Mbstring.php b/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Mbstring.php
deleted file mode 100644
index c1ace13..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/Mbstring.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/*
- * 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.
- *
- */
-
-namespace Thrift\StringFunc;
-
-use Thrift\StringFunc\TStringFunc;
-
-class Mbstring implements TStringFunc {
-    public function substr($str, $start, $length = null) {
-        /**
-         * We need to set the charset parameter, which is the second
-         * optional parameter and the first optional parameter can't
-         * be null or false as a "magic" value because that would
-         * cause an empty string to be returned, so we need to
-         * actually calculate the proper length value.
-         */
-        if($length === null) {
-            $length = $this->strlen($str) - $start;
-        }
-
-        return mb_substr($str, $start, $length, '8bit');
-    }
-
-    public function strlen($str) {
-        return mb_strlen($str, '8bit');
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/TStringFunc.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/TStringFunc.php b/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/TStringFunc.php
deleted file mode 100644
index c5bb390..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/StringFunc/TStringFunc.php
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/*
- * 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.
- *
- */
-
-namespace Thrift\StringFunc;
-
-interface TStringFunc {
-    public function substr($str, $start, $length = null);
-    public function strlen($str);
-}
\ No newline at end of file


[11/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/ApplicationCatalogAPI.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/ApplicationCatalogAPI.php b/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/ApplicationCatalogAPI.php
deleted file mode 100644
index e2082cb..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/ApplicationCatalogAPI.php
+++ /dev/null
@@ -1,6165 +0,0 @@
-<?php
-namespace Airavata\API\AppCatalog;
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface ApplicationCatalogAPIIf {
-  public function GetAPIVersion();
-  public function addComputeResourceDescription(\Airavata\Model\AppCatalog\ComputeResourceDescription $computeResourceDescription);
-  public function addSSHJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\SSHJobSubmission $jobSubmission);
-  public function addGSISSHJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\GSISSHJobSubmission $jobSubmission);
-  public function addGlobusJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\GlobusJobSubmission $jobSubmission);
-  public function addSCPDataMovementProtocol($computeResourceId, \Airavata\Model\AppCatalog\SCPDataMovement $dataMovement);
-  public function addGridFTPDataMovementProtocol($computeResourceId, \Airavata\Model\AppCatalog\GridFTPDataMovement $dataMovement);
-  public function listComputeResourceDescriptions();
-  public function getComputeResourceDescription($computeResourceId);
-  public function getSSHJobSubmissionProtocol($sshJobSubmissionProtocolResourceId);
-  public function getGSISSHJobSubmissionProtocol($gsisshJobSubmissionProtocolResourceId);
-  public function getGlobusJobSubmissionProtocol($globusJobSubmissionProtocolResourceId);
-  public function getSCPDataMovementProtocol($scpDataMovementResourceId);
-  public function getGridFTPDataMovementProtocol($gridFTPDataMovementResourceId);
-  public function isComputeResourceDescriptionRegistered($hostName);
-  public function getComputeResourceDescriptionFromHostName($hostName);
-  public function addApplicationInterface(\Airavata\Model\AppCatalog\ApplicationInterface $applicationInterface);
-  public function listApplicationInterfaceIds();
-  public function getApplicationInterface($applicationInterfaceId);
-  public function addApplicationDeployment($applicationInterfaceId, \Airavata\Model\AppCatalog\ApplicationDeployment $applicationDeployment);
-  public function listApplicationDeploymentIds($applicationInterfaceId);
-  public function getApplicationDeployment($applicationInterfaceId, $applicationDeploymentId);
-}
-
-class ApplicationCatalogAPIClient implements \Airavata\API\AppCatalog\ApplicationCatalogAPIIf {
-  protected $input_ = null;
-  protected $output_ = null;
-
-  protected $seqid_ = 0;
-
-  public function __construct($input, $output=null) {
-    $this->input_ = $input;
-    $this->output_ = $output ? $output : $input;
-  }
-
-  public function GetAPIVersion()
-  {
-    $this->send_GetAPIVersion();
-    return $this->recv_GetAPIVersion();
-  }
-
-  public function send_GetAPIVersion()
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_GetAPIVersion_args();
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'GetAPIVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('GetAPIVersion', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_GetAPIVersion()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_GetAPIVersion_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_GetAPIVersion_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    throw new \Exception("GetAPIVersion failed: unknown result");
-  }
-
-  public function addComputeResourceDescription(\Airavata\Model\AppCatalog\ComputeResourceDescription $computeResourceDescription)
-  {
-    $this->send_addComputeResourceDescription($computeResourceDescription);
-    return $this->recv_addComputeResourceDescription();
-  }
-
-  public function send_addComputeResourceDescription(\Airavata\Model\AppCatalog\ComputeResourceDescription $computeResourceDescription)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addComputeResourceDescription_args();
-    $args->computeResourceDescription = $computeResourceDescription;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addComputeResourceDescription', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addComputeResourceDescription', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addComputeResourceDescription()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addComputeResourceDescription_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addComputeResourceDescription_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addComputeResourceDescription failed: unknown result");
-  }
-
-  public function addSSHJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\SSHJobSubmission $jobSubmission)
-  {
-    $this->send_addSSHJobSubmissionProtocol($computeResourceId, $jobSubmission);
-    return $this->recv_addSSHJobSubmissionProtocol();
-  }
-
-  public function send_addSSHJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\SSHJobSubmission $jobSubmission)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addSSHJobSubmissionProtocol_args();
-    $args->computeResourceId = $computeResourceId;
-    $args->jobSubmission = $jobSubmission;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addSSHJobSubmissionProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addSSHJobSubmissionProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addSSHJobSubmissionProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addSSHJobSubmissionProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addSSHJobSubmissionProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addSSHJobSubmissionProtocol failed: unknown result");
-  }
-
-  public function addGSISSHJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\GSISSHJobSubmission $jobSubmission)
-  {
-    $this->send_addGSISSHJobSubmissionProtocol($computeResourceId, $jobSubmission);
-    return $this->recv_addGSISSHJobSubmissionProtocol();
-  }
-
-  public function send_addGSISSHJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\GSISSHJobSubmission $jobSubmission)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_args();
-    $args->computeResourceId = $computeResourceId;
-    $args->jobSubmission = $jobSubmission;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addGSISSHJobSubmissionProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addGSISSHJobSubmissionProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addGSISSHJobSubmissionProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addGSISSHJobSubmissionProtocol failed: unknown result");
-  }
-
-  public function addGlobusJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\GlobusJobSubmission $jobSubmission)
-  {
-    $this->send_addGlobusJobSubmissionProtocol($computeResourceId, $jobSubmission);
-    return $this->recv_addGlobusJobSubmissionProtocol();
-  }
-
-  public function send_addGlobusJobSubmissionProtocol($computeResourceId, \Airavata\Model\AppCatalog\GlobusJobSubmission $jobSubmission)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_args();
-    $args->computeResourceId = $computeResourceId;
-    $args->jobSubmission = $jobSubmission;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addGlobusJobSubmissionProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addGlobusJobSubmissionProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addGlobusJobSubmissionProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addGlobusJobSubmissionProtocol failed: unknown result");
-  }
-
-  public function addSCPDataMovementProtocol($computeResourceId, \Airavata\Model\AppCatalog\SCPDataMovement $dataMovement)
-  {
-    $this->send_addSCPDataMovementProtocol($computeResourceId, $dataMovement);
-    return $this->recv_addSCPDataMovementProtocol();
-  }
-
-  public function send_addSCPDataMovementProtocol($computeResourceId, \Airavata\Model\AppCatalog\SCPDataMovement $dataMovement)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addSCPDataMovementProtocol_args();
-    $args->computeResourceId = $computeResourceId;
-    $args->dataMovement = $dataMovement;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addSCPDataMovementProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addSCPDataMovementProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addSCPDataMovementProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addSCPDataMovementProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addSCPDataMovementProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addSCPDataMovementProtocol failed: unknown result");
-  }
-
-  public function addGridFTPDataMovementProtocol($computeResourceId, \Airavata\Model\AppCatalog\GridFTPDataMovement $dataMovement)
-  {
-    $this->send_addGridFTPDataMovementProtocol($computeResourceId, $dataMovement);
-    return $this->recv_addGridFTPDataMovementProtocol();
-  }
-
-  public function send_addGridFTPDataMovementProtocol($computeResourceId, \Airavata\Model\AppCatalog\GridFTPDataMovement $dataMovement)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addGridFTPDataMovementProtocol_args();
-    $args->computeResourceId = $computeResourceId;
-    $args->dataMovement = $dataMovement;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addGridFTPDataMovementProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addGridFTPDataMovementProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addGridFTPDataMovementProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addGridFTPDataMovementProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addGridFTPDataMovementProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addGridFTPDataMovementProtocol failed: unknown result");
-  }
-
-  public function listComputeResourceDescriptions()
-  {
-    $this->send_listComputeResourceDescriptions();
-    return $this->recv_listComputeResourceDescriptions();
-  }
-
-  public function send_listComputeResourceDescriptions()
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_listComputeResourceDescriptions_args();
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'listComputeResourceDescriptions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('listComputeResourceDescriptions', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_listComputeResourceDescriptions()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_listComputeResourceDescriptions_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_listComputeResourceDescriptions_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("listComputeResourceDescriptions failed: unknown result");
-  }
-
-  public function getComputeResourceDescription($computeResourceId)
-  {
-    $this->send_getComputeResourceDescription($computeResourceId);
-    return $this->recv_getComputeResourceDescription();
-  }
-
-  public function send_getComputeResourceDescription($computeResourceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getComputeResourceDescription_args();
-    $args->computeResourceId = $computeResourceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getComputeResourceDescription', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getComputeResourceDescription', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getComputeResourceDescription()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getComputeResourceDescription_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getComputeResourceDescription_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getComputeResourceDescription failed: unknown result");
-  }
-
-  public function getSSHJobSubmissionProtocol($sshJobSubmissionProtocolResourceId)
-  {
-    $this->send_getSSHJobSubmissionProtocol($sshJobSubmissionProtocolResourceId);
-    return $this->recv_getSSHJobSubmissionProtocol();
-  }
-
-  public function send_getSSHJobSubmissionProtocol($sshJobSubmissionProtocolResourceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getSSHJobSubmissionProtocol_args();
-    $args->sshJobSubmissionProtocolResourceId = $sshJobSubmissionProtocolResourceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getSSHJobSubmissionProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getSSHJobSubmissionProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getSSHJobSubmissionProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getSSHJobSubmissionProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getSSHJobSubmissionProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getSSHJobSubmissionProtocol failed: unknown result");
-  }
-
-  public function getGSISSHJobSubmissionProtocol($gsisshJobSubmissionProtocolResourceId)
-  {
-    $this->send_getGSISSHJobSubmissionProtocol($gsisshJobSubmissionProtocolResourceId);
-    return $this->recv_getGSISSHJobSubmissionProtocol();
-  }
-
-  public function send_getGSISSHJobSubmissionProtocol($gsisshJobSubmissionProtocolResourceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getGSISSHJobSubmissionProtocol_args();
-    $args->gsisshJobSubmissionProtocolResourceId = $gsisshJobSubmissionProtocolResourceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getGSISSHJobSubmissionProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getGSISSHJobSubmissionProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getGSISSHJobSubmissionProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getGSISSHJobSubmissionProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getGSISSHJobSubmissionProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getGSISSHJobSubmissionProtocol failed: unknown result");
-  }
-
-  public function getGlobusJobSubmissionProtocol($globusJobSubmissionProtocolResourceId)
-  {
-    $this->send_getGlobusJobSubmissionProtocol($globusJobSubmissionProtocolResourceId);
-    return $this->recv_getGlobusJobSubmissionProtocol();
-  }
-
-  public function send_getGlobusJobSubmissionProtocol($globusJobSubmissionProtocolResourceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getGlobusJobSubmissionProtocol_args();
-    $args->globusJobSubmissionProtocolResourceId = $globusJobSubmissionProtocolResourceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getGlobusJobSubmissionProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getGlobusJobSubmissionProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getGlobusJobSubmissionProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getGlobusJobSubmissionProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getGlobusJobSubmissionProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getGlobusJobSubmissionProtocol failed: unknown result");
-  }
-
-  public function getSCPDataMovementProtocol($scpDataMovementResourceId)
-  {
-    $this->send_getSCPDataMovementProtocol($scpDataMovementResourceId);
-    return $this->recv_getSCPDataMovementProtocol();
-  }
-
-  public function send_getSCPDataMovementProtocol($scpDataMovementResourceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getSCPDataMovementProtocol_args();
-    $args->scpDataMovementResourceId = $scpDataMovementResourceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getSCPDataMovementProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getSCPDataMovementProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getSCPDataMovementProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getSCPDataMovementProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getSCPDataMovementProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getSCPDataMovementProtocol failed: unknown result");
-  }
-
-  public function getGridFTPDataMovementProtocol($gridFTPDataMovementResourceId)
-  {
-    $this->send_getGridFTPDataMovementProtocol($gridFTPDataMovementResourceId);
-    return $this->recv_getGridFTPDataMovementProtocol();
-  }
-
-  public function send_getGridFTPDataMovementProtocol($gridFTPDataMovementResourceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getGridFTPDataMovementProtocol_args();
-    $args->gridFTPDataMovementResourceId = $gridFTPDataMovementResourceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getGridFTPDataMovementProtocol', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getGridFTPDataMovementProtocol', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getGridFTPDataMovementProtocol()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getGridFTPDataMovementProtocol_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getGridFTPDataMovementProtocol_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getGridFTPDataMovementProtocol failed: unknown result");
-  }
-
-  public function isComputeResourceDescriptionRegistered($hostName)
-  {
-    $this->send_isComputeResourceDescriptionRegistered($hostName);
-    return $this->recv_isComputeResourceDescriptionRegistered();
-  }
-
-  public function send_isComputeResourceDescriptionRegistered($hostName)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_isComputeResourceDescriptionRegistered_args();
-    $args->hostName = $hostName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'isComputeResourceDescriptionRegistered', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('isComputeResourceDescriptionRegistered', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_isComputeResourceDescriptionRegistered()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_isComputeResourceDescriptionRegistered_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_isComputeResourceDescriptionRegistered_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("isComputeResourceDescriptionRegistered failed: unknown result");
-  }
-
-  public function getComputeResourceDescriptionFromHostName($hostName)
-  {
-    $this->send_getComputeResourceDescriptionFromHostName($hostName);
-    return $this->recv_getComputeResourceDescriptionFromHostName();
-  }
-
-  public function send_getComputeResourceDescriptionFromHostName($hostName)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getComputeResourceDescriptionFromHostName_args();
-    $args->hostName = $hostName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getComputeResourceDescriptionFromHostName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getComputeResourceDescriptionFromHostName', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getComputeResourceDescriptionFromHostName()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getComputeResourceDescriptionFromHostName_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getComputeResourceDescriptionFromHostName_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getComputeResourceDescriptionFromHostName failed: unknown result");
-  }
-
-  public function addApplicationInterface(\Airavata\Model\AppCatalog\ApplicationInterface $applicationInterface)
-  {
-    $this->send_addApplicationInterface($applicationInterface);
-    return $this->recv_addApplicationInterface();
-  }
-
-  public function send_addApplicationInterface(\Airavata\Model\AppCatalog\ApplicationInterface $applicationInterface)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addApplicationInterface_args();
-    $args->applicationInterface = $applicationInterface;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addApplicationInterface', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addApplicationInterface()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addApplicationInterface_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addApplicationInterface_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addApplicationInterface failed: unknown result");
-  }
-
-  public function listApplicationInterfaceIds()
-  {
-    $this->send_listApplicationInterfaceIds();
-    return $this->recv_listApplicationInterfaceIds();
-  }
-
-  public function send_listApplicationInterfaceIds()
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_listApplicationInterfaceIds_args();
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'listApplicationInterfaceIds', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('listApplicationInterfaceIds', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_listApplicationInterfaceIds()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_listApplicationInterfaceIds_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_listApplicationInterfaceIds_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("listApplicationInterfaceIds failed: unknown result");
-  }
-
-  public function getApplicationInterface($applicationInterfaceId)
-  {
-    $this->send_getApplicationInterface($applicationInterfaceId);
-    return $this->recv_getApplicationInterface();
-  }
-
-  public function send_getApplicationInterface($applicationInterfaceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getApplicationInterface_args();
-    $args->applicationInterfaceId = $applicationInterfaceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getApplicationInterface', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getApplicationInterface', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getApplicationInterface()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getApplicationInterface_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getApplicationInterface_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getApplicationInterface failed: unknown result");
-  }
-
-  public function addApplicationDeployment($applicationInterfaceId, \Airavata\Model\AppCatalog\ApplicationDeployment $applicationDeployment)
-  {
-    $this->send_addApplicationDeployment($applicationInterfaceId, $applicationDeployment);
-    return $this->recv_addApplicationDeployment();
-  }
-
-  public function send_addApplicationDeployment($applicationInterfaceId, \Airavata\Model\AppCatalog\ApplicationDeployment $applicationDeployment)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addApplicationDeployment_args();
-    $args->applicationInterfaceId = $applicationInterfaceId;
-    $args->applicationDeployment = $applicationDeployment;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'addApplicationDeployment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('addApplicationDeployment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_addApplicationDeployment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_addApplicationDeployment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_addApplicationDeployment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("addApplicationDeployment failed: unknown result");
-  }
-
-  public function listApplicationDeploymentIds($applicationInterfaceId)
-  {
-    $this->send_listApplicationDeploymentIds($applicationInterfaceId);
-    return $this->recv_listApplicationDeploymentIds();
-  }
-
-  public function send_listApplicationDeploymentIds($applicationInterfaceId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_listApplicationDeploymentIds_args();
-    $args->applicationInterfaceId = $applicationInterfaceId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'listApplicationDeploymentIds', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('listApplicationDeploymentIds', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_listApplicationDeploymentIds()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_listApplicationDeploymentIds_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_listApplicationDeploymentIds_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("listApplicationDeploymentIds failed: unknown result");
-  }
-
-  public function getApplicationDeployment($applicationInterfaceId, $applicationDeploymentId)
-  {
-    $this->send_getApplicationDeployment($applicationInterfaceId, $applicationDeploymentId);
-    return $this->recv_getApplicationDeployment();
-  }
-
-  public function send_getApplicationDeployment($applicationInterfaceId, $applicationDeploymentId)
-  {
-    $args = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getApplicationDeployment_args();
-    $args->applicationInterfaceId = $applicationInterfaceId;
-    $args->applicationDeploymentId = $applicationDeploymentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getApplicationDeployment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getApplicationDeployment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getApplicationDeployment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\AppCatalog\ApplicationCatalogAPI_getApplicationDeployment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\AppCatalog\ApplicationCatalogAPI_getApplicationDeployment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getApplicationDeployment failed: unknown result");
-  }
-
-}
-
-// HELPER FUNCTIONS AND STRUCTURES
-
-class ApplicationCatalogAPI_GetAPIVersion_args {
-  static $_TSPEC;
-
-
-  public function __construct() {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        );
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_GetAPIVersion_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_GetAPIVersion_args');
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_GetAPIVersion_result {
-  static $_TSPEC;
-
-  public $success = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_GetAPIVersion_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_GetAPIVersion_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addComputeResourceDescription_args {
-  static $_TSPEC;
-
-  public $computeResourceDescription = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'computeResourceDescription',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\ComputeResourceDescription',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['computeResourceDescription'])) {
-        $this->computeResourceDescription = $vals['computeResourceDescription'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addComputeResourceDescription_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->computeResourceDescription = new \Airavata\Model\AppCatalog\ComputeResourceDescription();
-            $xfer += $this->computeResourceDescription->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addComputeResourceDescription_args');
-    if ($this->computeResourceDescription !== null) {
-      if (!is_object($this->computeResourceDescription)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('computeResourceDescription', TType::STRUCT, 1);
-      $xfer += $this->computeResourceDescription->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addComputeResourceDescription_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addComputeResourceDescription_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addComputeResourceDescription_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addSSHJobSubmissionProtocol_args {
-  static $_TSPEC;
-
-  public $computeResourceId = null;
-  public $jobSubmission = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'computeResourceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'jobSubmission',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\SSHJobSubmission',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['computeResourceId'])) {
-        $this->computeResourceId = $vals['computeResourceId'];
-      }
-      if (isset($vals['jobSubmission'])) {
-        $this->jobSubmission = $vals['jobSubmission'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addSSHJobSubmissionProtocol_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->computeResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->jobSubmission = new \Airavata\Model\AppCatalog\SSHJobSubmission();
-            $xfer += $this->jobSubmission->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addSSHJobSubmissionProtocol_args');
-    if ($this->computeResourceId !== null) {
-      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->computeResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobSubmission !== null) {
-      if (!is_object($this->jobSubmission)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('jobSubmission', TType::STRUCT, 2);
-      $xfer += $this->jobSubmission->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addSSHJobSubmissionProtocol_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addSSHJobSubmissionProtocol_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addSSHJobSubmissionProtocol_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_args {
-  static $_TSPEC;
-
-  public $computeResourceId = null;
-  public $jobSubmission = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'computeResourceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'jobSubmission',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\GSISSHJobSubmission',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['computeResourceId'])) {
-        $this->computeResourceId = $vals['computeResourceId'];
-      }
-      if (isset($vals['jobSubmission'])) {
-        $this->jobSubmission = $vals['jobSubmission'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->computeResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->jobSubmission = new \Airavata\Model\AppCatalog\GSISSHJobSubmission();
-            $xfer += $this->jobSubmission->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_args');
-    if ($this->computeResourceId !== null) {
-      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->computeResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobSubmission !== null) {
-      if (!is_object($this->jobSubmission)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('jobSubmission', TType::STRUCT, 2);
-      $xfer += $this->jobSubmission->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addGSISSHJobSubmissionProtocol_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_args {
-  static $_TSPEC;
-
-  public $computeResourceId = null;
-  public $jobSubmission = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'computeResourceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'jobSubmission',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\GlobusJobSubmission',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['computeResourceId'])) {
-        $this->computeResourceId = $vals['computeResourceId'];
-      }
-      if (isset($vals['jobSubmission'])) {
-        $this->jobSubmission = $vals['jobSubmission'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->computeResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->jobSubmission = new \Airavata\Model\AppCatalog\GlobusJobSubmission();
-            $xfer += $this->jobSubmission->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_args');
-    if ($this->computeResourceId !== null) {
-      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->computeResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobSubmission !== null) {
-      if (!is_object($this->jobSubmission)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('jobSubmission', TType::STRUCT, 2);
-      $xfer += $this->jobSubmission->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addGlobusJobSubmissionProtocol_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addSCPDataMovementProtocol_args {
-  static $_TSPEC;
-
-  public $computeResourceId = null;
-  public $dataMovement = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'computeResourceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'dataMovement',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\SCPDataMovement',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['computeResourceId'])) {
-        $this->computeResourceId = $vals['computeResourceId'];
-      }
-      if (isset($vals['dataMovement'])) {
-        $this->dataMovement = $vals['dataMovement'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationCatalogAPI_addSCPDataMovementProtocol_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->computeResourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->dataMovement = new \Airavata\Model\AppCatalog\SCPDataMovement();
-            $xfer += $this->dataMovement->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationCatalogAPI_addSCPDataMovementProtocol_args');
-    if ($this->computeResourceId !== null) {
-      $xfer += $output->writeFieldBegin('computeResourceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->computeResourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->dataMovement !== null) {
-      if (!is_object($this->dataMovement)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('dataMovement', TType::STRUCT, 2);
-      $xfer += $this->dataMovement->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationCatalogAPI_addSCPDataMovementProtocol_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }

<TRUNCATED>

[09/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Experiment/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Experiment/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Experiment/Types.php
deleted file mode 100644
index 8554e04..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Experiment/Types.php
+++ /dev/null
@@ -1,4172 +0,0 @@
-<?php
-namespace Airavata\Model\Workspace\Experiment;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class ExperimentState {
-  const CREATED = 0;
-  const VALIDATED = 1;
-  const SCHEDULED = 2;
-  const LAUNCHED = 3;
-  const EXECUTING = 4;
-  const CANCELING = 5;
-  const CANCELED = 6;
-  const COMPLETED = 7;
-  const FAILED = 8;
-  const UNKNOWN = 9;
-  static public $__names = array(
-    0 => 'CREATED',
-    1 => 'VALIDATED',
-    2 => 'SCHEDULED',
-    3 => 'LAUNCHED',
-    4 => 'EXECUTING',
-    5 => 'CANCELING',
-    6 => 'CANCELED',
-    7 => 'COMPLETED',
-    8 => 'FAILED',
-    9 => 'UNKNOWN',
-  );
-}
-
-final class WorkflowNodeState {
-  const INVOKED = 0;
-  const EXECUTING = 1;
-  const CANCELING = 2;
-  const CANCELED = 3;
-  const COMPLETED = 4;
-  const FAILED = 5;
-  const UNKNOWN = 6;
-  static public $__names = array(
-    0 => 'INVOKED',
-    1 => 'EXECUTING',
-    2 => 'CANCELING',
-    3 => 'CANCELED',
-    4 => 'COMPLETED',
-    5 => 'FAILED',
-    6 => 'UNKNOWN',
-  );
-}
-
-final class TaskState {
-  const WAITING = 0;
-  const STARTED = 1;
-  const PRE_PROCESSING = 2;
-  const CONFIGURING_WORKSPACE = 3;
-  const INPUT_DATA_STAGING = 4;
-  const OUTPUT_DATA_STAGING = 5;
-  const POST_PROCESSING = 6;
-  const EXECUTING = 7;
-  const CANCELING = 8;
-  const CANCELED = 9;
-  const COMPLETED = 10;
-  const FAILED = 11;
-  const UNKNOWN = 12;
-  static public $__names = array(
-    0 => 'WAITING',
-    1 => 'STARTED',
-    2 => 'PRE_PROCESSING',
-    3 => 'CONFIGURING_WORKSPACE',
-    4 => 'INPUT_DATA_STAGING',
-    5 => 'OUTPUT_DATA_STAGING',
-    6 => 'POST_PROCESSING',
-    7 => 'EXECUTING',
-    8 => 'CANCELING',
-    9 => 'CANCELED',
-    10 => 'COMPLETED',
-    11 => 'FAILED',
-    12 => 'UNKNOWN',
-  );
-}
-
-final class JobState {
-  const SUBMITTED = 0;
-  const UN_SUBMITTED = 1;
-  const SETUP = 2;
-  const QUEUED = 3;
-  const ACTIVE = 4;
-  const COMPLETE = 5;
-  const CANCELING = 6;
-  const CANCELED = 7;
-  const FAILED = 8;
-  const HELD = 9;
-  const SUSPENDED = 10;
-  const UNKNOWN = 11;
-  static public $__names = array(
-    0 => 'SUBMITTED',
-    1 => 'UN_SUBMITTED',
-    2 => 'SETUP',
-    3 => 'QUEUED',
-    4 => 'ACTIVE',
-    5 => 'COMPLETE',
-    6 => 'CANCELING',
-    7 => 'CANCELED',
-    8 => 'FAILED',
-    9 => 'HELD',
-    10 => 'SUSPENDED',
-    11 => 'UNKNOWN',
-  );
-}
-
-final class TransferState {
-  const DIRECTORY_SETUP = 0;
-  const UPLOAD = 1;
-  const DOWNLOAD = 2;
-  const ACTIVE = 3;
-  const COMPLETE = 4;
-  const STDOUT_DOWNLOAD = 5;
-  const STDERROR_DOWNLOAD = 6;
-  const CANCELING = 7;
-  const CANCELED = 8;
-  const FAILED = 9;
-  const HELD = 10;
-  const SUSPENDED = 11;
-  const UNKNOWN = 12;
-  static public $__names = array(
-    0 => 'DIRECTORY_SETUP',
-    1 => 'UPLOAD',
-    2 => 'DOWNLOAD',
-    3 => 'ACTIVE',
-    4 => 'COMPLETE',
-    5 => 'STDOUT_DOWNLOAD',
-    6 => 'STDERROR_DOWNLOAD',
-    7 => 'CANCELING',
-    8 => 'CANCELED',
-    9 => 'FAILED',
-    10 => 'HELD',
-    11 => 'SUSPENDED',
-    12 => 'UNKNOWN',
-  );
-}
-
-final class ActionableGroup {
-  const RESOURCE_ADMINS = 0;
-  const AIRAVATA_ADMINS = 1;
-  const GATEWAYS_ADMINS = 2;
-  const USER = 3;
-  const CANNOT_BE_DETERMINED = 4;
-  static public $__names = array(
-    0 => 'RESOURCE_ADMINS',
-    1 => 'AIRAVATA_ADMINS',
-    2 => 'GATEWAYS_ADMINS',
-    3 => 'USER',
-    4 => 'CANNOT_BE_DETERMINED',
-  );
-}
-
-final class ErrorCategory {
-  const FILE_SYSTEM_FAILURE = 0;
-  const APPLICATION_FAILURE = 1;
-  const RESOURCE_NODE_FAILURE = 2;
-  const DISK_FULL = 3;
-  const INSUFFICIENT_ALLOCATION = 4;
-  const SYSTEM_MAINTENANCE = 5;
-  const AIRAVATA_INTERNAL_ERROR = 6;
-  const CANNOT_BE_DETERMINED = 7;
-  static public $__names = array(
-    0 => 'FILE_SYSTEM_FAILURE',
-    1 => 'APPLICATION_FAILURE',
-    2 => 'RESOURCE_NODE_FAILURE',
-    3 => 'DISK_FULL',
-    4 => 'INSUFFICIENT_ALLOCATION',
-    5 => 'SYSTEM_MAINTENANCE',
-    6 => 'AIRAVATA_INTERNAL_ERROR',
-    7 => 'CANNOT_BE_DETERMINED',
-  );
-}
-
-final class CorrectiveAction {
-  const RETRY_SUBMISSION = 0;
-  const CONTACT_SUPPORT = 1;
-  const CANNOT_BE_DETERMINED = 2;
-  static public $__names = array(
-    0 => 'RETRY_SUBMISSION',
-    1 => 'CONTACT_SUPPORT',
-    2 => 'CANNOT_BE_DETERMINED',
-  );
-}
-
-final class DataType {
-  const STRING = 0;
-  const INTEGER = 1;
-  const URI = 2;
-  const STDOUT = 3;
-  const STDERR = 4;
-  static public $__names = array(
-    0 => 'STRING',
-    1 => 'INTEGER',
-    2 => 'URI',
-    3 => 'STDOUT',
-    4 => 'STDERR',
-  );
-}
-
-class ExperimentStatus {
-  static $_TSPEC;
-
-  public $experimentState = null;
-  public $timeOfStateChange = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'experimentState',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'timeOfStateChange',
-          'type' => TType::I64,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['experimentState'])) {
-        $this->experimentState = $vals['experimentState'];
-      }
-      if (isset($vals['timeOfStateChange'])) {
-        $this->timeOfStateChange = $vals['timeOfStateChange'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ExperimentStatus';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->experimentState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->timeOfStateChange);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ExperimentStatus');
-    if ($this->experimentState !== null) {
-      $xfer += $output->writeFieldBegin('experimentState', TType::I32, 1);
-      $xfer += $output->writeI32($this->experimentState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->timeOfStateChange !== null) {
-      $xfer += $output->writeFieldBegin('timeOfStateChange', TType::I64, 2);
-      $xfer += $output->writeI64($this->timeOfStateChange);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class WorkflowNodeStatus {
-  static $_TSPEC;
-
-  public $workflowNodeState = null;
-  public $timeOfStateChange = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'workflowNodeState',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'timeOfStateChange',
-          'type' => TType::I64,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['workflowNodeState'])) {
-        $this->workflowNodeState = $vals['workflowNodeState'];
-      }
-      if (isset($vals['timeOfStateChange'])) {
-        $this->timeOfStateChange = $vals['timeOfStateChange'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'WorkflowNodeStatus';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->workflowNodeState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->timeOfStateChange);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('WorkflowNodeStatus');
-    if ($this->workflowNodeState !== null) {
-      $xfer += $output->writeFieldBegin('workflowNodeState', TType::I32, 1);
-      $xfer += $output->writeI32($this->workflowNodeState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->timeOfStateChange !== null) {
-      $xfer += $output->writeFieldBegin('timeOfStateChange', TType::I64, 2);
-      $xfer += $output->writeI64($this->timeOfStateChange);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class TaskStatus {
-  static $_TSPEC;
-
-  public $executionState = null;
-  public $timeOfStateChange = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'executionState',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'timeOfStateChange',
-          'type' => TType::I64,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['executionState'])) {
-        $this->executionState = $vals['executionState'];
-      }
-      if (isset($vals['timeOfStateChange'])) {
-        $this->timeOfStateChange = $vals['timeOfStateChange'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'TaskStatus';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->executionState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->timeOfStateChange);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('TaskStatus');
-    if ($this->executionState !== null) {
-      $xfer += $output->writeFieldBegin('executionState', TType::I32, 1);
-      $xfer += $output->writeI32($this->executionState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->timeOfStateChange !== null) {
-      $xfer += $output->writeFieldBegin('timeOfStateChange', TType::I64, 2);
-      $xfer += $output->writeI64($this->timeOfStateChange);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class JobStatus {
-  static $_TSPEC;
-
-  public $jobState = null;
-  public $timeOfStateChange = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'jobState',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'timeOfStateChange',
-          'type' => TType::I64,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['jobState'])) {
-        $this->jobState = $vals['jobState'];
-      }
-      if (isset($vals['timeOfStateChange'])) {
-        $this->timeOfStateChange = $vals['timeOfStateChange'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'JobStatus';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->jobState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->timeOfStateChange);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('JobStatus');
-    if ($this->jobState !== null) {
-      $xfer += $output->writeFieldBegin('jobState', TType::I32, 1);
-      $xfer += $output->writeI32($this->jobState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->timeOfStateChange !== null) {
-      $xfer += $output->writeFieldBegin('timeOfStateChange', TType::I64, 2);
-      $xfer += $output->writeI64($this->timeOfStateChange);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class TransferStatus {
-  static $_TSPEC;
-
-  public $transferState = null;
-  public $timeOfStateChange = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'transferState',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'timeOfStateChange',
-          'type' => TType::I64,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['transferState'])) {
-        $this->transferState = $vals['transferState'];
-      }
-      if (isset($vals['timeOfStateChange'])) {
-        $this->timeOfStateChange = $vals['timeOfStateChange'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'TransferStatus';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->transferState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->timeOfStateChange);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('TransferStatus');
-    if ($this->transferState !== null) {
-      $xfer += $output->writeFieldBegin('transferState', TType::I32, 1);
-      $xfer += $output->writeI32($this->transferState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->timeOfStateChange !== null) {
-      $xfer += $output->writeFieldBegin('timeOfStateChange', TType::I64, 2);
-      $xfer += $output->writeI64($this->timeOfStateChange);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationStatus {
-  static $_TSPEC;
-
-  public $applicationState = null;
-  public $timeOfStateChange = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'applicationState',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'timeOfStateChange',
-          'type' => TType::I64,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['applicationState'])) {
-        $this->applicationState = $vals['applicationState'];
-      }
-      if (isset($vals['timeOfStateChange'])) {
-        $this->timeOfStateChange = $vals['timeOfStateChange'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationStatus';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->timeOfStateChange);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationStatus');
-    if ($this->applicationState !== null) {
-      $xfer += $output->writeFieldBegin('applicationState', TType::STRING, 1);
-      $xfer += $output->writeString($this->applicationState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->timeOfStateChange !== null) {
-      $xfer += $output->writeFieldBegin('timeOfStateChange', TType::I64, 2);
-      $xfer += $output->writeI64($this->timeOfStateChange);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class DataObjectType {
-  static $_TSPEC;
-
-  public $key = null;
-  public $value = null;
-  public $type = null;
-  public $metaData = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'key',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'value',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'type',
-          'type' => TType::I32,
-          ),
-        4 => array(
-          'var' => 'metaData',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['key'])) {
-        $this->key = $vals['key'];
-      }
-      if (isset($vals['value'])) {
-        $this->value = $vals['value'];
-      }
-      if (isset($vals['type'])) {
-        $this->type = $vals['type'];
-      }
-      if (isset($vals['metaData'])) {
-        $this->metaData = $vals['metaData'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'DataObjectType';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->key);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->value);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->type);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->metaData);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('DataObjectType');
-    if ($this->key !== null) {
-      $xfer += $output->writeFieldBegin('key', TType::STRING, 1);
-      $xfer += $output->writeString($this->key);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->value !== null) {
-      $xfer += $output->writeFieldBegin('value', TType::STRING, 2);
-      $xfer += $output->writeString($this->value);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->type !== null) {
-      $xfer += $output->writeFieldBegin('type', TType::I32, 3);
-      $xfer += $output->writeI32($this->type);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->metaData !== null) {
-      $xfer += $output->writeFieldBegin('metaData', TType::STRING, 4);
-      $xfer += $output->writeString($this->metaData);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ComputationalResourceScheduling {
-  static $_TSPEC;
-
-  public $resourceHostId = null;
-  public $totalCPUCount = null;
-  public $nodeCount = null;
-  public $numberOfThreads = null;
-  public $queueName = null;
-  public $wallTimeLimit = null;
-  public $jobStartTime = null;
-  public $totalPhysicalMemory = null;
-  public $ComputationalProjectAccount = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'resourceHostId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'totalCPUCount',
-          'type' => TType::I32,
-          ),
-        3 => array(
-          'var' => 'nodeCount',
-          'type' => TType::I32,
-          ),
-        4 => array(
-          'var' => 'numberOfThreads',
-          'type' => TType::I32,
-          ),
-        5 => array(
-          'var' => 'queueName',
-          'type' => TType::STRING,
-          ),
-        6 => array(
-          'var' => 'wallTimeLimit',
-          'type' => TType::I32,
-          ),
-        7 => array(
-          'var' => 'jobStartTime',
-          'type' => TType::I32,
-          ),
-        8 => array(
-          'var' => 'totalPhysicalMemory',
-          'type' => TType::I32,
-          ),
-        9 => array(
-          'var' => 'ComputationalProjectAccount',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['resourceHostId'])) {
-        $this->resourceHostId = $vals['resourceHostId'];
-      }
-      if (isset($vals['totalCPUCount'])) {
-        $this->totalCPUCount = $vals['totalCPUCount'];
-      }
-      if (isset($vals['nodeCount'])) {
-        $this->nodeCount = $vals['nodeCount'];
-      }
-      if (isset($vals['numberOfThreads'])) {
-        $this->numberOfThreads = $vals['numberOfThreads'];
-      }
-      if (isset($vals['queueName'])) {
-        $this->queueName = $vals['queueName'];
-      }
-      if (isset($vals['wallTimeLimit'])) {
-        $this->wallTimeLimit = $vals['wallTimeLimit'];
-      }
-      if (isset($vals['jobStartTime'])) {
-        $this->jobStartTime = $vals['jobStartTime'];
-      }
-      if (isset($vals['totalPhysicalMemory'])) {
-        $this->totalPhysicalMemory = $vals['totalPhysicalMemory'];
-      }
-      if (isset($vals['ComputationalProjectAccount'])) {
-        $this->ComputationalProjectAccount = $vals['ComputationalProjectAccount'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ComputationalResourceScheduling';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceHostId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->totalCPUCount);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->nodeCount);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->numberOfThreads);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->queueName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->wallTimeLimit);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->jobStartTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->totalPhysicalMemory);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->ComputationalProjectAccount);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ComputationalResourceScheduling');
-    if ($this->resourceHostId !== null) {
-      $xfer += $output->writeFieldBegin('resourceHostId', TType::STRING, 1);
-      $xfer += $output->writeString($this->resourceHostId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->totalCPUCount !== null) {
-      $xfer += $output->writeFieldBegin('totalCPUCount', TType::I32, 2);
-      $xfer += $output->writeI32($this->totalCPUCount);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->nodeCount !== null) {
-      $xfer += $output->writeFieldBegin('nodeCount', TType::I32, 3);
-      $xfer += $output->writeI32($this->nodeCount);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->numberOfThreads !== null) {
-      $xfer += $output->writeFieldBegin('numberOfThreads', TType::I32, 4);
-      $xfer += $output->writeI32($this->numberOfThreads);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->queueName !== null) {
-      $xfer += $output->writeFieldBegin('queueName', TType::STRING, 5);
-      $xfer += $output->writeString($this->queueName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->wallTimeLimit !== null) {
-      $xfer += $output->writeFieldBegin('wallTimeLimit', TType::I32, 6);
-      $xfer += $output->writeI32($this->wallTimeLimit);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobStartTime !== null) {
-      $xfer += $output->writeFieldBegin('jobStartTime', TType::I32, 7);
-      $xfer += $output->writeI32($this->jobStartTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->totalPhysicalMemory !== null) {
-      $xfer += $output->writeFieldBegin('totalPhysicalMemory', TType::I32, 8);
-      $xfer += $output->writeI32($this->totalPhysicalMemory);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ComputationalProjectAccount !== null) {
-      $xfer += $output->writeFieldBegin('ComputationalProjectAccount', TType::STRING, 9);
-      $xfer += $output->writeString($this->ComputationalProjectAccount);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class AdvancedInputDataHandling {
-  static $_TSPEC;
-
-  public $stageInputFilesToWorkingDir = false;
-  public $parentWorkingDirectory = null;
-  public $uniqueWorkingDirectory = null;
-  public $cleanUpWorkingDirAfterJob = false;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'stageInputFilesToWorkingDir',
-          'type' => TType::BOOL,
-          ),
-        2 => array(
-          'var' => 'parentWorkingDirectory',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'uniqueWorkingDirectory',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'cleanUpWorkingDirAfterJob',
-          'type' => TType::BOOL,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['stageInputFilesToWorkingDir'])) {
-        $this->stageInputFilesToWorkingDir = $vals['stageInputFilesToWorkingDir'];
-      }
-      if (isset($vals['parentWorkingDirectory'])) {
-        $this->parentWorkingDirectory = $vals['parentWorkingDirectory'];
-      }
-      if (isset($vals['uniqueWorkingDirectory'])) {
-        $this->uniqueWorkingDirectory = $vals['uniqueWorkingDirectory'];
-      }
-      if (isset($vals['cleanUpWorkingDirAfterJob'])) {
-        $this->cleanUpWorkingDirAfterJob = $vals['cleanUpWorkingDirAfterJob'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'AdvancedInputDataHandling';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->stageInputFilesToWorkingDir);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->parentWorkingDirectory);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->uniqueWorkingDirectory);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->cleanUpWorkingDirAfterJob);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('AdvancedInputDataHandling');
-    if ($this->stageInputFilesToWorkingDir !== null) {
-      $xfer += $output->writeFieldBegin('stageInputFilesToWorkingDir', TType::BOOL, 1);
-      $xfer += $output->writeBool($this->stageInputFilesToWorkingDir);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->parentWorkingDirectory !== null) {
-      $xfer += $output->writeFieldBegin('parentWorkingDirectory', TType::STRING, 2);
-      $xfer += $output->writeString($this->parentWorkingDirectory);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->uniqueWorkingDirectory !== null) {
-      $xfer += $output->writeFieldBegin('uniqueWorkingDirectory', TType::STRING, 3);
-      $xfer += $output->writeString($this->uniqueWorkingDirectory);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->cleanUpWorkingDirAfterJob !== null) {
-      $xfer += $output->writeFieldBegin('cleanUpWorkingDirAfterJob', TType::BOOL, 4);
-      $xfer += $output->writeBool($this->cleanUpWorkingDirAfterJob);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class AdvancedOutputDataHandling {
-  static $_TSPEC;
-
-  public $outputDataDir = null;
-  public $dataRegistryURL = null;
-  public $persistOutputData = true;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        2 => array(
-          'var' => 'outputDataDir',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'dataRegistryURL',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'persistOutputData',
-          'type' => TType::BOOL,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['outputDataDir'])) {
-        $this->outputDataDir = $vals['outputDataDir'];
-      }
-      if (isset($vals['dataRegistryURL'])) {
-        $this->dataRegistryURL = $vals['dataRegistryURL'];
-      }
-      if (isset($vals['persistOutputData'])) {
-        $this->persistOutputData = $vals['persistOutputData'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'AdvancedOutputDataHandling';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->outputDataDir);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->dataRegistryURL);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->persistOutputData);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('AdvancedOutputDataHandling');
-    if ($this->outputDataDir !== null) {
-      $xfer += $output->writeFieldBegin('outputDataDir', TType::STRING, 2);
-      $xfer += $output->writeString($this->outputDataDir);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->dataRegistryURL !== null) {
-      $xfer += $output->writeFieldBegin('dataRegistryURL', TType::STRING, 3);
-      $xfer += $output->writeString($this->dataRegistryURL);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->persistOutputData !== null) {
-      $xfer += $output->writeFieldBegin('persistOutputData', TType::BOOL, 4);
-      $xfer += $output->writeBool($this->persistOutputData);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class QualityOfServiceParams {
-  static $_TSPEC;
-
-  public $startExecutionAt = null;
-  public $executeBefore = null;
-  public $numberofRetries = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'startExecutionAt',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'executeBefore',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'numberofRetries',
-          'type' => TType::I32,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['startExecutionAt'])) {
-        $this->startExecutionAt = $vals['startExecutionAt'];
-      }
-      if (isset($vals['executeBefore'])) {
-        $this->executeBefore = $vals['executeBefore'];
-      }
-      if (isset($vals['numberofRetries'])) {
-        $this->numberofRetries = $vals['numberofRetries'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'QualityOfServiceParams';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->startExecutionAt);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->executeBefore);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->numberofRetries);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('QualityOfServiceParams');
-    if ($this->startExecutionAt !== null) {
-      $xfer += $output->writeFieldBegin('startExecutionAt', TType::STRING, 1);
-      $xfer += $output->writeString($this->startExecutionAt);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->executeBefore !== null) {
-      $xfer += $output->writeFieldBegin('executeBefore', TType::STRING, 2);
-      $xfer += $output->writeString($this->executeBefore);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->numberofRetries !== null) {
-      $xfer += $output->writeFieldBegin('numberofRetries', TType::I32, 3);
-      $xfer += $output->writeI32($this->numberofRetries);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class UserConfigurationData {
-  static $_TSPEC;
-
-  public $airavataAutoSchedule = false;
-  public $overrideManualScheduledParams = false;
-  public $shareExperimentPublicly = false;
-  public $computationalResourceScheduling = null;
-  public $advanceInputDataHandling = null;
-  public $advanceOutputDataHandling = null;
-  public $qosParams = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'airavataAutoSchedule',
-          'type' => TType::BOOL,
-          ),
-        2 => array(
-          'var' => 'overrideManualScheduledParams',
-          'type' => TType::BOOL,
-          ),
-        3 => array(
-          'var' => 'shareExperimentPublicly',
-          'type' => TType::BOOL,
-          ),
-        4 => array(
-          'var' => 'computationalResourceScheduling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling',
-          ),
-        5 => array(
-          'var' => 'advanceInputDataHandling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\AdvancedInputDataHandling',
-          ),
-        6 => array(
-          'var' => 'advanceOutputDataHandling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling',
-          ),
-        7 => array(
-          'var' => 'qosParams',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\QualityOfServiceParams',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['airavataAutoSchedule'])) {
-        $this->airavataAutoSchedule = $vals['airavataAutoSchedule'];
-      }
-      if (isset($vals['overrideManualScheduledParams'])) {
-        $this->overrideManualScheduledParams = $vals['overrideManualScheduledParams'];
-      }
-      if (isset($vals['shareExperimentPublicly'])) {
-        $this->shareExperimentPublicly = $vals['shareExperimentPublicly'];
-      }
-      if (isset($vals['computationalResourceScheduling'])) {
-        $this->computationalResourceScheduling = $vals['computationalResourceScheduling'];
-      }
-      if (isset($vals['advanceInputDataHandling'])) {
-        $this->advanceInputDataHandling = $vals['advanceInputDataHandling'];
-      }
-      if (isset($vals['advanceOutputDataHandling'])) {
-        $this->advanceOutputDataHandling = $vals['advanceOutputDataHandling'];
-      }
-      if (isset($vals['qosParams'])) {
-        $this->qosParams = $vals['qosParams'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'UserConfigurationData';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->airavataAutoSchedule);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->overrideManualScheduledParams);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->shareExperimentPublicly);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRUCT) {
-            $this->computationalResourceScheduling = new \Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling();
-            $xfer += $this->computationalResourceScheduling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::STRUCT) {
-            $this->advanceInputDataHandling = new \Airavata\Model\Workspace\Experiment\AdvancedInputDataHandling();
-            $xfer += $this->advanceInputDataHandling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::STRUCT) {
-            $this->advanceOutputDataHandling = new \Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling();
-            $xfer += $this->advanceOutputDataHandling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::STRUCT) {
-            $this->qosParams = new \Airavata\Model\Workspace\Experiment\QualityOfServiceParams();
-            $xfer += $this->qosParams->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('UserConfigurationData');
-    if ($this->airavataAutoSchedule !== null) {
-      $xfer += $output->writeFieldBegin('airavataAutoSchedule', TType::BOOL, 1);
-      $xfer += $output->writeBool($this->airavataAutoSchedule);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->overrideManualScheduledParams !== null) {
-      $xfer += $output->writeFieldBegin('overrideManualScheduledParams', TType::BOOL, 2);
-      $xfer += $output->writeBool($this->overrideManualScheduledParams);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->shareExperimentPublicly !== null) {
-      $xfer += $output->writeFieldBegin('shareExperimentPublicly', TType::BOOL, 3);
-      $xfer += $output->writeBool($this->shareExperimentPublicly);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->computationalResourceScheduling !== null) {
-      if (!is_object($this->computationalResourceScheduling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('computationalResourceScheduling', TType::STRUCT, 4);
-      $xfer += $this->computationalResourceScheduling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->advanceInputDataHandling !== null) {
-      if (!is_object($this->advanceInputDataHandling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('advanceInputDataHandling', TType::STRUCT, 5);
-      $xfer += $this->advanceInputDataHandling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->advanceOutputDataHandling !== null) {
-      if (!is_object($this->advanceOutputDataHandling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('advanceOutputDataHandling', TType::STRUCT, 6);
-      $xfer += $this->advanceOutputDataHandling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->qosParams !== null) {
-      if (!is_object($this->qosParams)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('qosParams', TType::STRUCT, 7);
-      $xfer += $this->qosParams->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ErrorDetails {
-  static $_TSPEC;
-
-  public $errorID = "DO_NOT_SET_AT_CLIENTS";
-  public $creationTime = null;
-  public $actualErrorMessage = null;
-  public $userFriendlyMessage = null;
-  public $errorCategory = null;
-  public $transientOrPersistent = false;
-  public $correctiveAction = null;
-  public $actionableGroup = null;
-  public $rootCauseErrorIdList = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'errorID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        3 => array(
-          'var' => 'actualErrorMessage',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'userFriendlyMessage',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'errorCategory',
-          'type' => TType::I32,
-          ),
-        6 => array(
-          'var' => 'transientOrPersistent',
-          'type' => TType::BOOL,
-          ),
-        7 => array(
-          'var' => 'correctiveAction',
-          'type' => TType::I32,
-          ),
-        8 => array(
-          'var' => 'actionableGroup',
-          'type' => TType::I32,
-          ),
-        9 => array(
-          'var' => 'rootCauseErrorIdList',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['errorID'])) {
-        $this->errorID = $vals['errorID'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['actualErrorMessage'])) {
-        $this->actualErrorMessage = $vals['actualErrorMessage'];
-      }
-      if (isset($vals['userFriendlyMessage'])) {
-        $this->userFriendlyMessage = $vals['userFriendlyMessage'];
-      }
-      if (isset($vals['errorCategory'])) {
-        $this->errorCategory = $vals['errorCategory'];
-      }
-      if (isset($vals['transientOrPersistent'])) {
-        $this->transientOrPersistent = $vals['transientOrPersistent'];
-      }
-      if (isset($vals['correctiveAction'])) {
-        $this->correctiveAction = $vals['correctiveAction'];
-      }
-      if (isset($vals['actionableGroup'])) {
-        $this->actionableGroup = $vals['actionableGroup'];
-      }
-      if (isset($vals['rootCauseErrorIdList'])) {
-        $this->rootCauseErrorIdList = $vals['rootCauseErrorIdList'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ErrorDetails';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->errorID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->actualErrorMessage);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userFriendlyMessage);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->errorCategory);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->transientOrPersistent);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->correctiveAction);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->actionableGroup);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::LST) {
-            $this->rootCauseErrorIdList = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $xfer += $input->readString($elem5);
-              $this->rootCauseErrorIdList []= $elem5;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ErrorDetails');
-    if ($this->errorID !== null) {
-      $xfer += $output->writeFieldBegin('errorID', TType::STRING, 1);
-      $xfer += $output->writeString($this->errorID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 2);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->actualErrorMessage !== null) {
-      $xfer += $output->writeFieldBegin('actualErrorMessage', TType::STRING, 3);
-      $xfer += $output->writeString($this->actualErrorMessage);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->userFriendlyMessage !== null) {
-      $xfer += $output->writeFieldBegin('userFriendlyMessage', TType::STRING, 4);
-      $xfer += $output->writeString($this->userFriendlyMessage);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->errorCategory !== null) {
-      $xfer += $output->writeFieldBegin('errorCategory', TType::I32, 5);
-      $xfer += $output->writeI32($this->errorCategory);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->transientOrPersistent !== null) {
-      $xfer += $output->writeFieldBegin('transientOrPersistent', TType::BOOL, 6);
-      $xfer += $output->writeBool($this->transientOrPersistent);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->correctiveAction !== null) {
-      $xfer += $output->writeFieldBegin('correctiveAction', TType::I32, 7);
-      $xfer += $output->writeI32($this->correctiveAction);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->actionableGroup !== null) {
-      $xfer += $output->writeFieldBegin('actionableGroup', TType::I32, 8);
-      $xfer += $output->writeI32($this->actionableGroup);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->rootCauseErrorIdList !== null) {
-      if (!is_array($this->rootCauseErrorIdList)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('rootCauseErrorIdList', TType::LST, 9);
-      {
-        $output->writeListBegin(TType::STRING, count($this->rootCauseErrorIdList));
-        {
-          foreach ($this->rootCauseErrorIdList as $iter6)
-          {
-            $xfer += $output->writeString($iter6);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class JobDetails {
-  static $_TSPEC;
-
-  public $jobID = "DO_NOT_SET_AT_CLIENTS";
-  public $jobDescription = null;
-  public $creationTime = null;
-  public $jobStatus = null;
-  public $applicationStatus = null;
-  public $errors = null;
-  public $computeResourceConsumed = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'jobID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'jobDescription',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        4 => array(
-          'var' => 'jobStatus',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\JobStatus',
-          ),
-        5 => array(
-          'var' => 'applicationStatus',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\ApplicationStatus',
-          ),
-        6 => array(
-          'var' => 'errors',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\ErrorDetails',
-            ),
-          ),
-        7 => array(
-          'var' => 'computeResourceConsumed',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['jobID'])) {
-        $this->jobID = $vals['jobID'];
-      }
-      if (isset($vals['jobDescription'])) {
-        $this->jobDescription = $vals['jobDescription'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['jobStatus'])) {
-        $this->jobStatus = $vals['jobStatus'];
-      }
-      if (isset($vals['applicationStatus'])) {
-        $this->applicationStatus = $vals['applicationStatus'];
-      }
-      if (isset($vals['errors'])) {
-        $this->errors = $vals['errors'];
-      }
-      if (isset($vals['computeResourceConsumed'])) {
-        $this->computeResourceConsumed = $vals['computeResourceConsumed'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'JobDetails';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRUCT) {
-            $this->jobStatus = new \Airavata\Model\Workspace\Experiment\JobStatus();
-            $xfer += $this->jobStatus->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::STRUCT) {
-            $this->applicationStatus = new \Airavata\Model\Workspace\Experiment\ApplicationStatus();
-            $xfer += $this->applicationStatus->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::LST) {
-            $this->errors = array();
-            $_size7 = 0;
-            $_etype10 = 0;
-            $xfer += $input->readListBegin($_etype10, $_size7);
-            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
-            {
-              $elem12 = null;
-              $elem12 = new \Airavata\Model\Workspace\Experiment\ErrorDetails();
-              $xfer += $elem12->read($input);
-              $this->errors []= $elem12;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->computeResourceConsumed);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('JobDetails');
-    if ($this->jobID !== null) {
-      $xfer += $output->writeFieldBegin('jobID', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobDescription !== null) {
-      $xfer += $output->writeFieldBegin('jobDescription', TType::STRING, 2);
-      $xfer += $output->writeString($this->jobDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 3);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobStatus !== null) {
-      if (!is_object($this->jobStatus)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('jobStatus', TType::STRUCT, 4);
-      $xfer += $this->jobStatus->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationStatus !== null) {
-      if (!is_object($this->applicationStatus)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('applicationStatus', TType::STRUCT, 5);
-      $xfer += $this->applicationStatus->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->errors !== null) {
-      if (!is_array($this->errors)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('errors', TType::LST, 6);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->errors));
-        {
-          foreach ($this->errors as $iter13)
-          {
-            $xfer += $iter13->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->computeResourceConsumed !== null) {
-      $xfer += $output->writeFieldBegin('computeResourceConsumed', TType::STRING, 7);
-      $xfer += $output->writeString($this->computeResourceConsumed);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class DataTransferDetails {
-  static $_TSPEC;
-
-  public $transferID = "DO_NOT_SET_AT_CLIENTS";
-  public $creationTime = null;
-  public $transferDescription = null;
-  public $transferStatus = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'transferID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        3 => array(
-          'var' => 'transferDescription',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'transferStatus',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\TransferStatus',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['transferID'])) {
-        $this->transferID = $vals['transferID'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['transferDescription'])) {
-        $this->transferDescription = $vals['transferDescription'];
-      }
-      if (isset($vals['transferStatus'])) {
-        $this->transferStatus = $vals['transferStatus'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'DataTransferDetails';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->transferID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->transferDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRUCT) {
-            $this->transferStatus = new \Airavata\Model\Workspace\Experiment\TransferStatus();
-            $xfer += $this->transferStatus->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('DataTransferDetails');
-    if ($this->transferID !== null) {
-      $xfer += $output->writeFieldBegin('transferID', TType::STRING, 1);
-      $xfer += $output->writeString($this->transferID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 2);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->transferDescription !== null) {
-      $xfer += $output->writeFieldBegin('transferDescription', TType::STRING, 3);
-      $xfer += $output->writeString($this->transferDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->transferStatus !== null) {
-      if (!is_object($this->transferStatus)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('transferStatus', TType::STRUCT, 4);
-      $xfer += $this->transferStatus->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class TaskDetails {
-  static $_TSPEC;
-
-  public $taskID = "DO_NOT_SET_AT_CLIENTS";
-  public $creationTime = null;
-  public $applicationId = null;
-  public $applicationVersion = null;
-  public $applicationInputs = null;
-  public $applicationOutputs = null;
-  public $taskScheduling = null;
-  public $advancedInputDataHandling = null;
-  public $advancedOutputDataHandling = null;
-  public $taskStatus = null;
-  public $jobDetailsList = null;
-  public $dataTransferDetailsList = null;
-  public $errors = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'taskID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        3 => array(
-          'var' => 'applicationId',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'applicationVersion',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'applicationInputs',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\DataObjectType',
-            ),
-          ),
-        6 => array(
-          'var' => 'applicationOutputs',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\DataObjectType',
-            ),
-          ),
-        7 => array(
-          'var' => 'taskScheduling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling',
-          ),
-        8 => array(
-          'var' => 'advancedInputDataHandling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\AdvancedInputDataHandling',
-          ),
-        9 => array(
-          'var' => 'advancedOutputDataHandling',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling',
-          ),
-        10 => array(
-          'var' => 'taskStatus',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\TaskStatus',
-          ),
-        11 => array(
-          'var' => 'jobDetailsList',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\JobDetails',
-            ),
-          ),
-        12 => array(
-          'var' => 'dataTransferDetailsList',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\DataTransferDetails',
-            ),
-          ),
-        13 => array(
-          'var' => 'errors',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\ErrorDetails',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['taskID'])) {
-        $this->taskID = $vals['taskID'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['applicationId'])) {
-        $this->applicationId = $vals['applicationId'];
-      }
-      if (isset($vals['applicationVersion'])) {
-        $this->applicationVersion = $vals['applicationVersion'];
-      }
-      if (isset($vals['applicationInputs'])) {
-        $this->applicationInputs = $vals['applicationInputs'];
-      }
-      if (isset($vals['applicationOutputs'])) {
-        $this->applicationOutputs = $vals['applicationOutputs'];
-      }
-      if (isset($vals['taskScheduling'])) {
-        $this->taskScheduling = $vals['taskScheduling'];
-      }
-      if (isset($vals['advancedInputDataHandling'])) {
-        $this->advancedInputDataHandling = $vals['advancedInputDataHandling'];
-      }
-      if (isset($vals['advancedOutputDataHandling'])) {
-        $this->advancedOutputDataHandling = $vals['advancedOutputDataHandling'];
-      }
-      if (isset($vals['taskStatus'])) {
-        $this->taskStatus = $vals['taskStatus'];
-      }
-      if (isset($vals['jobDetailsList'])) {
-        $this->jobDetailsList = $vals['jobDetailsList'];
-      }
-      if (isset($vals['dataTransferDetailsList'])) {
-        $this->dataTransferDetailsList = $vals['dataTransferDetailsList'];
-      }
-      if (isset($vals['errors'])) {
-        $this->errors = $vals['errors'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'TaskDetails';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->taskID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationVersion);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::LST) {
-            $this->applicationInputs = array();
-            $_size14 = 0;
-            $_etype17 = 0;
-            $xfer += $input->readListBegin($_etype17, $_size14);
-            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
-            {
-              $elem19 = null;
-              $elem19 = new \Airavata\Model\Workspace\Experiment\DataObjectType();
-              $xfer += $elem19->read($input);
-              $this->applicationInputs []= $elem19;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::LST) {
-            $this->applicationOutputs = array();
-            $_size20 = 0;
-            $_etype23 = 0;
-            $xfer += $input->readListBegin($_etype23, $_size20);
-            for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
-            {
-              $elem25 = null;
-              $elem25 = new \Airavata\Model\Workspace\Experiment\DataObjectType();
-              $xfer += $elem25->read($input);
-              $this->applicationOutputs []= $elem25;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::STRUCT) {
-            $this->taskScheduling = new \Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling();
-            $xfer += $this->taskScheduling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::STRUCT) {
-            $this->advancedInputDataHandling = new \Airavata\Model\Workspace\Experiment\AdvancedInputDataHandling();
-            $xfer += $this->advancedInputDataHandling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::STRUCT) {
-            $this->advancedOutputDataHandling = new \Airavata\Model\Workspace\Experiment\AdvancedOutputDataHandling();
-            $xfer += $this->advancedOutputDataHandling->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 10:
-          if ($ftype == TType::STRUCT) {
-            $this->taskStatus = new \Airavata\Model\Workspace\Experiment\TaskStatus();
-            $xfer += $this->taskStatus->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 11:
-          if ($ftype == TType::LST) {
-            $this->jobDetailsList = array();
-            $_size26 = 0;
-            $_etype29 = 0;
-            $xfer += $input->readListBegin($_etype29, $_size26);
-            for ($_i30 = 0; $_i30 < $_size26; ++$_i30)
-            {
-              $elem31 = null;
-              $elem31 = new \Airavata\Model\Workspace\Experiment\JobDetails();
-              $xfer += $elem31->read($input);
-              $this->jobDetailsList []= $elem31;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 12:
-          if ($ftype == TType::LST) {
-            $this->dataTransferDetailsList = array();
-            $_size32 = 0;
-            $_etype35 = 0;
-            $xfer += $input->readListBegin($_etype35, $_size32);
-            for ($_i36 = 0; $_i36 < $_size32; ++$_i36)
-            {
-              $elem37 = null;
-              $elem37 = new \Airavata\Model\Workspace\Experiment\DataTransferDetails();
-              $xfer += $elem37->read($input);
-              $this->dataTransferDetailsList []= $elem37;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 13:
-          if ($ftype == TType::LST) {
-            $this->errors = array();
-            $_size38 = 0;
-            $_etype41 = 0;
-            $xfer += $input->readListBegin($_etype41, $_size38);
-            for ($_i42 = 0; $_i42 < $_size38; ++$_i42)
-            {
-              $elem43 = null;
-              $elem43 = new \Airavata\Model\Workspace\Experiment\ErrorDetails();
-              $xfer += $elem43->read($input);
-              $this->errors []= $elem43;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('TaskDetails');
-    if ($this->taskID !== null) {
-      $xfer += $output->writeFieldBegin('taskID', TType::STRING, 1);
-      $xfer += $output->writeString($this->taskID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 2);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationId !== null) {
-      $xfer += $output->writeFieldBegin('applicationId', TType::STRING, 3);
-      $xfer += $output->writeString($this->applicationId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationVersion !== null) {
-      $xfer += $output->writeFieldBegin('applicationVersion', TType::STRING, 4);
-      $xfer += $output->writeString($this->applicationVersion);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationInputs !== null) {
-      if (!is_array($this->applicationInputs)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('applicationInputs', TType::LST, 5);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->applicationInputs));
-        {
-          foreach ($this->applicationInputs as $iter44)
-          {
-            $xfer += $iter44->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationOutputs !== null) {
-      if (!is_array($this->applicationOutputs)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('applicationOutputs', TType::LST, 6);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->applicationOutputs));
-        {
-          foreach ($this->applicationOutputs as $iter45)
-          {
-            $xfer += $iter45->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->taskScheduling !== null) {
-      if (!is_object($this->taskScheduling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('taskScheduling', TType::STRUCT, 7);
-      $xfer += $this->taskScheduling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->advancedInputDataHandling !== null) {
-      if (!is_object($this->advancedInputDataHandling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('advancedInputDataHandling', TType::STRUCT, 8);
-      $xfer += $this->advancedInputDataHandling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->advancedOutputDataHandling !== null) {
-      if (!is_object($this->advancedOutputDataHandling)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('advancedOutputDataHandling', TType::STRUCT, 9);
-      $xfer += $this->advancedOutputDataHandling->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->taskStatus !== null) {
-      if (!is_object($this->taskStatus)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('taskStatus', TType::STRUCT, 10);
-      $xfer += $this->taskStatus->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobDetailsList !== null) {
-      if (!is_array($this->jobDetailsList)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('jobDetailsList', TType::LST, 11);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->jobDetailsList));
-        {
-          foreach ($this->jobDetailsList as $iter46)
-          {
-            $xfer += $iter46->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->dataTransferDetailsList !== null) {
-      if (!is_array($this->dataTransferDetailsList)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('dataTransferDetailsList', TType::LST, 12);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->dataTransferDetailsList));
-        {
-          foreach ($this->dataTransferDetailsList as $iter47)
-          {
-            $xfer += $iter47->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->errors !== null) {
-      if (!is_array($this->errors)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('errors', TType::LST, 13);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->errors));
-        {
-          foreach ($this->errors as $iter48)
-          {
-            $xfer += $iter48->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class WorkflowNodeDetails {
-  static $_TSPEC;
-
-  public $nodeInstanceId = "DO_NOT_SET_AT_CLIENTS";
-  public $creationTime = null;
-  public $nodeName = "SINGLE_APP_NODE";
-  public $nodeInputs = null;
-  public $nodeOutputs = null;
-  public $workflowNodeStatus = null;
-  public $taskDetailsList = null;
-  public $errors = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'nodeInstanceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        3 => array(
-          'var' => 'nodeName',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'nodeInputs',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\DataObjectType',
-            ),
-          ),
-        5 => array(
-          'var' => 'nodeOutputs',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\DataObjectType',
-            ),
-          ),
-        6 => array(
-          'var' => 'workflowNodeStatus',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Experiment\WorkflowNodeStatus',
-          ),
-        7 => array(
-          'var' => 'taskDetailsList',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\TaskDetails',
-            ),
-          ),
-        8 => array(
-          'var' => 'errors',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Experiment\ErrorDetails',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['nodeInstanceId'])) {
-        $this->nodeInstanceId = $vals['nodeInstanceId'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['nodeName'])) {
-        $this->nodeName = $vals['nodeName'];
-      }
-      if (isset($vals['nodeInputs'])) {
-        $this->nodeInputs = $vals['nodeInputs'];
-      }
-      if (isset($vals['nodeOutputs'])) {
-        $this->nodeOutputs = $vals['nodeOutputs'];
-      }
-      if (isset($vals['workflowNodeStatus'])) {
-        $this->workflowNodeStatus = $vals['workflowNodeStatus'];
-      }
-      if (isset($vals['taskDetailsList'])) {
-        $this->taskDetailsList = $vals['taskDetailsList'];
-      }
-      if (isset($vals['errors'])) {
-        $this->error

<TRUNCATED>

[13/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/terminateExperiment.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/terminateExperiment.php b/Airavata-PHP-Client-Samples/client-samples/terminateExperiment.php
deleted file mode 100644
index 6eadb4c..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/terminateExperiment.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-if ($argc != 2)
-{
-    echo 'php terminateExperiment.php <experiment_id>';
-}
-else
-{
-    terminate_experiment($argv[1]);
-
-    echo 'If there are no exceptions, assume the experiment terminated successfully';
-}
-
-
-$transport->close();
-
-
-/**
- * End the experiment with the given ID
- * @param $expId
- */
-function terminate_experiment($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        $airavataclient->terminateExperiment($expId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!\n\n' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!\n\n' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!\n\n' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException!\n\n' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!\n\n' . $tte->getMessage();
-    }
-    catch (\Exception $e)
-    {
-        echo 'Exception!\n\n' . $e->getMessage();
-    }
-}
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/updateExperiment.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/updateExperiment.php b/Airavata-PHP-Client-Samples/client-samples/updateExperiment.php
deleted file mode 100644
index a15e3a4..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/updateExperiment.php
+++ /dev/null
@@ -1,158 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Experiment/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\ExperimentNotFoundException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Airavata\Model\Workspace\Experiment\ExperimentState;
-use Thrift\Exception\TTransportException;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-
-
-if ($argc != 2)
-{
-    echo 'php updateExperiment.php <experiment_id>';
-}
-else
-{
-    update_experiment($argv[1]);
-}
-
-
-
-
-
-
-
-
-
-
-$transport->close();
-
-
-/**
- * Get the experiment with the given ID
- * @param $expId
- * @return null
- */
-function get_experiment($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        return $airavataclient->getExperiment($expId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException during get!<br><br>' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!<br><br>' . $tte->getMessage();
-    }
-    catch (\Exception $e)
-    {
-        echo 'Exception!<br><br>' . $e->getMessage();
-    }
-
-}
-
-/**
- * Update the experiment with the given ID
- * @param $expId
- * @return null
- */
-function update_experiment($expId)
-{
-    global $airavataclient;
-
-    try
-    {
-        //create new experiment to receive the clone
-        $experiment = $airavataclient->getExperiment($expId);
-        $experiment->name .= time();
-
-        $airavataclient->updateExperiment($expId, $experiment);
-
-        $updatedExperiment = $airavataclient->getExperiment($expId);
-
-        echo "Experiment $experiment->name updated:\n\n";
-        var_dump($updatedExperiment);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->getMessage();
-    }
-    catch (ExperimentNotFoundException $enf)
-    {
-        echo 'ExperimentNotFoundException!<br><br>' . $enf->getMessage();
-    }
-    catch (AiravataClientException $ace)
-    {
-        echo 'AiravataClientException!<br><br>' . $ace->getMessage();
-    }
-    catch (AiravataSystemException $ase)
-    {
-        echo 'AiravataSystemException during update!<br><br>' . $ase->getMessage();
-    }
-    catch (TTransportException $tte)
-    {
-        echo 'TTransportException!<br><br>' . $tte->getMessage();
-    }
-}
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/client-samples/updateProject.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/client-samples/updateProject.php b/Airavata-PHP-Client-Samples/client-samples/updateProject.php
deleted file mode 100644
index 75935e1..0000000
--- a/Airavata-PHP-Client-Samples/client-samples/updateProject.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-namespace Airavata\Client\Samples;
-
-$GLOBALS['THRIFT_ROOT'] = '../lib/Thrift/';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TBufferedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TApplicationException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TProtocolException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Base/TBase.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = '../lib/Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/Workspace/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Error/Types.php';
-
-require_once '../lib/AiravataClientFactory.php';
-
-use Airavata\API\Error\AiravataClientException;
-use Airavata\API\Error\AiravataSystemException;
-use Airavata\API\Error\InvalidRequestException;
-use Airavata\Client\AiravataClientFactory;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-$airavataconfig = parse_ini_file("airavata-client-properties.ini");
-
-$transport = new TSocket($airavataconfig['AIRAVATA_SERVER'], $airavataconfig['AIRAVATA_PORT']);
-$transport->setRecvTimeout($airavataconfig['AIRAVATA_TIMEOUT']);
-
-$protocol = new TBinaryProtocol($transport);
-$transport->open();
-$airavataclient = new AiravataClient($protocol);
-
-
-try 
-{
-		  if($argc != 3) 
-		  {
-					 echo 'php updateProject.php <project_id> <project_description>';
-		  }
-		  else
-		  {
-					 $project=$airavataclient->getProject($argv[1]);
-					 $project->description = $argv[2];
-					 $airavataclient->updateProject($argv[1], $project);
-					 echo 'Project '.$argv[1] . ' succesfully modified.';
-		  }
-}
-
-catch (InvalidRequestException $ire)
-{
-    print 'InvalidRequestException: ' . $ire->getMessage()."\n";
-}
-catch (AiravataClientException $ace)
-{
-    print 'Airavata System Exception: ' . $ace->getMessage()."\n";
-}
-catch (AiravataSystemException $ase)
-{
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-
-$transport->close();
-
-?>
-


[04/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/applicationCatalogAPIConstants.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/applicationCatalogAPIConstants.java b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/applicationCatalogAPIConstants.java
new file mode 100644
index 0000000..8fe211d
--- /dev/null
+++ b/airavata-api/airavata-api-stubs/src/main/java/org/apache/airavata/api/appcatalog/applicationCatalogAPIConstants.java
@@ -0,0 +1,55 @@
+    /*
+     * 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.
+     */
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.api.appcatalog;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings("all") public class applicationCatalogAPIConstants {
+
+  public static final String AIRAVATA_API_VERSION = "0.12.0";
+
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
new file mode 100644
index 0000000..2c56b50
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppDeployment/Types.php
@@ -0,0 +1,602 @@
+<?php
+namespace Airavata\Model\AppCatalog\AppDeployment;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class SetEnvPaths {
+  static $_TSPEC;
+
+  public $name = null;
+  public $value = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'value',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['value'])) {
+        $this->value = $vals['value'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SetEnvPaths';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->value);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SetEnvPaths');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->value !== null) {
+      $xfer += $output->writeFieldBegin('value', TType::STRING, 2);
+      $xfer += $output->writeString($this->value);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ApplicationModule {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $appModuleId = "DO_NOT_SET_AT_CLIENTS";
+  public $appModuleName = null;
+  public $appModuleVersion = null;
+  public $appModuleDescription = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'appModuleId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'appModuleName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'appModuleVersion',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'appModuleDescription',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['appModuleId'])) {
+        $this->appModuleId = $vals['appModuleId'];
+      }
+      if (isset($vals['appModuleName'])) {
+        $this->appModuleName = $vals['appModuleName'];
+      }
+      if (isset($vals['appModuleVersion'])) {
+        $this->appModuleVersion = $vals['appModuleVersion'];
+      }
+      if (isset($vals['appModuleDescription'])) {
+        $this->appModuleDescription = $vals['appModuleDescription'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ApplicationModule';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleVersion);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ApplicationModule');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleId !== null) {
+      $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 2);
+      $xfer += $output->writeString($this->appModuleId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleName !== null) {
+      $xfer += $output->writeFieldBegin('appModuleName', TType::STRING, 3);
+      $xfer += $output->writeString($this->appModuleName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleVersion !== null) {
+      $xfer += $output->writeFieldBegin('appModuleVersion', TType::STRING, 4);
+      $xfer += $output->writeString($this->appModuleVersion);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleDescription !== null) {
+      $xfer += $output->writeFieldBegin('appModuleDescription', TType::STRING, 5);
+      $xfer += $output->writeString($this->appModuleDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ApplicationDeploymentDescription {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $appDeploymentId = "DO_NOT_SET_AT_CLIENTS";
+  public $appModuleId = null;
+  public $computeHostId = null;
+  public $executablePath = null;
+  public $appDeploymentDescription = null;
+  public $moduleLoadCmd = null;
+  public $libPrependPaths = null;
+  public $libAppendPaths = null;
+  public $setEnvironment = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'appDeploymentId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'appModuleId',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'computeHostId',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'executablePath',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'appDeploymentDescription',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'moduleLoadCmd',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'libPrependPaths',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths',
+            ),
+          ),
+        9 => array(
+          'var' => 'libAppendPaths',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths',
+            ),
+          ),
+        10 => array(
+          'var' => 'setEnvironment',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['appDeploymentId'])) {
+        $this->appDeploymentId = $vals['appDeploymentId'];
+      }
+      if (isset($vals['appModuleId'])) {
+        $this->appModuleId = $vals['appModuleId'];
+      }
+      if (isset($vals['computeHostId'])) {
+        $this->computeHostId = $vals['computeHostId'];
+      }
+      if (isset($vals['executablePath'])) {
+        $this->executablePath = $vals['executablePath'];
+      }
+      if (isset($vals['appDeploymentDescription'])) {
+        $this->appDeploymentDescription = $vals['appDeploymentDescription'];
+      }
+      if (isset($vals['moduleLoadCmd'])) {
+        $this->moduleLoadCmd = $vals['moduleLoadCmd'];
+      }
+      if (isset($vals['libPrependPaths'])) {
+        $this->libPrependPaths = $vals['libPrependPaths'];
+      }
+      if (isset($vals['libAppendPaths'])) {
+        $this->libAppendPaths = $vals['libAppendPaths'];
+      }
+      if (isset($vals['setEnvironment'])) {
+        $this->setEnvironment = $vals['setEnvironment'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ApplicationDeploymentDescription';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appDeploymentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeHostId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->executablePath);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appDeploymentDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->moduleLoadCmd);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::LST) {
+            $this->libPrependPaths = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
+              $xfer += $elem5->read($input);
+              $this->libPrependPaths []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::LST) {
+            $this->libAppendPaths = array();
+            $_size6 = 0;
+            $_etype9 = 0;
+            $xfer += $input->readListBegin($_etype9, $_size6);
+            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            {
+              $elem11 = null;
+              $elem11 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
+              $xfer += $elem11->read($input);
+              $this->libAppendPaths []= $elem11;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::LST) {
+            $this->setEnvironment = array();
+            $_size12 = 0;
+            $_etype15 = 0;
+            $xfer += $input->readListBegin($_etype15, $_size12);
+            for ($_i16 = 0; $_i16 < $_size12; ++$_i16)
+            {
+              $elem17 = null;
+              $elem17 = new \Airavata\Model\AppCatalog\AppDeployment\SetEnvPaths();
+              $xfer += $elem17->read($input);
+              $this->setEnvironment []= $elem17;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ApplicationDeploymentDescription');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appDeploymentId !== null) {
+      $xfer += $output->writeFieldBegin('appDeploymentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->appDeploymentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleId !== null) {
+      $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 3);
+      $xfer += $output->writeString($this->appModuleId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->computeHostId !== null) {
+      $xfer += $output->writeFieldBegin('computeHostId', TType::STRING, 4);
+      $xfer += $output->writeString($this->computeHostId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->executablePath !== null) {
+      $xfer += $output->writeFieldBegin('executablePath', TType::STRING, 5);
+      $xfer += $output->writeString($this->executablePath);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appDeploymentDescription !== null) {
+      $xfer += $output->writeFieldBegin('appDeploymentDescription', TType::STRING, 6);
+      $xfer += $output->writeString($this->appDeploymentDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->moduleLoadCmd !== null) {
+      $xfer += $output->writeFieldBegin('moduleLoadCmd', TType::STRING, 7);
+      $xfer += $output->writeString($this->moduleLoadCmd);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->libPrependPaths !== null) {
+      if (!is_array($this->libPrependPaths)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('libPrependPaths', TType::LST, 8);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->libPrependPaths));
+        {
+          foreach ($this->libPrependPaths as $iter18)
+          {
+            $xfer += $iter18->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->libAppendPaths !== null) {
+      if (!is_array($this->libAppendPaths)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('libAppendPaths', TType::LST, 9);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->libAppendPaths));
+        {
+          foreach ($this->libAppendPaths as $iter19)
+          {
+            $xfer += $iter19->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->setEnvironment !== null) {
+      if (!is_array($this->setEnvironment)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('setEnvironment', TType::LST, 10);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->setEnvironment));
+        {
+          foreach ($this->setEnvironment as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+$GLOBALS['applicationDeploymentModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
new file mode 100644
index 0000000..2097cdf
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/AppCatalog/AppInterface/Types.php
@@ -0,0 +1,633 @@
+<?php
+namespace Airavata\Model\AppCatalog\AppInterface;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class DataType {
+  const STRING = 0;
+  const INTEGER = 1;
+  const FLOAT = 2;
+  const URI = 3;
+  static public $__names = array(
+    0 => 'STRING',
+    1 => 'INTEGER',
+    2 => 'FLOAT',
+    3 => 'URI',
+  );
+}
+
+class InputDataObjectType {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $name = null;
+  public $value = null;
+  public $type = null;
+  public $applicationArguement = null;
+  public $standardInput = false;
+  public $userFriendlyDescription = null;
+  public $metaData = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'value',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'type',
+          'type' => TType::I32,
+          ),
+        5 => array(
+          'var' => 'applicationArguement',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'standardInput',
+          'type' => TType::BOOL,
+          ),
+        7 => array(
+          'var' => 'userFriendlyDescription',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'metaData',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['value'])) {
+        $this->value = $vals['value'];
+      }
+      if (isset($vals['type'])) {
+        $this->type = $vals['type'];
+      }
+      if (isset($vals['applicationArguement'])) {
+        $this->applicationArguement = $vals['applicationArguement'];
+      }
+      if (isset($vals['standardInput'])) {
+        $this->standardInput = $vals['standardInput'];
+      }
+      if (isset($vals['userFriendlyDescription'])) {
+        $this->userFriendlyDescription = $vals['userFriendlyDescription'];
+      }
+      if (isset($vals['metaData'])) {
+        $this->metaData = $vals['metaData'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'InputDataObjectType';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->value);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->type);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationArguement);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->standardInput);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userFriendlyDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->metaData);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('InputDataObjectType');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->value !== null) {
+      $xfer += $output->writeFieldBegin('value', TType::STRING, 3);
+      $xfer += $output->writeString($this->value);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->type !== null) {
+      $xfer += $output->writeFieldBegin('type', TType::I32, 4);
+      $xfer += $output->writeI32($this->type);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationArguement !== null) {
+      $xfer += $output->writeFieldBegin('applicationArguement', TType::STRING, 5);
+      $xfer += $output->writeString($this->applicationArguement);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->standardInput !== null) {
+      $xfer += $output->writeFieldBegin('standardInput', TType::BOOL, 6);
+      $xfer += $output->writeBool($this->standardInput);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userFriendlyDescription !== null) {
+      $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 7);
+      $xfer += $output->writeString($this->userFriendlyDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->metaData !== null) {
+      $xfer += $output->writeFieldBegin('metaData', TType::STRING, 8);
+      $xfer += $output->writeString($this->metaData);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class OutputDataObjectType {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $name = null;
+  public $value = null;
+  public $type = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'value',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'type',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['value'])) {
+        $this->value = $vals['value'];
+      }
+      if (isset($vals['type'])) {
+        $this->type = $vals['type'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'OutputDataObjectType';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->value);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->type);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('OutputDataObjectType');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->value !== null) {
+      $xfer += $output->writeFieldBegin('value', TType::STRING, 3);
+      $xfer += $output->writeString($this->value);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->type !== null) {
+      $xfer += $output->writeFieldBegin('type', TType::I32, 4);
+      $xfer += $output->writeI32($this->type);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ApplicationInterfaceDescription {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+  public $applicationName = null;
+  public $applicationModules = null;
+  public $applicationInputs = null;
+  public $applicationOutputs = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'applicationInterfaceId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'applicationName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'applicationModules',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        5 => array(
+          'var' => 'applicationInputs',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\AppInterface\InputDataObjectType',
+            ),
+          ),
+        6 => array(
+          'var' => 'applicationOutputs',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['applicationInterfaceId'])) {
+        $this->applicationInterfaceId = $vals['applicationInterfaceId'];
+      }
+      if (isset($vals['applicationName'])) {
+        $this->applicationName = $vals['applicationName'];
+      }
+      if (isset($vals['applicationModules'])) {
+        $this->applicationModules = $vals['applicationModules'];
+      }
+      if (isset($vals['applicationInputs'])) {
+        $this->applicationInputs = $vals['applicationInputs'];
+      }
+      if (isset($vals['applicationOutputs'])) {
+        $this->applicationOutputs = $vals['applicationOutputs'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ApplicationInterfaceDescription';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationInterfaceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::LST) {
+            $this->applicationModules = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $xfer += $input->readString($elem5);
+              $this->applicationModules []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::LST) {
+            $this->applicationInputs = array();
+            $_size6 = 0;
+            $_etype9 = 0;
+            $xfer += $input->readListBegin($_etype9, $_size6);
+            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            {
+              $elem11 = null;
+              $elem11 = new \Airavata\Model\AppCatalog\AppInterface\InputDataObjectType();
+              $xfer += $elem11->read($input);
+              $this->applicationInputs []= $elem11;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::LST) {
+            $this->applicationOutputs = array();
+            $_size12 = 0;
+            $_etype15 = 0;
+            $xfer += $input->readListBegin($_etype15, $_size12);
+            for ($_i16 = 0; $_i16 < $_size12; ++$_i16)
+            {
+              $elem17 = null;
+              $elem17 = new \Airavata\Model\AppCatalog\AppInterface\OutputDataObjectType();
+              $xfer += $elem17->read($input);
+              $this->applicationOutputs []= $elem17;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ApplicationInterfaceDescription');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationInterfaceId !== null) {
+      $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 2);
+      $xfer += $output->writeString($this->applicationInterfaceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationName !== null) {
+      $xfer += $output->writeFieldBegin('applicationName', TType::STRING, 3);
+      $xfer += $output->writeString($this->applicationName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationModules !== null) {
+      if (!is_array($this->applicationModules)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('applicationModules', TType::LST, 4);
+      {
+        $output->writeListBegin(TType::STRING, count($this->applicationModules));
+        {
+          foreach ($this->applicationModules as $iter18)
+          {
+            $xfer += $output->writeString($iter18);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationInputs !== null) {
+      if (!is_array($this->applicationInputs)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('applicationInputs', TType::LST, 5);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->applicationInputs));
+        {
+          foreach ($this->applicationInputs as $iter19)
+          {
+            $xfer += $iter19->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationOutputs !== null) {
+      if (!is_array($this->applicationOutputs)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('applicationOutputs', TType::LST, 6);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->applicationOutputs));
+        {
+          foreach ($this->applicationOutputs as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+$GLOBALS['applicationInterfaceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php
new file mode 100644
index 0000000..16be149
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Deployment/Types.php
@@ -0,0 +1,602 @@
+<?php
+namespace Airavata\Model\Application\Deployment;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+class SetEnvPaths {
+  static $_TSPEC;
+
+  public $name = null;
+  public $value = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        2 => array(
+          'var' => 'value',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['value'])) {
+        $this->value = $vals['value'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'SetEnvPaths';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->value);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('SetEnvPaths');
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 1);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->value !== null) {
+      $xfer += $output->writeFieldBegin('value', TType::STRING, 2);
+      $xfer += $output->writeString($this->value);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ApplicationModule {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $appModuleId = "DO_NOT_SET_AT_CLIENTS";
+  public $appModuleName = null;
+  public $appModuleVersion = null;
+  public $appModuleDescription = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'appModuleId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'appModuleName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'appModuleVersion',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'appModuleDescription',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['appModuleId'])) {
+        $this->appModuleId = $vals['appModuleId'];
+      }
+      if (isset($vals['appModuleName'])) {
+        $this->appModuleName = $vals['appModuleName'];
+      }
+      if (isset($vals['appModuleVersion'])) {
+        $this->appModuleVersion = $vals['appModuleVersion'];
+      }
+      if (isset($vals['appModuleDescription'])) {
+        $this->appModuleDescription = $vals['appModuleDescription'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ApplicationModule';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleVersion);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ApplicationModule');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleId !== null) {
+      $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 2);
+      $xfer += $output->writeString($this->appModuleId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleName !== null) {
+      $xfer += $output->writeFieldBegin('appModuleName', TType::STRING, 3);
+      $xfer += $output->writeString($this->appModuleName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleVersion !== null) {
+      $xfer += $output->writeFieldBegin('appModuleVersion', TType::STRING, 4);
+      $xfer += $output->writeString($this->appModuleVersion);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleDescription !== null) {
+      $xfer += $output->writeFieldBegin('appModuleDescription', TType::STRING, 5);
+      $xfer += $output->writeString($this->appModuleDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ApplicationDeploymentDescription {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $appDeploymentId = "DO_NOT_SET_AT_CLIENTS";
+  public $appModuleId = null;
+  public $computeHostId = null;
+  public $executablePath = null;
+  public $appDeploymentDescription = null;
+  public $moduleLoadCmd = null;
+  public $libPrependPaths = null;
+  public $libAppendPaths = null;
+  public $setEnvironment = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'appDeploymentId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'appModuleId',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'computeHostId',
+          'type' => TType::STRING,
+          ),
+        5 => array(
+          'var' => 'executablePath',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'appDeploymentDescription',
+          'type' => TType::STRING,
+          ),
+        7 => array(
+          'var' => 'moduleLoadCmd',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'libPrependPaths',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Deployment\SetEnvPaths',
+            ),
+          ),
+        9 => array(
+          'var' => 'libAppendPaths',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Deployment\SetEnvPaths',
+            ),
+          ),
+        10 => array(
+          'var' => 'setEnvironment',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Deployment\SetEnvPaths',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['appDeploymentId'])) {
+        $this->appDeploymentId = $vals['appDeploymentId'];
+      }
+      if (isset($vals['appModuleId'])) {
+        $this->appModuleId = $vals['appModuleId'];
+      }
+      if (isset($vals['computeHostId'])) {
+        $this->computeHostId = $vals['computeHostId'];
+      }
+      if (isset($vals['executablePath'])) {
+        $this->executablePath = $vals['executablePath'];
+      }
+      if (isset($vals['appDeploymentDescription'])) {
+        $this->appDeploymentDescription = $vals['appDeploymentDescription'];
+      }
+      if (isset($vals['moduleLoadCmd'])) {
+        $this->moduleLoadCmd = $vals['moduleLoadCmd'];
+      }
+      if (isset($vals['libPrependPaths'])) {
+        $this->libPrependPaths = $vals['libPrependPaths'];
+      }
+      if (isset($vals['libAppendPaths'])) {
+        $this->libAppendPaths = $vals['libAppendPaths'];
+      }
+      if (isset($vals['setEnvironment'])) {
+        $this->setEnvironment = $vals['setEnvironment'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ApplicationDeploymentDescription';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appDeploymentId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appModuleId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->computeHostId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->executablePath);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->appDeploymentDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->moduleLoadCmd);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::LST) {
+            $this->libPrependPaths = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $elem5 = new \Airavata\Model\Application\Deployment\SetEnvPaths();
+              $xfer += $elem5->read($input);
+              $this->libPrependPaths []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 9:
+          if ($ftype == TType::LST) {
+            $this->libAppendPaths = array();
+            $_size6 = 0;
+            $_etype9 = 0;
+            $xfer += $input->readListBegin($_etype9, $_size6);
+            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            {
+              $elem11 = null;
+              $elem11 = new \Airavata\Model\Application\Deployment\SetEnvPaths();
+              $xfer += $elem11->read($input);
+              $this->libAppendPaths []= $elem11;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 10:
+          if ($ftype == TType::LST) {
+            $this->setEnvironment = array();
+            $_size12 = 0;
+            $_etype15 = 0;
+            $xfer += $input->readListBegin($_etype15, $_size12);
+            for ($_i16 = 0; $_i16 < $_size12; ++$_i16)
+            {
+              $elem17 = null;
+              $elem17 = new \Airavata\Model\Application\Deployment\SetEnvPaths();
+              $xfer += $elem17->read($input);
+              $this->setEnvironment []= $elem17;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ApplicationDeploymentDescription');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appDeploymentId !== null) {
+      $xfer += $output->writeFieldBegin('appDeploymentId', TType::STRING, 2);
+      $xfer += $output->writeString($this->appDeploymentId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appModuleId !== null) {
+      $xfer += $output->writeFieldBegin('appModuleId', TType::STRING, 3);
+      $xfer += $output->writeString($this->appModuleId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->computeHostId !== null) {
+      $xfer += $output->writeFieldBegin('computeHostId', TType::STRING, 4);
+      $xfer += $output->writeString($this->computeHostId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->executablePath !== null) {
+      $xfer += $output->writeFieldBegin('executablePath', TType::STRING, 5);
+      $xfer += $output->writeString($this->executablePath);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->appDeploymentDescription !== null) {
+      $xfer += $output->writeFieldBegin('appDeploymentDescription', TType::STRING, 6);
+      $xfer += $output->writeString($this->appDeploymentDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->moduleLoadCmd !== null) {
+      $xfer += $output->writeFieldBegin('moduleLoadCmd', TType::STRING, 7);
+      $xfer += $output->writeString($this->moduleLoadCmd);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->libPrependPaths !== null) {
+      if (!is_array($this->libPrependPaths)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('libPrependPaths', TType::LST, 8);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->libPrependPaths));
+        {
+          foreach ($this->libPrependPaths as $iter18)
+          {
+            $xfer += $iter18->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->libAppendPaths !== null) {
+      if (!is_array($this->libAppendPaths)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('libAppendPaths', TType::LST, 9);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->libAppendPaths));
+        {
+          foreach ($this->libAppendPaths as $iter19)
+          {
+            $xfer += $iter19->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->setEnvironment !== null) {
+      if (!is_array($this->setEnvironment)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('setEnvironment', TType::LST, 10);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->setEnvironment));
+        {
+          foreach ($this->setEnvironment as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+$GLOBALS['applicationDeploymentModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
+
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php
new file mode 100644
index 0000000..59ccc55
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/lib/Airavata/Model/Application/Interface/Types.php
@@ -0,0 +1,633 @@
+<?php
+namespace Airavata\Model\Application\Interface;
+
+/**
+ * Autogenerated by Thrift Compiler (0.9.1)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+use Thrift\Base\TBase;
+use Thrift\Type\TType;
+use Thrift\Type\TMessageType;
+use Thrift\Exception\TException;
+use Thrift\Exception\TProtocolException;
+use Thrift\Protocol\TProtocol;
+use Thrift\Protocol\TBinaryProtocolAccelerated;
+use Thrift\Exception\TApplicationException;
+
+
+final class DataType {
+  const STRING = 0;
+  const INTEGER = 1;
+  const FLOAT = 2;
+  const URI = 3;
+  static public $__names = array(
+    0 => 'STRING',
+    1 => 'INTEGER',
+    2 => 'FLOAT',
+    3 => 'URI',
+  );
+}
+
+class InputDataObjectType {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $name = null;
+  public $value = null;
+  public $type = null;
+  public $applicationArguement = null;
+  public $standardInput = false;
+  public $userFriendlyDescription = null;
+  public $metaData = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'value',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'type',
+          'type' => TType::I32,
+          ),
+        5 => array(
+          'var' => 'applicationArguement',
+          'type' => TType::STRING,
+          ),
+        6 => array(
+          'var' => 'standardInput',
+          'type' => TType::BOOL,
+          ),
+        7 => array(
+          'var' => 'userFriendlyDescription',
+          'type' => TType::STRING,
+          ),
+        8 => array(
+          'var' => 'metaData',
+          'type' => TType::STRING,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['value'])) {
+        $this->value = $vals['value'];
+      }
+      if (isset($vals['type'])) {
+        $this->type = $vals['type'];
+      }
+      if (isset($vals['applicationArguement'])) {
+        $this->applicationArguement = $vals['applicationArguement'];
+      }
+      if (isset($vals['standardInput'])) {
+        $this->standardInput = $vals['standardInput'];
+      }
+      if (isset($vals['userFriendlyDescription'])) {
+        $this->userFriendlyDescription = $vals['userFriendlyDescription'];
+      }
+      if (isset($vals['metaData'])) {
+        $this->metaData = $vals['metaData'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'InputDataObjectType';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->value);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->type);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationArguement);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->standardInput);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 7:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->userFriendlyDescription);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 8:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->metaData);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('InputDataObjectType');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->value !== null) {
+      $xfer += $output->writeFieldBegin('value', TType::STRING, 3);
+      $xfer += $output->writeString($this->value);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->type !== null) {
+      $xfer += $output->writeFieldBegin('type', TType::I32, 4);
+      $xfer += $output->writeI32($this->type);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationArguement !== null) {
+      $xfer += $output->writeFieldBegin('applicationArguement', TType::STRING, 5);
+      $xfer += $output->writeString($this->applicationArguement);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->standardInput !== null) {
+      $xfer += $output->writeFieldBegin('standardInput', TType::BOOL, 6);
+      $xfer += $output->writeBool($this->standardInput);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->userFriendlyDescription !== null) {
+      $xfer += $output->writeFieldBegin('userFriendlyDescription', TType::STRING, 7);
+      $xfer += $output->writeString($this->userFriendlyDescription);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->metaData !== null) {
+      $xfer += $output->writeFieldBegin('metaData', TType::STRING, 8);
+      $xfer += $output->writeString($this->metaData);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class OutputDataObjectType {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $name = null;
+  public $value = null;
+  public $type = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'name',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'value',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'type',
+          'type' => TType::I32,
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['name'])) {
+        $this->name = $vals['name'];
+      }
+      if (isset($vals['value'])) {
+        $this->value = $vals['value'];
+      }
+      if (isset($vals['type'])) {
+        $this->type = $vals['type'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'OutputDataObjectType';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->name);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->value);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::I32) {
+            $xfer += $input->readI32($this->type);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('OutputDataObjectType');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->name !== null) {
+      $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
+      $xfer += $output->writeString($this->name);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->value !== null) {
+      $xfer += $output->writeFieldBegin('value', TType::STRING, 3);
+      $xfer += $output->writeString($this->value);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->type !== null) {
+      $xfer += $output->writeFieldBegin('type', TType::I32, 4);
+      $xfer += $output->writeI32($this->type);
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+class ApplicationInterfaceDescription {
+  static $_TSPEC;
+
+  public $isEmpty = false;
+  public $applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
+  public $applicationName = null;
+  public $applicationModules = null;
+  public $applicationInputs = null;
+  public $applicationOutputs = null;
+
+  public function __construct($vals=null) {
+    if (!isset(self::$_TSPEC)) {
+      self::$_TSPEC = array(
+        1 => array(
+          'var' => 'isEmpty',
+          'type' => TType::BOOL,
+          ),
+        2 => array(
+          'var' => 'applicationInterfaceId',
+          'type' => TType::STRING,
+          ),
+        3 => array(
+          'var' => 'applicationName',
+          'type' => TType::STRING,
+          ),
+        4 => array(
+          'var' => 'applicationModules',
+          'type' => TType::LST,
+          'etype' => TType::STRING,
+          'elem' => array(
+            'type' => TType::STRING,
+            ),
+          ),
+        5 => array(
+          'var' => 'applicationInputs',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Interface\InputDataObjectType',
+            ),
+          ),
+        6 => array(
+          'var' => 'applicationOutputs',
+          'type' => TType::LST,
+          'etype' => TType::STRUCT,
+          'elem' => array(
+            'type' => TType::STRUCT,
+            'class' => '\Airavata\Model\Application\Interface\OutputDataObjectType',
+            ),
+          ),
+        );
+    }
+    if (is_array($vals)) {
+      if (isset($vals['isEmpty'])) {
+        $this->isEmpty = $vals['isEmpty'];
+      }
+      if (isset($vals['applicationInterfaceId'])) {
+        $this->applicationInterfaceId = $vals['applicationInterfaceId'];
+      }
+      if (isset($vals['applicationName'])) {
+        $this->applicationName = $vals['applicationName'];
+      }
+      if (isset($vals['applicationModules'])) {
+        $this->applicationModules = $vals['applicationModules'];
+      }
+      if (isset($vals['applicationInputs'])) {
+        $this->applicationInputs = $vals['applicationInputs'];
+      }
+      if (isset($vals['applicationOutputs'])) {
+        $this->applicationOutputs = $vals['applicationOutputs'];
+      }
+    }
+  }
+
+  public function getName() {
+    return 'ApplicationInterfaceDescription';
+  }
+
+  public function read($input)
+  {
+    $xfer = 0;
+    $fname = null;
+    $ftype = 0;
+    $fid = 0;
+    $xfer += $input->readStructBegin($fname);
+    while (true)
+    {
+      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
+      if ($ftype == TType::STOP) {
+        break;
+      }
+      switch ($fid)
+      {
+        case 1:
+          if ($ftype == TType::BOOL) {
+            $xfer += $input->readBool($this->isEmpty);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 2:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationInterfaceId);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 3:
+          if ($ftype == TType::STRING) {
+            $xfer += $input->readString($this->applicationName);
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 4:
+          if ($ftype == TType::LST) {
+            $this->applicationModules = array();
+            $_size0 = 0;
+            $_etype3 = 0;
+            $xfer += $input->readListBegin($_etype3, $_size0);
+            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
+            {
+              $elem5 = null;
+              $xfer += $input->readString($elem5);
+              $this->applicationModules []= $elem5;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 5:
+          if ($ftype == TType::LST) {
+            $this->applicationInputs = array();
+            $_size6 = 0;
+            $_etype9 = 0;
+            $xfer += $input->readListBegin($_etype9, $_size6);
+            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
+            {
+              $elem11 = null;
+              $elem11 = new \Airavata\Model\Application\Interface\InputDataObjectType();
+              $xfer += $elem11->read($input);
+              $this->applicationInputs []= $elem11;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        case 6:
+          if ($ftype == TType::LST) {
+            $this->applicationOutputs = array();
+            $_size12 = 0;
+            $_etype15 = 0;
+            $xfer += $input->readListBegin($_etype15, $_size12);
+            for ($_i16 = 0; $_i16 < $_size12; ++$_i16)
+            {
+              $elem17 = null;
+              $elem17 = new \Airavata\Model\Application\Interface\OutputDataObjectType();
+              $xfer += $elem17->read($input);
+              $this->applicationOutputs []= $elem17;
+            }
+            $xfer += $input->readListEnd();
+          } else {
+            $xfer += $input->skip($ftype);
+          }
+          break;
+        default:
+          $xfer += $input->skip($ftype);
+          break;
+      }
+      $xfer += $input->readFieldEnd();
+    }
+    $xfer += $input->readStructEnd();
+    return $xfer;
+  }
+
+  public function write($output) {
+    $xfer = 0;
+    $xfer += $output->writeStructBegin('ApplicationInterfaceDescription');
+    if ($this->isEmpty !== null) {
+      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
+      $xfer += $output->writeBool($this->isEmpty);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationInterfaceId !== null) {
+      $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 2);
+      $xfer += $output->writeString($this->applicationInterfaceId);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationName !== null) {
+      $xfer += $output->writeFieldBegin('applicationName', TType::STRING, 3);
+      $xfer += $output->writeString($this->applicationName);
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationModules !== null) {
+      if (!is_array($this->applicationModules)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('applicationModules', TType::LST, 4);
+      {
+        $output->writeListBegin(TType::STRING, count($this->applicationModules));
+        {
+          foreach ($this->applicationModules as $iter18)
+          {
+            $xfer += $output->writeString($iter18);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationInputs !== null) {
+      if (!is_array($this->applicationInputs)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('applicationInputs', TType::LST, 5);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->applicationInputs));
+        {
+          foreach ($this->applicationInputs as $iter19)
+          {
+            $xfer += $iter19->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    if ($this->applicationOutputs !== null) {
+      if (!is_array($this->applicationOutputs)) {
+        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
+      }
+      $xfer += $output->writeFieldBegin('applicationOutputs', TType::LST, 6);
+      {
+        $output->writeListBegin(TType::STRUCT, count($this->applicationOutputs));
+        {
+          foreach ($this->applicationOutputs as $iter20)
+          {
+            $xfer += $iter20->write($output);
+          }
+        }
+        $output->writeListEnd();
+      }
+      $xfer += $output->writeFieldEnd();
+    }
+    $xfer += $output->writeFieldStop();
+    $xfer += $output->writeStructEnd();
+    return $xfer;
+  }
+
+}
+
+$GLOBALS['applicationInterfaceModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
+
+


[10/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/Types.php
deleted file mode 100644
index 06e6b5c..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/API/AppCatalog/Types.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace Airavata\API\AppCatalog;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-$GLOBALS['applicationCatalogAPI_CONSTANTS']['AIRAVATA_API_VERSION'] = "0.12.0";
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/API/Error/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/API/Error/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/API/Error/Types.php
deleted file mode 100644
index 896c6b3..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/API/Error/Types.php
+++ /dev/null
@@ -1,872 +0,0 @@
-<?php
-namespace Airavata\API\Error;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class AiravataErrorType {
-  const UNKNOWN = 0;
-  const PERMISSION_DENIED = 1;
-  const INTERNAL_ERROR = 2;
-  const AUTHENTICATION_FAILURE = 3;
-  const INVALID_AUTHORIZATION = 4;
-  const AUTHORIZATION_EXPIRED = 5;
-  const UNKNOWN_GATEWAY_ID = 6;
-  const UNSUPPORTED_OPERATION = 7;
-  static public $__names = array(
-    0 => 'UNKNOWN',
-    1 => 'PERMISSION_DENIED',
-    2 => 'INTERNAL_ERROR',
-    3 => 'AUTHENTICATION_FAILURE',
-    4 => 'INVALID_AUTHORIZATION',
-    5 => 'AUTHORIZATION_EXPIRED',
-    6 => 'UNKNOWN_GATEWAY_ID',
-    7 => 'UNSUPPORTED_OPERATION',
-  );
-}
-
-class ExperimentNotFoundException extends TException {
-  static $_TSPEC;
-
-  public $message = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'message',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['message'])) {
-        $this->message = $vals['message'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ExperimentNotFoundException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->message);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ExperimentNotFoundException');
-    if ($this->message !== null) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
-      $xfer += $output->writeString($this->message);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class InvalidRequestException extends TException {
-  static $_TSPEC;
-
-  public $message = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'message',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['message'])) {
-        $this->message = $vals['message'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'InvalidRequestException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->message);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('InvalidRequestException');
-    if ($this->message !== null) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
-      $xfer += $output->writeString($this->message);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class TimedOutException extends TException {
-  static $_TSPEC;
-
-
-  public function __construct() {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        );
-    }
-  }
-
-  public function getName() {
-    return 'TimedOutException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('TimedOutException');
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class AuthenticationException extends TException {
-  static $_TSPEC;
-
-  public $message = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'message',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['message'])) {
-        $this->message = $vals['message'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'AuthenticationException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->message);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('AuthenticationException');
-    if ($this->message !== null) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
-      $xfer += $output->writeString($this->message);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class AuthorizationException extends TException {
-  static $_TSPEC;
-
-  public $message = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'message',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['message'])) {
-        $this->message = $vals['message'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'AuthorizationException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->message);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('AuthorizationException');
-    if ($this->message !== null) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
-      $xfer += $output->writeString($this->message);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class AiravataClientException extends TException {
-  static $_TSPEC;
-
-  public $airavataErrorType = null;
-  public $parameter = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'airavataErrorType',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'parameter',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['airavataErrorType'])) {
-        $this->airavataErrorType = $vals['airavataErrorType'];
-      }
-      if (isset($vals['parameter'])) {
-        $this->parameter = $vals['parameter'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'AiravataClientException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->airavataErrorType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->parameter);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('AiravataClientException');
-    if ($this->airavataErrorType !== null) {
-      $xfer += $output->writeFieldBegin('airavataErrorType', TType::I32, 1);
-      $xfer += $output->writeI32($this->airavataErrorType);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->parameter !== null) {
-      $xfer += $output->writeFieldBegin('parameter', TType::STRING, 2);
-      $xfer += $output->writeString($this->parameter);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ValidatorResult {
-  static $_TSPEC;
-
-  public $result = null;
-  public $errorDetails = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'result',
-          'type' => TType::BOOL,
-          ),
-        2 => array(
-          'var' => 'errorDetails',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['result'])) {
-        $this->result = $vals['result'];
-      }
-      if (isset($vals['errorDetails'])) {
-        $this->errorDetails = $vals['errorDetails'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ValidatorResult';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->result);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->errorDetails);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ValidatorResult');
-    if ($this->result !== null) {
-      $xfer += $output->writeFieldBegin('result', TType::BOOL, 1);
-      $xfer += $output->writeBool($this->result);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->errorDetails !== null) {
-      $xfer += $output->writeFieldBegin('errorDetails', TType::STRING, 2);
-      $xfer += $output->writeString($this->errorDetails);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ValidationResults {
-  static $_TSPEC;
-
-  public $validationState = null;
-  public $validationResultList = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'validationState',
-          'type' => TType::BOOL,
-          ),
-        2 => array(
-          'var' => 'validationResultList',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\API\Error\ValidatorResult',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['validationState'])) {
-        $this->validationState = $vals['validationState'];
-      }
-      if (isset($vals['validationResultList'])) {
-        $this->validationResultList = $vals['validationResultList'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ValidationResults';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->validationState);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::LST) {
-            $this->validationResultList = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $elem5 = new \Airavata\API\Error\ValidatorResult();
-              $xfer += $elem5->read($input);
-              $this->validationResultList []= $elem5;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ValidationResults');
-    if ($this->validationState !== null) {
-      $xfer += $output->writeFieldBegin('validationState', TType::BOOL, 1);
-      $xfer += $output->writeBool($this->validationState);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->validationResultList !== null) {
-      if (!is_array($this->validationResultList)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('validationResultList', TType::LST, 2);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->validationResultList));
-        {
-          foreach ($this->validationResultList as $iter6)
-          {
-            $xfer += $iter6->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class LaunchValidationException extends TException {
-  static $_TSPEC;
-
-  public $validationResult = null;
-  public $errorMessage = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'validationResult',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\ValidationResults',
-          ),
-        2 => array(
-          'var' => 'errorMessage',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['validationResult'])) {
-        $this->validationResult = $vals['validationResult'];
-      }
-      if (isset($vals['errorMessage'])) {
-        $this->errorMessage = $vals['errorMessage'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'LaunchValidationException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->validationResult = new \Airavata\API\Error\ValidationResults();
-            $xfer += $this->validationResult->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->errorMessage);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('LaunchValidationException');
-    if ($this->validationResult !== null) {
-      if (!is_object($this->validationResult)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('validationResult', TType::STRUCT, 1);
-      $xfer += $this->validationResult->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->errorMessage !== null) {
-      $xfer += $output->writeFieldBegin('errorMessage', TType::STRING, 2);
-      $xfer += $output->writeString($this->errorMessage);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class AiravataSystemException extends TException {
-  static $_TSPEC;
-
-  public $airavataErrorType = null;
-  public $message = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'airavataErrorType',
-          'type' => TType::I32,
-          ),
-        2 => array(
-          'var' => 'message',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['airavataErrorType'])) {
-        $this->airavataErrorType = $vals['airavataErrorType'];
-      }
-      if (isset($vals['message'])) {
-        $this->message = $vals['message'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'AiravataSystemException';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->airavataErrorType);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->message);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('AiravataSystemException');
-    if ($this->airavataErrorType !== null) {
-      $xfer += $output->writeFieldBegin('airavataErrorType', TType::I32, 1);
-      $xfer += $output->writeI32($this->airavataErrorType);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->message !== null) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 2);
-      $xfer += $output->writeString($this->message);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/API/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/API/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/API/Types.php
deleted file mode 100644
index 5590a42..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/API/Types.php
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace Airavata\API;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-$GLOBALS['airavataAPI_CONSTANTS']['AIRAVATA_API_VERSION'] = "0.12.0";
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/Model/AppCatalog/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/Model/AppCatalog/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/Model/AppCatalog/Types.php
deleted file mode 100644
index 2e4c195..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/Model/AppCatalog/Types.php
+++ /dev/null
@@ -1,1636 +0,0 @@
-<?php
-namespace Airavata\Model\AppCatalog;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-final class ResourceJobManager {
-  const FORK = 0;
-  const PBS = 1;
-  const UGE = 2;
-  const SLURM = 3;
-  static public $__names = array(
-    0 => 'FORK',
-    1 => 'PBS',
-    2 => 'UGE',
-    3 => 'SLURM',
-  );
-}
-
-final class JobSubmissionProtocol {
-  const SSH = 0;
-  const GSISSH = 1;
-  const GRAM = 2;
-  const UNICORE = 3;
-  static public $__names = array(
-    0 => 'SSH',
-    1 => 'GSISSH',
-    2 => 'GRAM',
-    3 => 'UNICORE',
-  );
-}
-
-final class DataMovementProtocol {
-  const SCP = 0;
-  const SFTP = 1;
-  const GridFTP = 2;
-  const UNICORE_STORAGE_SERVICE = 3;
-  static public $__names = array(
-    0 => 'SCP',
-    1 => 'SFTP',
-    2 => 'GridFTP',
-    3 => 'UNICORE_STORAGE_SERVICE',
-  );
-}
-
-final class SecurityProtocol {
-  const USERNAME_PASSWORD = 0;
-  const SSH_KEYS = 1;
-  const GSI = 2;
-  const KERBEROS = 3;
-  const OAUTH = 4;
-  static public $__names = array(
-    0 => 'USERNAME_PASSWORD',
-    1 => 'SSH_KEYS',
-    2 => 'GSI',
-    3 => 'KERBEROS',
-    4 => 'OAUTH',
-  );
-}
-
-class SCPDataMovement {
-  static $_TSPEC;
-
-  public $dataMovementDataID = "DO_NOT_SET_AT_CLIENTS";
-  public $securityProtocol = null;
-  public $sshPort = 22;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'dataMovementDataID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'securityProtocol',
-          'type' => TType::I32,
-          ),
-        3 => array(
-          'var' => 'sshPort',
-          'type' => TType::I32,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['dataMovementDataID'])) {
-        $this->dataMovementDataID = $vals['dataMovementDataID'];
-      }
-      if (isset($vals['securityProtocol'])) {
-        $this->securityProtocol = $vals['securityProtocol'];
-      }
-      if (isset($vals['sshPort'])) {
-        $this->sshPort = $vals['sshPort'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'SCPDataMovement';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->dataMovementDataID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->securityProtocol);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->sshPort);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('SCPDataMovement');
-    if ($this->dataMovementDataID !== null) {
-      $xfer += $output->writeFieldBegin('dataMovementDataID', TType::STRING, 1);
-      $xfer += $output->writeString($this->dataMovementDataID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->securityProtocol !== null) {
-      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
-      $xfer += $output->writeI32($this->securityProtocol);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->sshPort !== null) {
-      $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
-      $xfer += $output->writeI32($this->sshPort);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class GridFTPDataMovement {
-  static $_TSPEC;
-
-  public $dataMovementDataID = "DO_NOT_SET_AT_CLIENTS";
-  public $securityProtocol = null;
-  public $gridFTPEndPoint = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'dataMovementDataID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'securityProtocol',
-          'type' => TType::I32,
-          ),
-        3 => array(
-          'var' => 'gridFTPEndPoint',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['dataMovementDataID'])) {
-        $this->dataMovementDataID = $vals['dataMovementDataID'];
-      }
-      if (isset($vals['securityProtocol'])) {
-        $this->securityProtocol = $vals['securityProtocol'];
-      }
-      if (isset($vals['gridFTPEndPoint'])) {
-        $this->gridFTPEndPoint = $vals['gridFTPEndPoint'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'GridFTPDataMovement';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->dataMovementDataID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->securityProtocol);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::LST) {
-            $this->gridFTPEndPoint = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $xfer += $input->readString($elem5);
-              $this->gridFTPEndPoint []= $elem5;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('GridFTPDataMovement');
-    if ($this->dataMovementDataID !== null) {
-      $xfer += $output->writeFieldBegin('dataMovementDataID', TType::STRING, 1);
-      $xfer += $output->writeString($this->dataMovementDataID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->securityProtocol !== null) {
-      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
-      $xfer += $output->writeI32($this->securityProtocol);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->gridFTPEndPoint !== null) {
-      if (!is_array($this->gridFTPEndPoint)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('gridFTPEndPoint', TType::LST, 3);
-      {
-        $output->writeListBegin(TType::STRING, count($this->gridFTPEndPoint));
-        {
-          foreach ($this->gridFTPEndPoint as $iter6)
-          {
-            $xfer += $output->writeString($iter6);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class SSHJobSubmission {
-  static $_TSPEC;
-
-  public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
-  public $resourceJobManager = null;
-  public $sshPort = 22;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'jobSubmissionDataID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'resourceJobManager',
-          'type' => TType::I32,
-          ),
-        3 => array(
-          'var' => 'sshPort',
-          'type' => TType::I32,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['jobSubmissionDataID'])) {
-        $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
-      }
-      if (isset($vals['resourceJobManager'])) {
-        $this->resourceJobManager = $vals['resourceJobManager'];
-      }
-      if (isset($vals['sshPort'])) {
-        $this->sshPort = $vals['sshPort'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'SSHJobSubmission';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobSubmissionDataID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->resourceJobManager);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->sshPort);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('SSHJobSubmission');
-    if ($this->jobSubmissionDataID !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobSubmissionDataID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceJobManager !== null) {
-      $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
-      $xfer += $output->writeI32($this->resourceJobManager);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->sshPort !== null) {
-      $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
-      $xfer += $output->writeI32($this->sshPort);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class GlobusJobSubmission {
-  static $_TSPEC;
-
-  public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
-  public $securityProtocol = null;
-  public $resourceJobManager = null;
-  public $globusGateKeeperEndPoint = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'jobSubmissionDataID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'securityProtocol',
-          'type' => TType::I32,
-          ),
-        3 => array(
-          'var' => 'resourceJobManager',
-          'type' => TType::I32,
-          ),
-        4 => array(
-          'var' => 'globusGateKeeperEndPoint',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['jobSubmissionDataID'])) {
-        $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
-      }
-      if (isset($vals['securityProtocol'])) {
-        $this->securityProtocol = $vals['securityProtocol'];
-      }
-      if (isset($vals['resourceJobManager'])) {
-        $this->resourceJobManager = $vals['resourceJobManager'];
-      }
-      if (isset($vals['globusGateKeeperEndPoint'])) {
-        $this->globusGateKeeperEndPoint = $vals['globusGateKeeperEndPoint'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'GlobusJobSubmission';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobSubmissionDataID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->securityProtocol);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->resourceJobManager);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::LST) {
-            $this->globusGateKeeperEndPoint = array();
-            $_size7 = 0;
-            $_etype10 = 0;
-            $xfer += $input->readListBegin($_etype10, $_size7);
-            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
-            {
-              $elem12 = null;
-              $xfer += $input->readString($elem12);
-              $this->globusGateKeeperEndPoint []= $elem12;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('GlobusJobSubmission');
-    if ($this->jobSubmissionDataID !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobSubmissionDataID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->securityProtocol !== null) {
-      $xfer += $output->writeFieldBegin('securityProtocol', TType::I32, 2);
-      $xfer += $output->writeI32($this->securityProtocol);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceJobManager !== null) {
-      $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 3);
-      $xfer += $output->writeI32($this->resourceJobManager);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->globusGateKeeperEndPoint !== null) {
-      if (!is_array($this->globusGateKeeperEndPoint)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('globusGateKeeperEndPoint', TType::LST, 4);
-      {
-        $output->writeListBegin(TType::STRING, count($this->globusGateKeeperEndPoint));
-        {
-          foreach ($this->globusGateKeeperEndPoint as $iter13)
-          {
-            $xfer += $output->writeString($iter13);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class GSISSHJobSubmission {
-  static $_TSPEC;
-
-  public $jobSubmissionDataID = "DO_NOT_SET_AT_CLIENTS";
-  public $resourceJobManager = null;
-  public $sshPort = 22;
-  public $exports = null;
-  public $preJobCommands = null;
-  public $postJobCommands = null;
-  public $installedPath = null;
-  public $monitorMode = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'jobSubmissionDataID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'resourceJobManager',
-          'type' => TType::I32,
-          ),
-        3 => array(
-          'var' => 'sshPort',
-          'type' => TType::I32,
-          ),
-        4 => array(
-          'var' => 'exports',
-          'type' => TType::SET,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        5 => array(
-          'var' => 'preJobCommands',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        6 => array(
-          'var' => 'postJobCommands',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        7 => array(
-          'var' => 'installedPath',
-          'type' => TType::STRING,
-          ),
-        8 => array(
-          'var' => 'monitorMode',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['jobSubmissionDataID'])) {
-        $this->jobSubmissionDataID = $vals['jobSubmissionDataID'];
-      }
-      if (isset($vals['resourceJobManager'])) {
-        $this->resourceJobManager = $vals['resourceJobManager'];
-      }
-      if (isset($vals['sshPort'])) {
-        $this->sshPort = $vals['sshPort'];
-      }
-      if (isset($vals['exports'])) {
-        $this->exports = $vals['exports'];
-      }
-      if (isset($vals['preJobCommands'])) {
-        $this->preJobCommands = $vals['preJobCommands'];
-      }
-      if (isset($vals['postJobCommands'])) {
-        $this->postJobCommands = $vals['postJobCommands'];
-      }
-      if (isset($vals['installedPath'])) {
-        $this->installedPath = $vals['installedPath'];
-      }
-      if (isset($vals['monitorMode'])) {
-        $this->monitorMode = $vals['monitorMode'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'GSISSHJobSubmission';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->jobSubmissionDataID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->resourceJobManager);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::I32) {
-            $xfer += $input->readI32($this->sshPort);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::SET) {
-            $this->exports = array();
-            $_size14 = 0;
-            $_etype17 = 0;
-            $xfer += $input->readSetBegin($_etype17, $_size14);
-            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
-            {
-              $elem19 = null;
-              $xfer += $input->readString($elem19);
-              if (is_scalar($elem19)) {
-                $this->exports[$elem19] = true;
-              } else {
-                $this->exports []= $elem19;
-              }
-            }
-            $xfer += $input->readSetEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::LST) {
-            $this->preJobCommands = array();
-            $_size20 = 0;
-            $_etype23 = 0;
-            $xfer += $input->readListBegin($_etype23, $_size20);
-            for ($_i24 = 0; $_i24 < $_size20; ++$_i24)
-            {
-              $elem25 = null;
-              $xfer += $input->readString($elem25);
-              $this->preJobCommands []= $elem25;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::LST) {
-            $this->postJobCommands = array();
-            $_size26 = 0;
-            $_etype29 = 0;
-            $xfer += $input->readListBegin($_etype29, $_size26);
-            for ($_i30 = 0; $_i30 < $_size26; ++$_i30)
-            {
-              $elem31 = null;
-              $xfer += $input->readString($elem31);
-              $this->postJobCommands []= $elem31;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->installedPath);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->monitorMode);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('GSISSHJobSubmission');
-    if ($this->jobSubmissionDataID !== null) {
-      $xfer += $output->writeFieldBegin('jobSubmissionDataID', TType::STRING, 1);
-      $xfer += $output->writeString($this->jobSubmissionDataID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceJobManager !== null) {
-      $xfer += $output->writeFieldBegin('resourceJobManager', TType::I32, 2);
-      $xfer += $output->writeI32($this->resourceJobManager);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->sshPort !== null) {
-      $xfer += $output->writeFieldBegin('sshPort', TType::I32, 3);
-      $xfer += $output->writeI32($this->sshPort);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->exports !== null) {
-      if (!is_array($this->exports)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('exports', TType::SET, 4);
-      {
-        $output->writeSetBegin(TType::STRING, count($this->exports));
-        {
-          foreach ($this->exports as $iter32 => $iter33)
-          {
-            if (is_scalar($iter33)) {
-            $xfer += $output->writeString($iter32);
-            } else {
-            $xfer += $output->writeString($iter33);
-            }
-          }
-        }
-        $output->writeSetEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->preJobCommands !== null) {
-      if (!is_array($this->preJobCommands)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('preJobCommands', TType::LST, 5);
-      {
-        $output->writeListBegin(TType::STRING, count($this->preJobCommands));
-        {
-          foreach ($this->preJobCommands as $iter34)
-          {
-            $xfer += $output->writeString($iter34);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->postJobCommands !== null) {
-      if (!is_array($this->postJobCommands)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('postJobCommands', TType::LST, 6);
-      {
-        $output->writeListBegin(TType::STRING, count($this->postJobCommands));
-        {
-          foreach ($this->postJobCommands as $iter35)
-          {
-            $xfer += $output->writeString($iter35);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->installedPath !== null) {
-      $xfer += $output->writeFieldBegin('installedPath', TType::STRING, 7);
-      $xfer += $output->writeString($this->installedPath);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->monitorMode !== null) {
-      $xfer += $output->writeFieldBegin('monitorMode', TType::STRING, 8);
-      $xfer += $output->writeString($this->monitorMode);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ComputeResourceDescription {
-  static $_TSPEC;
-
-  public $isEmpty = false;
-  public $resourceId = "DO_NOT_SET_AT_CLIENTS";
-  public $hostName = null;
-  public $hostAliases = null;
-  public $ipAddresses = null;
-  public $resourceDescription = null;
-  public $scratchLocation = null;
-  public $preferredJobSubmissionProtocol = null;
-  public $jobSubmissionProtocols = null;
-  public $dataMovementProtocols = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'isEmpty',
-          'type' => TType::BOOL,
-          ),
-        2 => array(
-          'var' => 'resourceId',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'hostName',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'hostAliases',
-          'type' => TType::SET,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        5 => array(
-          'var' => 'ipAddresses',
-          'type' => TType::SET,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        6 => array(
-          'var' => 'resourceDescription',
-          'type' => TType::STRING,
-          ),
-        7 => array(
-          'var' => 'scratchLocation',
-          'type' => TType::STRING,
-          ),
-        8 => array(
-          'var' => 'preferredJobSubmissionProtocol',
-          'type' => TType::STRING,
-          ),
-        9 => array(
-          'var' => 'jobSubmissionProtocols',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::I32,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::I32,
-            ),
-          ),
-        10 => array(
-          'var' => 'dataMovementProtocols',
-          'type' => TType::MAP,
-          'ktype' => TType::STRING,
-          'vtype' => TType::I32,
-          'key' => array(
-            'type' => TType::STRING,
-          ),
-          'val' => array(
-            'type' => TType::I32,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['isEmpty'])) {
-        $this->isEmpty = $vals['isEmpty'];
-      }
-      if (isset($vals['resourceId'])) {
-        $this->resourceId = $vals['resourceId'];
-      }
-      if (isset($vals['hostName'])) {
-        $this->hostName = $vals['hostName'];
-      }
-      if (isset($vals['hostAliases'])) {
-        $this->hostAliases = $vals['hostAliases'];
-      }
-      if (isset($vals['ipAddresses'])) {
-        $this->ipAddresses = $vals['ipAddresses'];
-      }
-      if (isset($vals['resourceDescription'])) {
-        $this->resourceDescription = $vals['resourceDescription'];
-      }
-      if (isset($vals['scratchLocation'])) {
-        $this->scratchLocation = $vals['scratchLocation'];
-      }
-      if (isset($vals['preferredJobSubmissionProtocol'])) {
-        $this->preferredJobSubmissionProtocol = $vals['preferredJobSubmissionProtocol'];
-      }
-      if (isset($vals['jobSubmissionProtocols'])) {
-        $this->jobSubmissionProtocols = $vals['jobSubmissionProtocols'];
-      }
-      if (isset($vals['dataMovementProtocols'])) {
-        $this->dataMovementProtocols = $vals['dataMovementProtocols'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ComputeResourceDescription';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::BOOL) {
-            $xfer += $input->readBool($this->isEmpty);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->hostName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::SET) {
-            $this->hostAliases = array();
-            $_size36 = 0;
-            $_etype39 = 0;
-            $xfer += $input->readSetBegin($_etype39, $_size36);
-            for ($_i40 = 0; $_i40 < $_size36; ++$_i40)
-            {
-              $elem41 = null;
-              $xfer += $input->readString($elem41);
-              if (is_scalar($elem41)) {
-                $this->hostAliases[$elem41] = true;
-              } else {
-                $this->hostAliases []= $elem41;
-              }
-            }
-            $xfer += $input->readSetEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::SET) {
-            $this->ipAddresses = array();
-            $_size42 = 0;
-            $_etype45 = 0;
-            $xfer += $input->readSetBegin($_etype45, $_size42);
-            for ($_i46 = 0; $_i46 < $_size42; ++$_i46)
-            {
-              $elem47 = null;
-              $xfer += $input->readString($elem47);
-              if (is_scalar($elem47)) {
-                $this->ipAddresses[$elem47] = true;
-              } else {
-                $this->ipAddresses []= $elem47;
-              }
-            }
-            $xfer += $input->readSetEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->resourceDescription);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->scratchLocation);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 8:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->preferredJobSubmissionProtocol);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 9:
-          if ($ftype == TType::MAP) {
-            $this->jobSubmissionProtocols = array();
-            $_size48 = 0;
-            $_ktype49 = 0;
-            $_vtype50 = 0;
-            $xfer += $input->readMapBegin($_ktype49, $_vtype50, $_size48);
-            for ($_i52 = 0; $_i52 < $_size48; ++$_i52)
-            {
-              $key53 = '';
-              $val54 = 0;
-              $xfer += $input->readString($key53);
-              $xfer += $input->readI32($val54);
-              $this->jobSubmissionProtocols[$key53] = $val54;
-            }
-            $xfer += $input->readMapEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 10:
-          if ($ftype == TType::MAP) {
-            $this->dataMovementProtocols = array();
-            $_size55 = 0;
-            $_ktype56 = 0;
-            $_vtype57 = 0;
-            $xfer += $input->readMapBegin($_ktype56, $_vtype57, $_size55);
-            for ($_i59 = 0; $_i59 < $_size55; ++$_i59)
-            {
-              $key60 = '';
-              $val61 = 0;
-              $xfer += $input->readString($key60);
-              $xfer += $input->readI32($val61);
-              $this->dataMovementProtocols[$key60] = $val61;
-            }
-            $xfer += $input->readMapEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ComputeResourceDescription');
-    if ($this->isEmpty !== null) {
-      $xfer += $output->writeFieldBegin('isEmpty', TType::BOOL, 1);
-      $xfer += $output->writeBool($this->isEmpty);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceId !== null) {
-      $xfer += $output->writeFieldBegin('resourceId', TType::STRING, 2);
-      $xfer += $output->writeString($this->resourceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->hostName !== null) {
-      $xfer += $output->writeFieldBegin('hostName', TType::STRING, 3);
-      $xfer += $output->writeString($this->hostName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->hostAliases !== null) {
-      if (!is_array($this->hostAliases)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('hostAliases', TType::SET, 4);
-      {
-        $output->writeSetBegin(TType::STRING, count($this->hostAliases));
-        {
-          foreach ($this->hostAliases as $iter62 => $iter63)
-          {
-            if (is_scalar($iter63)) {
-            $xfer += $output->writeString($iter62);
-            } else {
-            $xfer += $output->writeString($iter63);
-            }
-          }
-        }
-        $output->writeSetEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ipAddresses !== null) {
-      if (!is_array($this->ipAddresses)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('ipAddresses', TType::SET, 5);
-      {
-        $output->writeSetBegin(TType::STRING, count($this->ipAddresses));
-        {
-          foreach ($this->ipAddresses as $iter64 => $iter65)
-          {
-            if (is_scalar($iter65)) {
-            $xfer += $output->writeString($iter64);
-            } else {
-            $xfer += $output->writeString($iter65);
-            }
-          }
-        }
-        $output->writeSetEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->resourceDescription !== null) {
-      $xfer += $output->writeFieldBegin('resourceDescription', TType::STRING, 6);
-      $xfer += $output->writeString($this->resourceDescription);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->scratchLocation !== null) {
-      $xfer += $output->writeFieldBegin('scratchLocation', TType::STRING, 7);
-      $xfer += $output->writeString($this->scratchLocation);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->preferredJobSubmissionProtocol !== null) {
-      $xfer += $output->writeFieldBegin('preferredJobSubmissionProtocol', TType::STRING, 8);
-      $xfer += $output->writeString($this->preferredJobSubmissionProtocol);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->jobSubmissionProtocols !== null) {
-      if (!is_array($this->jobSubmissionProtocols)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('jobSubmissionProtocols', TType::MAP, 9);
-      {
-        $output->writeMapBegin(TType::STRING, TType::I32, count($this->jobSubmissionProtocols));
-        {
-          foreach ($this->jobSubmissionProtocols as $kiter66 => $viter67)
-          {
-            $xfer += $output->writeString($kiter66);
-            $xfer += $output->writeI32($viter67);
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->dataMovementProtocols !== null) {
-      if (!is_array($this->dataMovementProtocols)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('dataMovementProtocols', TType::MAP, 10);
-      {
-        $output->writeMapBegin(TType::STRING, TType::I32, count($this->dataMovementProtocols));
-        {
-          foreach ($this->dataMovementProtocols as $kiter68 => $viter69)
-          {
-            $xfer += $output->writeString($kiter68);
-            $xfer += $output->writeI32($viter69);
-          }
-        }
-        $output->writeMapEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationDescriptor {
-  static $_TSPEC;
-
-  public $applicationDescriptorId = "DO_NOT_SET_AT_CLIENTS";
-  public $applicationDescriptorData = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'applicationDescriptorId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'applicationDescriptorData',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['applicationDescriptorId'])) {
-        $this->applicationDescriptorId = $vals['applicationDescriptorId'];
-      }
-      if (isset($vals['applicationDescriptorData'])) {
-        $this->applicationDescriptorData = $vals['applicationDescriptorData'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationDescriptor';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationDescriptorId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationDescriptorData);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationDescriptor');
-    if ($this->applicationDescriptorId !== null) {
-      $xfer += $output->writeFieldBegin('applicationDescriptorId', TType::STRING, 1);
-      $xfer += $output->writeString($this->applicationDescriptorId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationDescriptorData !== null) {
-      $xfer += $output->writeFieldBegin('applicationDescriptorData', TType::STRING, 2);
-      $xfer += $output->writeString($this->applicationDescriptorData);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationDeployment {
-  static $_TSPEC;
-
-  public $deploymentId = "DO_NOT_SET_AT_CLIENTS";
-  public $computeResourceDescription = null;
-  public $applicationDescriptor = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'deploymentId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'computeResourceDescription',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\ComputeResourceDescription',
-          ),
-        3 => array(
-          'var' => 'applicationDescriptor',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\AppCatalog\ApplicationDescriptor',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['deploymentId'])) {
-        $this->deploymentId = $vals['deploymentId'];
-      }
-      if (isset($vals['computeResourceDescription'])) {
-        $this->computeResourceDescription = $vals['computeResourceDescription'];
-      }
-      if (isset($vals['applicationDescriptor'])) {
-        $this->applicationDescriptor = $vals['applicationDescriptor'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationDeployment';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->deploymentId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->computeResourceDescription = new \Airavata\Model\AppCatalog\ComputeResourceDescription();
-            $xfer += $this->computeResourceDescription->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->applicationDescriptor = new \Airavata\Model\AppCatalog\ApplicationDescriptor();
-            $xfer += $this->applicationDescriptor->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationDeployment');
-    if ($this->deploymentId !== null) {
-      $xfer += $output->writeFieldBegin('deploymentId', TType::STRING, 1);
-      $xfer += $output->writeString($this->deploymentId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->computeResourceDescription !== null) {
-      if (!is_object($this->computeResourceDescription)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('computeResourceDescription', TType::STRUCT, 2);
-      $xfer += $this->computeResourceDescription->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationDescriptor !== null) {
-      if (!is_object($this->applicationDescriptor)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('applicationDescriptor', TType::STRUCT, 3);
-      $xfer += $this->applicationDescriptor->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class ApplicationInterface {
-  static $_TSPEC;
-
-  public $applicationInterfaceId = "DO_NOT_SET_AT_CLIENTS";
-  public $applicationInterfaceData = null;
-  public $applicationDeployments = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'applicationInterfaceId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'applicationInterfaceData',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'applicationDeployments',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\AppCatalog\ApplicationDeployment',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['applicationInterfaceId'])) {
-        $this->applicationInterfaceId = $vals['applicationInterfaceId'];
-      }
-      if (isset($vals['applicationInterfaceData'])) {
-        $this->applicationInterfaceData = $vals['applicationInterfaceData'];
-      }
-      if (isset($vals['applicationDeployments'])) {
-        $this->applicationDeployments = $vals['applicationDeployments'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'ApplicationInterface';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationInterfaceId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->applicationInterfaceData);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::LST) {
-            $this->applicationDeployments = array();
-            $_size70 = 0;
-            $_etype73 = 0;
-            $xfer += $input->readListBegin($_etype73, $_size70);
-            for ($_i74 = 0; $_i74 < $_size70; ++$_i74)
-            {
-              $elem75 = null;
-              $elem75 = new \Airavata\Model\AppCatalog\ApplicationDeployment();
-              $xfer += $elem75->read($input);
-              $this->applicationDeployments []= $elem75;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('ApplicationInterface');
-    if ($this->applicationInterfaceId !== null) {
-      $xfer += $output->writeFieldBegin('applicationInterfaceId', TType::STRING, 1);
-      $xfer += $output->writeString($this->applicationInterfaceId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationInterfaceData !== null) {
-      $xfer += $output->writeFieldBegin('applicationInterfaceData', TType::STRING, 2);
-      $xfer += $output->writeString($this->applicationInterfaceData);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->applicationDeployments !== null) {
-      if (!is_array($this->applicationDeployments)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('applicationDeployments', TType::LST, 3);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->applicationDeployments));
-        {
-          foreach ($this->applicationDeployments as $iter76)
-          {
-            $xfer += $iter76->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-$GLOBALS['applicationCatalogDataModel_CONSTANTS']['DEFAULT_ID'] = "DO_NOT_SET_AT_CLIENTS";
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/Model/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/Model/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/Model/Types.php
deleted file mode 100644
index c53ef52..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/Model/Types.php
+++ /dev/null
@@ -1,20 +0,0 @@
-<?php
-namespace Airavata\Model;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-


[08/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Types.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Types.php b/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Types.php
deleted file mode 100644
index 673414d..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/Model/Workspace/Types.php
+++ /dev/null
@@ -1,568 +0,0 @@
-<?php
-namespace Airavata\Model\Workspace;
-
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-class Group {
-  static $_TSPEC;
-
-  public $groupName = null;
-  public $description = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'groupName',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'description',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['groupName'])) {
-        $this->groupName = $vals['groupName'];
-      }
-      if (isset($vals['description'])) {
-        $this->description = $vals['description'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Group';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->groupName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->description);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Group');
-    if ($this->groupName !== null) {
-      $xfer += $output->writeFieldBegin('groupName', TType::STRING, 1);
-      $xfer += $output->writeString($this->groupName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->description !== null) {
-      $xfer += $output->writeFieldBegin('description', TType::STRING, 2);
-      $xfer += $output->writeString($this->description);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Project {
-  static $_TSPEC;
-
-  public $projectID = "DEFAULT";
-  public $owner = null;
-  public $name = null;
-  public $description = null;
-  public $creationTime = null;
-  public $sharedUsers = null;
-  public $sharedGroups = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'projectID',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'owner',
-          'type' => TType::STRING,
-          ),
-        3 => array(
-          'var' => 'name',
-          'type' => TType::STRING,
-          ),
-        4 => array(
-          'var' => 'description',
-          'type' => TType::STRING,
-          ),
-        5 => array(
-          'var' => 'creationTime',
-          'type' => TType::I64,
-          ),
-        6 => array(
-          'var' => 'sharedUsers',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        7 => array(
-          'var' => 'sharedGroups',
-          'type' => TType::LST,
-          'etype' => TType::STRING,
-          'elem' => array(
-            'type' => TType::STRING,
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['projectID'])) {
-        $this->projectID = $vals['projectID'];
-      }
-      if (isset($vals['owner'])) {
-        $this->owner = $vals['owner'];
-      }
-      if (isset($vals['name'])) {
-        $this->name = $vals['name'];
-      }
-      if (isset($vals['description'])) {
-        $this->description = $vals['description'];
-      }
-      if (isset($vals['creationTime'])) {
-        $this->creationTime = $vals['creationTime'];
-      }
-      if (isset($vals['sharedUsers'])) {
-        $this->sharedUsers = $vals['sharedUsers'];
-      }
-      if (isset($vals['sharedGroups'])) {
-        $this->sharedGroups = $vals['sharedGroups'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Project';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectID);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->owner);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->name);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 4:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->description);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 5:
-          if ($ftype == TType::I64) {
-            $xfer += $input->readI64($this->creationTime);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 6:
-          if ($ftype == TType::LST) {
-            $this->sharedUsers = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $xfer += $input->readString($elem5);
-              $this->sharedUsers []= $elem5;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 7:
-          if ($ftype == TType::LST) {
-            $this->sharedGroups = array();
-            $_size6 = 0;
-            $_etype9 = 0;
-            $xfer += $input->readListBegin($_etype9, $_size6);
-            for ($_i10 = 0; $_i10 < $_size6; ++$_i10)
-            {
-              $elem11 = null;
-              $xfer += $input->readString($elem11);
-              $this->sharedGroups []= $elem11;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Project');
-    if ($this->projectID !== null) {
-      $xfer += $output->writeFieldBegin('projectID', TType::STRING, 1);
-      $xfer += $output->writeString($this->projectID);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->owner !== null) {
-      $xfer += $output->writeFieldBegin('owner', TType::STRING, 2);
-      $xfer += $output->writeString($this->owner);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->name !== null) {
-      $xfer += $output->writeFieldBegin('name', TType::STRING, 3);
-      $xfer += $output->writeString($this->name);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->description !== null) {
-      $xfer += $output->writeFieldBegin('description', TType::STRING, 4);
-      $xfer += $output->writeString($this->description);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->creationTime !== null) {
-      $xfer += $output->writeFieldBegin('creationTime', TType::I64, 5);
-      $xfer += $output->writeI64($this->creationTime);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->sharedUsers !== null) {
-      if (!is_array($this->sharedUsers)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('sharedUsers', TType::LST, 6);
-      {
-        $output->writeListBegin(TType::STRING, count($this->sharedUsers));
-        {
-          foreach ($this->sharedUsers as $iter12)
-          {
-            $xfer += $output->writeString($iter12);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->sharedGroups !== null) {
-      if (!is_array($this->sharedGroups)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('sharedGroups', TType::LST, 7);
-      {
-        $output->writeListBegin(TType::STRING, count($this->sharedGroups));
-        {
-          foreach ($this->sharedGroups as $iter13)
-          {
-            $xfer += $output->writeString($iter13);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class User {
-  static $_TSPEC;
-
-  public $userName = null;
-  public $groupList = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'userName',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'groupList',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Group',
-            ),
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['userName'])) {
-        $this->userName = $vals['userName'];
-      }
-      if (isset($vals['groupList'])) {
-        $this->groupList = $vals['groupList'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'User';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::LST) {
-            $this->groupList = array();
-            $_size14 = 0;
-            $_etype17 = 0;
-            $xfer += $input->readListBegin($_etype17, $_size14);
-            for ($_i18 = 0; $_i18 < $_size14; ++$_i18)
-            {
-              $elem19 = null;
-              $elem19 = new \Airavata\Model\Workspace\Group();
-              $xfer += $elem19->read($input);
-              $this->groupList []= $elem19;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('User');
-    if ($this->userName !== null) {
-      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
-      $xfer += $output->writeString($this->userName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->groupList !== null) {
-      if (!is_array($this->groupList)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('groupList', TType::LST, 2);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->groupList));
-        {
-          foreach ($this->groupList as $iter20)
-          {
-            $xfer += $iter20->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Gateway {
-  static $_TSPEC;
-
-  public $gatewayId = "DO_NOT_SET_AT_CLIENTS";
-  public $name = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'gatewayId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'name',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['gatewayId'])) {
-        $this->gatewayId = $vals['gatewayId'];
-      }
-      if (isset($vals['name'])) {
-        $this->name = $vals['name'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Gateway';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->gatewayId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->name);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Gateway');
-    if ($this->gatewayId !== null) {
-      $xfer += $output->writeFieldBegin('gatewayId', TType::STRING, 1);
-      $xfer += $output->writeString($this->gatewayId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->name !== null) {
-      $xfer += $output->writeFieldBegin('name', TType::STRING, 2);
-      $xfer += $output->writeString($this->name);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/AiravataClientFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/AiravataClientFactory.php b/Airavata-PHP-Client-Samples/lib/AiravataClientFactory.php
deleted file mode 100644
index 5724e32..0000000
--- a/Airavata-PHP-Client-Samples/lib/AiravataClientFactory.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-namespace Airavata\Client;
-
-$GLOBALS['THRIFT_ROOT'] = 'Thrift/';
-//require_once $GLOBALS['THRIFT_ROOT'] . 'Thrift.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Exception/TTransportException.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Type/TMessageType.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'Factory/TStringFuncFactory.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/TStringFunc.php';
-require_once $GLOBALS['THRIFT_ROOT'] . 'StringFunc/Core.php';
-
-$GLOBALS['AIRAVATA_ROOT'] = 'Airavata/';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'API/Airavata.php';
-
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-
-class AiravataClientFactory
-{
-
-    private $airavataServerHost;
-    private $airavataServerPort;
-
-    public function __construct($options)
-    {
-        $this->airavataServerHost = isset($options['airavataServerHost']) ? $options['airavataServerHost'] : null;
-        $this->airavataServerPort = isset($options['airavataServerPort']) ? $options['airavataServerPort'] : null;
-    }
-
-    public function getAiravataClient()
-    {
-        $transport = new TSocket($this->airavataServerHost, $this->airavataServerPort);
-        $protocol = new TBinaryProtocol($transport);
-	$transport->open();
-        return new AiravataClient($protocol);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Base/TBase.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Base/TBase.php b/Airavata-PHP-Client-Samples/lib/Thrift/Base/TBase.php
deleted file mode 100644
index 3d5b526..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Base/TBase.php
+++ /dev/null
@@ -1,367 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-namespace Thrift\Base;
-
-use Thrift\Type\TType;
-
-/**
- * Base class from which other Thrift structs extend. This is so that we can
- * cut back on the size of the generated code which is turning out to have a
- * nontrivial cost just to load thanks to the wondrously abysmal implementation
- * of PHP. Note that code is intentionally duplicated in here to avoid making
- * function calls for every field or member of a container..
- */
-abstract class TBase {
-
-  static $tmethod = array(TType::BOOL   => 'Bool',
-                          TType::BYTE   => 'Byte',
-                          TType::I16    => 'I16',
-                          TType::I32    => 'I32',
-                          TType::I64    => 'I64',
-                          TType::DOUBLE => 'Double',
-                          TType::STRING => 'String');
-
-  abstract function read($input);
-
-  abstract function write($output);
-
-  public function __construct($spec=null, $vals=null) {
-    if (is_array($spec) && is_array($vals)) {
-      foreach ($spec as $fid => $fspec) {
-        $var = $fspec['var'];
-        if (isset($vals[$var])) {
-          $this->$var = $vals[$var];
-        }
-      }
-    }
-  }
-
-  public function __wakeup()
-  {
-    $this->__construct(get_object_vars($this));
-  }
-
-  private function _readMap(&$var, $spec, $input) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kread = $vread = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kread = 'read'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vread = 'read'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $var = array();
-    $_ktype = $_vtype = $size = 0;
-    $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
-    for ($i = 0; $i < $size; ++$i) {
-      $key = $val = null;
-      if ($kread !== null) {
-        $xfer += $input->$kread($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $class = $kspec['class'];
-          $key = new $class();
-          $xfer += $key->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($key, $kspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($key, $kspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($key, $kspec, $input, true);
-          break;
-        }
-      }
-      if ($vread !== null) {
-        $xfer += $input->$vread($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $class = $vspec['class'];
-          $val = new $class();
-          $xfer += $val->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($val, $vspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($val, $vspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($val, $vspec, $input, true);
-          break;
-        }
-      }
-      $var[$key] = $val;
-    }
-    $xfer += $input->readMapEnd();
-    return $xfer;
-  }
-
-  private function _readList(&$var, $spec, $input, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $eread = $vread = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $eread = 'read'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    $var = array();
-    $_etype = $size = 0;
-    if ($set) {
-      $xfer += $input->readSetBegin($_etype, $size);
-    } else {
-      $xfer += $input->readListBegin($_etype, $size);
-    }
-    for ($i = 0; $i < $size; ++$i) {
-      $elem = null;
-      if ($eread !== null) {
-        $xfer += $input->$eread($elem);
-      } else {
-        $espec = $spec['elem'];
-        switch ($etype) {
-        case TType::STRUCT:
-          $class = $espec['class'];
-          $elem = new $class();
-          $xfer += $elem->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($elem, $espec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($elem, $espec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($elem, $espec, $input, true);
-          break;
-        }
-      }
-      if ($set) {
-        $var[$elem] = true;
-      } else {
-        $var []= $elem;
-      }
-    }
-    if ($set) {
-      $xfer += $input->readSetEnd();
-    } else {
-      $xfer += $input->readListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _read($class, $spec, $input) {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true) {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      if (isset($spec[$fid])) {
-        $fspec = $spec[$fid];
-        $var = $fspec['var'];
-        if ($ftype == $fspec['type']) {
-          $xfer = 0;
-          if (isset(TBase::$tmethod[$ftype])) {
-            $func = 'read'.TBase::$tmethod[$ftype];
-            $xfer += $input->$func($this->$var);
-          } else {
-            switch ($ftype) {
-            case TType::STRUCT:
-              $class = $fspec['class'];
-              $this->$var = new $class();
-              $xfer += $this->$var->read($input);
-              break;
-            case TType::MAP:
-              $xfer += $this->_readMap($this->$var, $fspec, $input);
-              break;
-            case TType::LST:
-              $xfer += $this->_readList($this->$var, $fspec, $input, false);
-              break;
-            case TType::SET:
-              $xfer += $this->_readList($this->$var, $fspec, $input, true);
-              break;
-            }
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-      } else {
-        $xfer += $input->skip($ftype);
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  private function _writeMap($var, $spec, $output) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kwrite = $vwrite = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kwrite = 'write'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vwrite = 'write'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
-    foreach ($var as $key => $val) {
-      if (isset($kwrite)) {
-        $xfer += $output->$kwrite($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $xfer += $key->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($key, $kspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($key, $kspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($key, $kspec, $output, true);
-          break;
-        }
-      }
-      if (isset($vwrite)) {
-        $xfer += $output->$vwrite($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $xfer += $val->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($val, $vspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($val, $vspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($val, $vspec, $output, true);
-          break;
-        }
-      }
-    }
-    $xfer += $output->writeMapEnd();
-    return $xfer;
-  }
-
-  private function _writeList($var, $spec, $output, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $ewrite = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $ewrite = 'write'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    if ($set) {
-      $xfer += $output->writeSetBegin($etype, count($var));
-    } else {
-      $xfer += $output->writeListBegin($etype, count($var));
-    }
-    foreach ($var as $key => $val) {
-      $elem = $set ? $key : $val;
-      if (isset($ewrite)) {
-        $xfer += $output->$ewrite($elem);
-      } else {
-        switch ($etype) {
-        case TType::STRUCT:
-          $xfer += $elem->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($elem, $espec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($elem, $espec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($elem, $espec, $output, true);
-          break;
-        }
-      }
-    }
-    if ($set) {
-      $xfer += $output->writeSetEnd();
-    } else {
-      $xfer += $output->writeListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _write($class, $spec, $output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin($class);
-    foreach ($spec as $fid => $fspec) {
-      $var = $fspec['var'];
-      if ($this->$var !== null) {
-        $ftype = $fspec['type'];
-        $xfer += $output->writeFieldBegin($var, $ftype, $fid);
-        if (isset(TBase::$tmethod[$ftype])) {
-          $func = 'write'.TBase::$tmethod[$ftype];
-          $xfer += $output->$func($this->$var);
-        } else {
-          switch ($ftype) {
-          case TType::STRUCT:
-            $xfer += $this->$var->write($output);
-            break;
-          case TType::MAP:
-            $xfer += $this->_writeMap($this->$var, $fspec, $output);
-            break;
-          case TType::LST:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, false);
-            break;
-          case TType::SET:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, true);
-            break;
-          }
-        }
-        $xfer += $output->writeFieldEnd();
-      }
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/ClassLoader/ThriftClassLoader.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/ClassLoader/ThriftClassLoader.php b/Airavata-PHP-Client-Samples/lib/Thrift/ClassLoader/ThriftClassLoader.php
deleted file mode 100644
index bce93f5..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/ClassLoader/ThriftClassLoader.php
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-/*
- * 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.
- *
- * ClassLoader to load Thrift library and definitions
- * Inspired from UniversalClassLoader from Symfony 2 
- *
- * @package thrift.classloader
- */
-
-namespace Thrift\ClassLoader;
-
-class ThriftClassLoader
-{
-    /**
-     * Namespaces path
-     * @var array
-     */
-    protected $namespaces = array();
-
-    /**
-     * Thrift definition paths
-     * @var type
-     */
-    protected $definitions = array();
-
-    /**
-     * Do we use APC cache ?
-     * @var boolean
-     */
-    protected $apc = false;
-
-    /**
-     * APC Cache prefix
-     * @var string
-     */
-    protected $apc_prefix;
-
-    /**
-     * Set autoloader to use APC cache
-     * @param boolean $apc
-     * @param string $apc_prefix
-     */
-    public function __construct($apc = false, $apc_prefix = null)
-    {
-        $this->apc = $apc;
-        $this->apc_prefix = $apc_prefix;
-    }
-
-    /**
-     * Registers a namespace.
-     *
-     * @param string       $namespace The namespace
-     * @param array|string $paths     The location(s) of the namespace
-     */
-    public function registerNamespace($namespace, $paths)
-    {
-        $this->namespaces[$namespace] = (array) $paths;
-    }
-
-    /**
-     * Registers a Thrift definition namespace.
-     *
-     * @param string       $namespace The definition namespace
-     * @param array|string $paths     The location(s) of the definition namespace
-     */
-    public function registerDefinition($namespace, $paths)
-    {
-        $this->definitions[$namespace] = (array) $paths;
-    }
-
-    /**
-     * Registers this instance as an autoloader.
-     *
-     * @param Boolean $prepend Whether to prepend the autoloader or not
-     */
-    public function register($prepend = false)
-    {
-        spl_autoload_register(array($this, 'loadClass'), true, $prepend);
-    }
-
-    /**
-     * Loads the given class, definition or interface.
-     *
-     * @param string $class The name of the class
-     */
-    public function loadClass($class)
-    {
-        if (
-            (true === $this->apc && ($file = $this->findFileInApc($class))) or
-            ($file = $this->findFile($class))
-        )
-        {
-            require_once $file;
-        }
-    }
-
-    /**
-     * Loads the given class or interface in APC.
-     * @param string $class The name of the class
-     * @return string
-     */
-    protected function findFileInApc($class)
-    {
-        if (false === $file = apc_fetch($this->apc_prefix.$class)) {
-            apc_store($this->apc_prefix.$class, $file = $this->findFile($class));
-        }
-
-        return $file;
-    }
-
-    /**
-     * Find class in namespaces or definitions directories
-     * @param string $class
-     * @return string
-     */
-    public function findFile($class)
-    {
-        // Remove first backslash
-        if ('\\' == $class[0])
-        {
-            $class = substr($class, 1);
-        }
-
-        if (false !== $pos = strrpos($class, '\\'))
-        {
-            // Namespaced class name
-            $namespace = substr($class, 0, $pos);
-
-            // Iterate in normal namespaces
-            foreach ($this->namespaces as $ns => $dirs)
-            {
-                //Don't interfere with other autoloaders
-                if (0 !== strpos($namespace, $ns))
-                {
-                    continue;
-                }
-
-                foreach ($dirs as $dir)
-                {
-                    $className = substr($class, $pos + 1);
-
-                    $file = $dir.DIRECTORY_SEPARATOR.
-                                 str_replace('\\', DIRECTORY_SEPARATOR, $namespace).
-                                 DIRECTORY_SEPARATOR.
-                                 $className.'.php';
-
-                    if (file_exists($file))
-                    {
-                        return $file;
-                    }
-                }
-            }
-
-            // Iterate in Thrift namespaces
-
-            // Remove first part of namespace
-            $m = explode('\\', $class);
-
-            // Ignore wrong call
-            if(count($m) <= 1)
-            {
-                return;
-            }
-
-            $class = array_pop($m);
-            $namespace = implode('\\', $m);
-
-            foreach ($this->definitions as $ns => $dirs)
-            {
-                //Don't interfere with other autoloaders
-                if (0 !== strpos($namespace, $ns))
-                {
-                    continue;
-                }
-
-                foreach ($dirs as $dir)
-                {
-                    /**
-                     * Available in service: Interface, Client, Processor, Rest
-                     * And every service methods (_.+)
-                     */
-                    if(
-                        0 === preg_match('#(.+)(if|client|processor|rest)$#i', $class, $n) and
-                        0 === preg_match('#(.+)_[a-z0-9]+_(args|result)$#i', $class, $n)
-                    )
-                    {
-                        $className = 'Types';
-                    }
-                    else
-                    {
-                        $className = $n[1];
-                    }
-
-                    $file = $dir.DIRECTORY_SEPARATOR .
-                                 str_replace('\\', DIRECTORY_SEPARATOR, $namespace) .
-                                 DIRECTORY_SEPARATOR .
-                                 $className . '.php';
-
-                    if (file_exists($file))
-                    {
-                        return $file;
-                    }
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TApplicationException.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TApplicationException.php b/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TApplicationException.php
deleted file mode 100644
index 9081973..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TApplicationException.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-namespace Thrift\Exception;
-
-use Thrift\Exception\TException;
-use Thrift\Type\TType;
-
-class TApplicationException extends TException {
-  static $_TSPEC =
-    array(1 => array('var' => 'message',
-                     'type' => TType::STRING),
-          2 => array('var' => 'code',
-                     'type' => TType::I32));
-
-  const UNKNOWN = 0;
-  const UNKNOWN_METHOD = 1;
-  const INVALID_MESSAGE_TYPE = 2;
-  const WRONG_METHOD_NAME = 3;
-  const BAD_SEQUENCE_ID = 4;
-  const MISSING_RESULT = 5;
-  const INTERNAL_ERROR = 6;
-  const PROTOCOL_ERROR = 7;
-  const INVALID_TRANSFORM = 8;
-  const INVALID_PROTOCOL = 9;
-  const UNSUPPORTED_CLIENT_TYPE = 10;
-
-  function __construct($message=null, $code=0) {
-    parent::__construct($message, $code);
-  }
-
-  public function read($output) {
-    return $this->_read('TApplicationException', self::$_TSPEC, $output);
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('TApplicationException');
-    if ($message = $this->getMessage()) {
-      $xfer += $output->writeFieldBegin('message', TType::STRING, 1);
-      $xfer += $output->writeString($message);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($code = $this->getCode()) {
-      $xfer += $output->writeFieldBegin('type', TType::I32, 2);
-      $xfer += $output->writeI32($code);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TException.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TException.php b/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TException.php
deleted file mode 100644
index 8e8cd28..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TException.php
+++ /dev/null
@@ -1,369 +0,0 @@
-<?php
-/*
- * 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 thrift
- */
-
-namespace Thrift\Exception;
-
-use Thrift\Type\TType;
-use Thrift\Base\TBase;
-
-/**
- * NOTE(mcslee): This currently contains a ton of duplicated code from TBase
- * because we need to save CPU cycles and this is not yet in an extension.
- * Ideally we'd multiply-inherit TException from both Exception and Base, but
- * that's not possible in PHP and there are no modules either, so for now we
- * apologetically take a trip to HackTown.
- *
- * Can be called with standard Exception constructor (message, code) or with
- * Thrift Base object constructor (spec, vals).
- *
- * @param mixed $p1 Message (string) or type-spec (array)
- * @param mixed $p2 Code (integer) or values (array)
- */
-class TException extends \Exception {
-  function __construct($p1=null, $p2=0) {
-    if (is_array($p1) && is_array($p2)) {
-      $spec = $p1;
-      $vals = $p2;
-      foreach ($spec as $fid => $fspec) {
-        $var = $fspec['var'];
-        if (isset($vals[$var])) {
-          $this->$var = $vals[$var];
-        }
-      }
-    } else {
-      parent::__construct($p1, $p2);
-    }
-  }
-
-  static $tmethod = array(TType::BOOL   => 'Bool',
-                          TType::BYTE   => 'Byte',
-                          TType::I16    => 'I16',
-                          TType::I32    => 'I32',
-                          TType::I64    => 'I64',
-                          TType::DOUBLE => 'Double',
-                          TType::STRING => 'String');
-
-  private function _readMap(&$var, $spec, $input) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kread = $vread = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kread = 'read'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vread = 'read'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $var = array();
-    $_ktype = $_vtype = $size = 0;
-    $xfer += $input->readMapBegin($_ktype, $_vtype, $size);
-    for ($i = 0; $i < $size; ++$i) {
-      $key = $val = null;
-      if ($kread !== null) {
-        $xfer += $input->$kread($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $class = $kspec['class'];
-          $key = new $class();
-          $xfer += $key->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($key, $kspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($key, $kspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($key, $kspec, $input, true);
-          break;
-        }
-      }
-      if ($vread !== null) {
-        $xfer += $input->$vread($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $class = $vspec['class'];
-          $val = new $class();
-          $xfer += $val->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($val, $vspec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($val, $vspec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($val, $vspec, $input, true);
-          break;
-        }
-      }
-      $var[$key] = $val;
-    }
-    $xfer += $input->readMapEnd();
-    return $xfer;
-  }
-
-  private function _readList(&$var, $spec, $input, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $eread = $vread = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $eread = 'read'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    $var = array();
-    $_etype = $size = 0;
-    if ($set) {
-      $xfer += $input->readSetBegin($_etype, $size);
-    } else {
-      $xfer += $input->readListBegin($_etype, $size);
-    }
-    for ($i = 0; $i < $size; ++$i) {
-      $elem = null;
-      if ($eread !== null) {
-        $xfer += $input->$eread($elem);
-      } else {
-        $espec = $spec['elem'];
-        switch ($etype) {
-        case TType::STRUCT:
-          $class = $espec['class'];
-          $elem = new $class();
-          $xfer += $elem->read($input);
-          break;
-        case TType::MAP:
-          $xfer += $this->_readMap($elem, $espec, $input);
-          break;
-        case TType::LST:
-          $xfer += $this->_readList($elem, $espec, $input, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_readList($elem, $espec, $input, true);
-          break;
-        }
-      }
-      if ($set) {
-        $var[$elem] = true;
-      } else {
-        $var []= $elem;
-      }
-    }
-    if ($set) {
-      $xfer += $input->readSetEnd();
-    } else {
-      $xfer += $input->readListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _read($class, $spec, $input) {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true) {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      if (isset($spec[$fid])) {
-        $fspec = $spec[$fid];
-        $var = $fspec['var'];
-        if ($ftype == $fspec['type']) {
-          $xfer = 0;
-          if (isset(TBase::$tmethod[$ftype])) {
-            $func = 'read'.TBase::$tmethod[$ftype];
-            $xfer += $input->$func($this->$var);
-          } else {
-            switch ($ftype) {
-            case TType::STRUCT:
-              $class = $fspec['class'];
-              $this->$var = new $class();
-              $xfer += $this->$var->read($input);
-              break;
-            case TType::MAP:
-              $xfer += $this->_readMap($this->$var, $fspec, $input);
-              break;
-            case TType::LST:
-              $xfer += $this->_readList($this->$var, $fspec, $input, false);
-              break;
-            case TType::SET:
-              $xfer += $this->_readList($this->$var, $fspec, $input, true);
-              break;
-            }
-          }
-        } else {
-          $xfer += $input->skip($ftype);
-        }
-      } else {
-        $xfer += $input->skip($ftype);
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  private function _writeMap($var, $spec, $output) {
-    $xfer = 0;
-    $ktype = $spec['ktype'];
-    $vtype = $spec['vtype'];
-    $kwrite = $vwrite = null;
-    if (isset(TBase::$tmethod[$ktype])) {
-      $kwrite = 'write'.TBase::$tmethod[$ktype];
-    } else {
-      $kspec = $spec['key'];
-    }
-    if (isset(TBase::$tmethod[$vtype])) {
-      $vwrite = 'write'.TBase::$tmethod[$vtype];
-    } else {
-      $vspec = $spec['val'];
-    }
-    $xfer += $output->writeMapBegin($ktype, $vtype, count($var));
-    foreach ($var as $key => $val) {
-      if (isset($kwrite)) {
-        $xfer += $output->$kwrite($key);
-      } else {
-        switch ($ktype) {
-        case TType::STRUCT:
-          $xfer += $key->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($key, $kspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($key, $kspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($key, $kspec, $output, true);
-          break;
-        }
-      }
-      if (isset($vwrite)) {
-        $xfer += $output->$vwrite($val);
-      } else {
-        switch ($vtype) {
-        case TType::STRUCT:
-          $xfer += $val->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($val, $vspec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($val, $vspec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($val, $vspec, $output, true);
-          break;
-        }
-      }
-    }
-    $xfer += $output->writeMapEnd();
-    return $xfer;
-  }
-
-  private function _writeList($var, $spec, $output, $set=false) {
-    $xfer = 0;
-    $etype = $spec['etype'];
-    $ewrite = null;
-    if (isset(TBase::$tmethod[$etype])) {
-      $ewrite = 'write'.TBase::$tmethod[$etype];
-    } else {
-      $espec = $spec['elem'];
-    }
-    if ($set) {
-      $xfer += $output->writeSetBegin($etype, count($var));
-    } else {
-      $xfer += $output->writeListBegin($etype, count($var));
-    }
-    foreach ($var as $key => $val) {
-      $elem = $set ? $key : $val;
-      if (isset($ewrite)) {
-        $xfer += $output->$ewrite($elem);
-      } else {
-        switch ($etype) {
-        case TType::STRUCT:
-          $xfer += $elem->write($output);
-          break;
-        case TType::MAP:
-          $xfer += $this->_writeMap($elem, $espec, $output);
-          break;
-        case TType::LST:
-          $xfer += $this->_writeList($elem, $espec, $output, false);
-          break;
-        case TType::SET:
-          $xfer += $this->_writeList($elem, $espec, $output, true);
-          break;
-        }
-      }
-    }
-    if ($set) {
-      $xfer += $output->writeSetEnd();
-    } else {
-      $xfer += $output->writeListEnd();
-    }
-    return $xfer;
-  }
-
-  protected function _write($class, $spec, $output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin($class);
-    foreach ($spec as $fid => $fspec) {
-      $var = $fspec['var'];
-      if ($this->$var !== null) {
-        $ftype = $fspec['type'];
-        $xfer += $output->writeFieldBegin($var, $ftype, $fid);
-        if (isset(TBase::$tmethod[$ftype])) {
-          $func = 'write'.TBase::$tmethod[$ftype];
-          $xfer += $output->$func($this->$var);
-        } else {
-          switch ($ftype) {
-          case TType::STRUCT:
-            $xfer += $this->$var->write($output);
-            break;
-          case TType::MAP:
-            $xfer += $this->_writeMap($this->$var, $fspec, $output);
-            break;
-          case TType::LST:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, false);
-            break;
-          case TType::SET:
-            $xfer += $this->_writeList($this->$var, $fspec, $output, true);
-            break;
-          }
-        }
-        $xfer += $output->writeFieldEnd();
-      }
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TProtocolException.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TProtocolException.php b/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TProtocolException.php
deleted file mode 100644
index 98a8d9d..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TProtocolException.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- * @author: rmarin (marin.radu@facebook.com)
- */
-
-namespace Thrift\Exception;
-
-use Thrift\Exception\TException;
-
-/**
- * Protocol module. Contains all the types and definitions needed to implement
- * a protocol encoder/decoder.
- *
- * @package thrift.protocol
- */
-
-/**
- * Protocol exceptions
- */
-class TProtocolException extends TException {
-  const UNKNOWN = 0;
-  const INVALID_DATA = 1;
-  const NEGATIVE_SIZE = 2;
-  const SIZE_LIMIT = 3;
-  const BAD_VERSION = 4;
-
-  function __construct($message=null, $code=0) {
-    parent::__construct($message, $code);
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TTransportException.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TTransportException.php b/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TTransportException.php
deleted file mode 100644
index f467eb9..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Exception/TTransportException.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/*
- * 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 thrift.transport
- */
-
-namespace Thrift\Exception;
-
-use Thrift\Exception\TException;
-
-/**
- * Transport exceptions
- */
-class TTransportException extends TException {
-
-  const UNKNOWN = 0;
-  const NOT_OPEN = 1;
-  const ALREADY_OPEN = 2;
-  const TIMED_OUT = 3;
-  const END_OF_FILE = 4;
-
-  function __construct($message=null, $code=0) {
-    parent::__construct($message, $code);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TBinaryProtocolFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TBinaryProtocolFactory.php b/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TBinaryProtocolFactory.php
deleted file mode 100644
index 85da567..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TBinaryProtocolFactory.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-use Thrift\Factory\TProtocolFactory;
-use Thrift\Protocol\TBinaryProtocol;
-
-/**
- * Binary Protocol Factory
- */
-class TBinaryProtocolFactory implements TProtocolFactory {
-  private $strictRead_ = false;
-  private $strictWrite_ = false;
-
-  public function __construct($strictRead=false, $strictWrite=false) {
-    $this->strictRead_ = $strictRead;
-    $this->strictWrite_ = $strictWrite;
-  }
-
-  public function getProtocol($trans) {
-    return new TBinaryProtocol($trans, $this->strictRead_, $this->strictWrite_);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TCompactProtocolFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TCompactProtocolFactory.php b/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TCompactProtocolFactory.php
deleted file mode 100644
index 9f972aa..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TCompactProtocolFactory.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-use Thrift\Factory\TProtocolFactory;
-use Thrift\Protocol\TCompactProtocol;
-
-/**
- * Compact Protocol Factory
- */
-class TCompactProtocolFactory implements TProtocolFactory {
-
-  public function __construct() {
-  }
-
-  public function getProtocol($trans) {
-    return new TCompactProtocol($trans);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TJSONProtocolFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TJSONProtocolFactory.php b/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TJSONProtocolFactory.php
deleted file mode 100644
index 27e4391..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TJSONProtocolFactory.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-use Thrift\Factory\TProtocolFactory;
-use Thrift\Protocol\TJSONProtocol;
-
-/**
- * JSON Protocol Factory
- */
-class TJSONProtocolFactory implements TProtocolFactory
-{
-    public function __construct()
-    {
-    }
-
-    public function getProtocol($trans)
-    {
-        return new TJSONProtocol($trans);
-    }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TProtocolFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TProtocolFactory.php b/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TProtocolFactory.php
deleted file mode 100644
index 6b322eb..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TProtocolFactory.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Factory;
-
-/**
- * Protocol factory creates protocol objects from transports
- */
-interface TProtocolFactory {
-  /**
-   * Build a protocol from the base transport
-   *
-   * @return Thrift\Protocol\TProtocol protocol
-   */
-  public function getProtocol($trans);
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TStringFuncFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TStringFuncFactory.php b/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TStringFuncFactory.php
deleted file mode 100644
index edc3649..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TStringFuncFactory.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/*
- * 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.
- *
- */
-
-namespace Thrift\Factory;
-
-use Thrift\StringFunc\Mbstring;
-use Thrift\StringFunc\Core;
-
-class TStringFuncFactory {
-    private static $_instance;
-
-    /**
-     * Get the Singleton instance of TStringFunc implementation that is
-     * compatible with the current system's mbstring.func_overload settings.
-     *
-     * @return TStringFunc
-     */
-    public static function create() {
-        if(!self::$_instance) {
-            self::_setInstance();
-        }
-
-        return self::$_instance;
-    }
-
-    private static function _setInstance() {
-        /**
-         * Cannot use str* functions for byte counting because multibyte
-         * characters will be read a single bytes.
-         *
-         * See: http://us.php.net/manual/en/mbstring.overload.php
-         */
-        if(ini_get('mbstring.func_overload') & 2) {
-            self::$_instance = new Mbstring();
-        }
-        /**
-         * mbstring is not installed or does not have function overloading
-         * of the str* functions enabled so use PHP core str* functions for
-         * byte counting.
-         */
-        else {
-            self::$_instance = new Core();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TTransportFactory.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TTransportFactory.php b/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TTransportFactory.php
deleted file mode 100644
index f3ae123..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Factory/TTransportFactory.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-
-namespace Thrift\Factory;
-
-use Thrift\Transport\TTransport;
-
-class TTransportFactory {
-  /**
-   * @static
-   * @param TTransport $transport
-   * @return TTransport
-   */
-  public static function getTransport(TTransport $transport) {
-    return $transport;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/BaseContext.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/BaseContext.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/BaseContext.php
deleted file mode 100644
index e96e504..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/BaseContext.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-class BaseContext
-{
-    function escapeNum()
-    {
-        return false;
-    }
-
-    function write()
-    {
-    }
-
-    function read()
-    {
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/ListContext.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/ListContext.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/ListContext.php
deleted file mode 100644
index a2b75b1..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/ListContext.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-use Thrift\Protocol\JSON\BaseContext;
-use Thrift\Protocol\TJSONProtocol;
-
-class ListContext extends BaseContext
-{
-    private $first_ = true;
-    private $p_;
-
-    public function __construct($p) {
-        $this->p_ = $p;
-    }
-
-    public function write() {
-        if ($this->first_) {
-            $this->first_ = false;
-        } else {
-            $this->p_->getTransport()->write(TJSONProtocol::COMMA);
-        }
-    }
-
-    public function read() {
-        if ($this->first_) {
-            $this->first_ = false;
-        } else {
-            $this->p_->readJSONSyntaxChar(TJSONProtocol::COMMA);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/LookaheadReader.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/LookaheadReader.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/LookaheadReader.php
deleted file mode 100644
index 128b5fc..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/LookaheadReader.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-class LookaheadReader
-{
-    private $hasData_ = false;
-    private $data_ = array();
-    private $p_;
-
-    public function __construct($p)
-    {
-        $this->p_ = $p;
-    }
-
-    public function read() {
-        if ($this->hasData_) {
-            $this->hasData_ = false;
-        } else {
-            $this->data_ = $this->p_->getTransport()->readAll(1);
-        }
-
-        return substr($this->data_, 0, 1);
-    }
-
-    public function peek() {
-        if (!$this->hasData_) {
-            $this->data_ = $this->p_->getTransport()->readAll(1);
-        }
-
-        $this->hasData_ = true;
-        return substr($this->data_, 0, 1);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/PairContext.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/PairContext.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/PairContext.php
deleted file mode 100644
index 1c87dd3..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/JSON/PairContext.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol\JSON;
-
-use Thrift\Protocol\JSON\BaseContext;
-use Thrift\Protocol\TJSONProtocol;
-
-class PairContext extends BaseContext {
-    private $first_ = true;
-    private $colon_ = true;
-    private $p_ = null;
-
-    public function __construct($p) {
-        $this->p_ = $p;
-    }
-
-    public function write() {
-        if ($this->first_) {
-            $this->first_ = false;
-            $this->colon_ = true;
-        } else {
-            $this->p_->getTransport()->write($this->colon_ ? TJSONProtocol::COLON : TJSONProtocol::COMMA);
-            $this->colon_ = !$this->colon_;
-        }
-    }
-
-    public function read() {
-        if ($this->first_) {
-            $this->first_ = false;
-            $this->colon_ = true;
-        } else {
-            $this->p_->readJSONSyntaxChar($this->colon_ ? TJSONProtocol::COLON : TJSONProtocol::COMMA);
-            $this->colon_ = !$this->colon_;
-        }
-    }
-
-    public function escapeNum() {
-        return $this->colon_;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocol.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocol.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocol.php
deleted file mode 100644
index b1fddac..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocol.php
+++ /dev/null
@@ -1,396 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Protocol\TProtocol;
-use Thrift\Type\TType;
-use Thrift\Exception\TProtocolException;
-use Thrift\Factory\TStringFuncFactory;
-
-/**
- * Binary implementation of the Thrift protocol.
- *
- */
-class TBinaryProtocol extends TProtocol {
-
-  const VERSION_MASK = 0xffff0000;
-  const VERSION_1 = 0x80010000;
-
-  protected $strictRead_ = false;
-  protected $strictWrite_ = true;
-
-  public function __construct($trans, $strictRead=false, $strictWrite=true) {
-    parent::__construct($trans);
-    $this->strictRead_ = $strictRead;
-    $this->strictWrite_ = $strictWrite;
-  }
-
-  public function writeMessageBegin($name, $type, $seqid) {
-    if ($this->strictWrite_) {
-      $version = self::VERSION_1 | $type;
-      return
-        $this->writeI32($version) +
-        $this->writeString($name) +
-        $this->writeI32($seqid);
-    } else {
-      return
-        $this->writeString($name) +
-        $this->writeByte($type) +
-        $this->writeI32($seqid);
-    }
-  }
-
-  public function writeMessageEnd() {
-    return 0;
-  }
-
-  public function writeStructBegin($name) {
-    return 0;
-  }
-
-  public function writeStructEnd() {
-    return 0;
-  }
-
-  public function writeFieldBegin($fieldName, $fieldType, $fieldId) {
-    return
-      $this->writeByte($fieldType) +
-      $this->writeI16($fieldId);
-  }
-
-  public function writeFieldEnd() {
-    return 0;
-  }
-
-  public function writeFieldStop() {
-    return
-      $this->writeByte(TType::STOP);
-  }
-
-  public function writeMapBegin($keyType, $valType, $size) {
-    return
-      $this->writeByte($keyType) +
-      $this->writeByte($valType) +
-      $this->writeI32($size);
-  }
-
-  public function writeMapEnd() {
-    return 0;
-  }
-
-  public function writeListBegin($elemType, $size) {
-    return
-      $this->writeByte($elemType) +
-      $this->writeI32($size);
-  }
-
-  public function writeListEnd() {
-    return 0;
-  }
-
-  public function writeSetBegin($elemType, $size) {
-    return
-      $this->writeByte($elemType) +
-      $this->writeI32($size);
-  }
-
-  public function writeSetEnd() {
-    return 0;
-  }
-
-  public function writeBool($value) {
-    $data = pack('c', $value ? 1 : 0);
-    $this->trans_->write($data, 1);
-    return 1;
-  }
-
-  public function writeByte($value) {
-    $data = pack('c', $value);
-    $this->trans_->write($data, 1);
-    return 1;
-  }
-
-  public function writeI16($value) {
-    $data = pack('n', $value);
-    $this->trans_->write($data, 2);
-    return 2;
-  }
-
-  public function writeI32($value) {
-    $data = pack('N', $value);
-    $this->trans_->write($data, 4);
-    return 4;
-  }
-
-  public function writeI64($value) {
-    // If we are on a 32bit architecture we have to explicitly deal with
-    // 64-bit twos-complement arithmetic since PHP wants to treat all ints
-    // as signed and any int over 2^31 - 1 as a float
-    if (PHP_INT_SIZE == 4) {
-      $neg = $value < 0;
-
-      if ($neg) {
-        $value *= -1;
-      }
-
-      $hi = (int)($value / 4294967296);
-      $lo = (int)$value;
-
-      if ($neg) {
-        $hi = ~$hi;
-        $lo = ~$lo;
-        if (($lo & (int)0xffffffff) == (int)0xffffffff) {
-          $lo = 0;
-          $hi++;
-        } else {
-          $lo++;
-        }
-      }
-      $data = pack('N2', $hi, $lo);
-
-    } else {
-      $hi = $value >> 32;
-      $lo = $value & 0xFFFFFFFF;
-      $data = pack('N2', $hi, $lo);
-    }
-
-    $this->trans_->write($data, 8);
-    return 8;
-  }
-
-  public function writeDouble($value) {
-    $data = pack('d', $value);
-    $this->trans_->write(strrev($data), 8);
-    return 8;
-  }
-
-  public function writeString($value) {
-    $len = TStringFuncFactory::create()->strlen($value);
-    $result = $this->writeI32($len);
-    if ($len) {
-      $this->trans_->write($value, $len);
-    }
-    return $result + $len;
-  }
-
-  public function readMessageBegin(&$name, &$type, &$seqid) {
-    $result = $this->readI32($sz);
-    if ($sz < 0) {
-      $version = (int) ($sz & self::VERSION_MASK);
-      if ($version != (int) self::VERSION_1) {
-        throw new TProtocolException('Bad version identifier: '.$sz, TProtocolException::BAD_VERSION);
-      }
-      $type = $sz & 0x000000ff;
-      $result +=
-        $this->readString($name) +
-        $this->readI32($seqid);
-    } else {
-      if ($this->strictRead_) {
-        throw new TProtocolException('No version identifier, old protocol client?', TProtocolException::BAD_VERSION);
-      } else {
-        // Handle pre-versioned input
-        $name = $this->trans_->readAll($sz);
-        $result +=
-          $sz +
-          $this->readByte($type) +
-          $this->readI32($seqid);
-      }
-    }
-    return $result;
-  }
-
-  public function readMessageEnd() {
-    return 0;
-  }
-
-  public function readStructBegin(&$name) {
-    $name = '';
-    return 0;
-  }
-
-  public function readStructEnd() {
-    return 0;
-  }
-
-  public function readFieldBegin(&$name, &$fieldType, &$fieldId) {
-    $result = $this->readByte($fieldType);
-    if ($fieldType == TType::STOP) {
-      $fieldId = 0;
-      return $result;
-    }
-    $result += $this->readI16($fieldId);
-    return $result;
-  }
-
-  public function readFieldEnd() {
-    return 0;
-  }
-
-  public function readMapBegin(&$keyType, &$valType, &$size) {
-    return
-      $this->readByte($keyType) +
-      $this->readByte($valType) +
-      $this->readI32($size);
-  }
-
-  public function readMapEnd() {
-    return 0;
-  }
-
-  public function readListBegin(&$elemType, &$size) {
-    return
-      $this->readByte($elemType) +
-      $this->readI32($size);
-  }
-
-  public function readListEnd() {
-    return 0;
-  }
-
-  public function readSetBegin(&$elemType, &$size) {
-    return
-      $this->readByte($elemType) +
-      $this->readI32($size);
-  }
-
-  public function readSetEnd() {
-    return 0;
-  }
-
-  public function readBool(&$value) {
-    $data = $this->trans_->readAll(1);
-    $arr = unpack('c', $data);
-    $value = $arr[1] == 1;
-    return 1;
-  }
-
-  public function readByte(&$value) {
-    $data = $this->trans_->readAll(1);
-    $arr = unpack('c', $data);
-    $value = $arr[1];
-    return 1;
-  }
-
-  public function readI16(&$value) {
-    $data = $this->trans_->readAll(2);
-    $arr = unpack('n', $data);
-    $value = $arr[1];
-    if ($value > 0x7fff) {
-      $value = 0 - (($value - 1) ^ 0xffff);
-    }
-    return 2;
-  }
-
-  public function readI32(&$value) {
-    $data = $this->trans_->readAll(4);
-    $arr = unpack('N', $data);
-    $value = $arr[1];
-    if ($value > 0x7fffffff) {
-      $value = 0 - (($value - 1) ^ 0xffffffff);
-    }
-    return 4;
-  }
-
-  public function readI64(&$value) {
-    $data = $this->trans_->readAll(8);
-
-    $arr = unpack('N2', $data);
-
-    // If we are on a 32bit architecture we have to explicitly deal with
-    // 64-bit twos-complement arithmetic since PHP wants to treat all ints
-    // as signed and any int over 2^31 - 1 as a float
-    if (PHP_INT_SIZE == 4) {
-
-      $hi = $arr[1];
-      $lo = $arr[2];
-      $isNeg = $hi  < 0;
-
-      // Check for a negative
-      if ($isNeg) {
-        $hi = ~$hi & (int)0xffffffff;
-        $lo = ~$lo & (int)0xffffffff;
-
-        if ($lo == (int)0xffffffff) {
-          $hi++;
-          $lo = 0;
-        } else {
-          $lo++;
-        }
-      }
-
-      // Force 32bit words in excess of 2G to pe positive - we deal wigh sign
-      // explicitly below
-
-      if ($hi & (int)0x80000000) {
-        $hi &= (int)0x7fffffff;
-        $hi += 0x80000000;
-      }
-
-      if ($lo & (int)0x80000000) {
-        $lo &= (int)0x7fffffff;
-        $lo += 0x80000000;
-      }
-
-      $value = $hi * 4294967296 + $lo;
-
-      if ($isNeg) {
-        $value = 0 - $value;
-      }
-    } else {
-
-      // Upcast negatives in LSB bit
-      if ($arr[2] & 0x80000000) {
-        $arr[2] = $arr[2] & 0xffffffff;
-      }
-
-      // Check for a negative
-      if ($arr[1] & 0x80000000) {
-        $arr[1] = $arr[1] & 0xffffffff;
-        $arr[1] = $arr[1] ^ 0xffffffff;
-        $arr[2] = $arr[2] ^ 0xffffffff;
-        $value = 0 - $arr[1]*4294967296 - $arr[2] - 1;
-      } else {
-        $value = $arr[1]*4294967296 + $arr[2];
-      }
-    }
-
-    return 8;
-  }
-
-  public function readDouble(&$value) {
-    $data = strrev($this->trans_->readAll(8));
-    $arr = unpack('d', $data);
-    $value = $arr[1];
-    return 8;
-  }
-
-  public function readString(&$value) {
-    $result = $this->readI32($len);
-    if ($len) {
-      $value = $this->trans_->readAll($len);
-    } else {
-      $value = '';
-    }
-    return $result + $len;
-  }
-}

http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocolAccelerated.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocolAccelerated.php b/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocolAccelerated.php
deleted file mode 100644
index 392aa21..0000000
--- a/Airavata-PHP-Client-Samples/lib/Thrift/Protocol/TBinaryProtocolAccelerated.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/*
- * 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 thrift.protocol
- */
-
-namespace Thrift\Protocol;
-
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TBufferedTransport;
-
-/**
- * Accelerated binary protocol: used in conjunction with the thrift_protocol
- * extension for faster deserialization
- */
-class TBinaryProtocolAccelerated extends TBinaryProtocol {
-  public function __construct($trans, $strictRead=false, $strictWrite=true) {
-    // If the transport doesn't implement putBack, wrap it in a
-    // TBufferedTransport (which does)
-    if (!method_exists($trans, 'putBack')) {
-      $trans = new TBufferedTransport($trans);
-    }
-    parent::__construct($trans, $strictRead, $strictWrite);
-  }
-  public function isStrictRead() {
-    return $this->strictRead_;
-  }
-  public function isStrictWrite() {
-    return $this->strictWrite_;
-  }
-}
\ No newline at end of file


[12/14] moving php command line samples and pointing to airavata sdk - AIRAVATA-1274

Posted by sm...@apache.org.
http://git-wip-us.apache.org/repos/asf/airavata/blob/c09963aa/Airavata-PHP-Client-Samples/lib/Airavata/API/Airavata.php
----------------------------------------------------------------------
diff --git a/Airavata-PHP-Client-Samples/lib/Airavata/API/Airavata.php b/Airavata-PHP-Client-Samples/lib/Airavata/API/Airavata.php
deleted file mode 100644
index ead58ec..0000000
--- a/Airavata-PHP-Client-Samples/lib/Airavata/API/Airavata.php
+++ /dev/null
@@ -1,6840 +0,0 @@
-<?php
-namespace Airavata\API;
-/**
- * Autogenerated by Thrift Compiler (0.9.1)
- *
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- *  @generated
- */
-use Thrift\Base\TBase;
-use Thrift\Type\TType;
-use Thrift\Type\TMessageType;
-use Thrift\Exception\TException;
-use Thrift\Exception\TProtocolException;
-use Thrift\Protocol\TProtocol;
-use Thrift\Protocol\TBinaryProtocolAccelerated;
-use Thrift\Exception\TApplicationException;
-
-
-interface AiravataIf {
-  public function getAPIVersion();
-  public function createProject(\Airavata\Model\Workspace\Project $project);
-  public function updateProject($projectId, \Airavata\Model\Workspace\Project $updatedProject);
-  public function getProject($projectId);
-  public function getAllUserProjects($userName);
-  public function searchProjectsByProjectName($userName, $projectName);
-  public function searchProjectsByProjectDesc($userName, $description);
-  public function searchExperimentsByName($userName, $expName);
-  public function searchExperimentsByDesc($userName, $description);
-  public function searchExperimentsByApplication($userName, $applicationId);
-  public function getAllExperimentsInProject($projectId);
-  public function getAllUserExperiments($userName);
-  public function createExperiment(\Airavata\Model\Workspace\Experiment\Experiment $experiment);
-  public function getExperiment($airavataExperimentId);
-  public function updateExperiment($airavataExperimentId, \Airavata\Model\Workspace\Experiment\Experiment $experiment);
-  public function updateExperimentConfiguration($airavataExperimentId, \Airavata\Model\Workspace\Experiment\UserConfigurationData $userConfiguration);
-  public function updateResourceScheduleing($airavataExperimentId, \Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling $resourceScheduling);
-  public function validateExperiment($airavataExperimentId);
-  public function launchExperiment($airavataExperimentId, $airavataCredStoreToken);
-  public function getExperimentStatus($airavataExperimentId);
-  public function getExperimentOutputs($airavataExperimentId);
-  public function getJobStatuses($airavataExperimentId);
-  public function cloneExperiment($existingExperimentID, $newExperimentName);
-  public function terminateExperiment($airavataExperimentId);
-}
-
-class AiravataClient implements \Airavata\API\AiravataIf {
-  protected $input_ = null;
-  protected $output_ = null;
-
-  protected $seqid_ = 0;
-
-  public function __construct($input, $output=null) {
-    $this->input_ = $input;
-    $this->output_ = $output ? $output : $input;
-  }
-
-  public function getAPIVersion()
-  {
-    $this->send_getAPIVersion();
-    return $this->recv_getAPIVersion();
-  }
-
-  public function send_getAPIVersion()
-  {
-    $args = new \Airavata\API\Airavata_getAPIVersion_args();
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getAPIVersion', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getAPIVersion', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getAPIVersion()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAPIVersion_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getAPIVersion_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getAPIVersion failed: unknown result");
-  }
-
-  public function createProject(\Airavata\Model\Workspace\Project $project)
-  {
-    $this->send_createProject($project);
-    return $this->recv_createProject();
-  }
-
-  public function send_createProject(\Airavata\Model\Workspace\Project $project)
-  {
-    $args = new \Airavata\API\Airavata_createProject_args();
-    $args->project = $project;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'createProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('createProject', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_createProject()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_createProject_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_createProject_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("createProject failed: unknown result");
-  }
-
-  public function updateProject($projectId, \Airavata\Model\Workspace\Project $updatedProject)
-  {
-    $this->send_updateProject($projectId, $updatedProject);
-    $this->recv_updateProject();
-  }
-
-  public function send_updateProject($projectId, \Airavata\Model\Workspace\Project $updatedProject)
-  {
-    $args = new \Airavata\API\Airavata_updateProject_args();
-    $args->projectId = $projectId;
-    $args->updatedProject = $updatedProject;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'updateProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('updateProject', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_updateProject()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateProject_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_updateProject_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    return;
-  }
-
-  public function getProject($projectId)
-  {
-    $this->send_getProject($projectId);
-    return $this->recv_getProject();
-  }
-
-  public function send_getProject($projectId)
-  {
-    $args = new \Airavata\API\Airavata_getProject_args();
-    $args->projectId = $projectId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getProject', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getProject()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getProject_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getProject_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getProject failed: unknown result");
-  }
-
-  public function getAllUserProjects($userName)
-  {
-    $this->send_getAllUserProjects($userName);
-    return $this->recv_getAllUserProjects();
-  }
-
-  public function send_getAllUserProjects($userName)
-  {
-    $args = new \Airavata\API\Airavata_getAllUserProjects_args();
-    $args->userName = $userName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getAllUserProjects', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getAllUserProjects', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getAllUserProjects()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllUserProjects_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getAllUserProjects_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getAllUserProjects failed: unknown result");
-  }
-
-  public function searchProjectsByProjectName($userName, $projectName)
-  {
-    $this->send_searchProjectsByProjectName($userName, $projectName);
-    return $this->recv_searchProjectsByProjectName();
-  }
-
-  public function send_searchProjectsByProjectName($userName, $projectName)
-  {
-    $args = new \Airavata\API\Airavata_searchProjectsByProjectName_args();
-    $args->userName = $userName;
-    $args->projectName = $projectName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'searchProjectsByProjectName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('searchProjectsByProjectName', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_searchProjectsByProjectName()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_searchProjectsByProjectName_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_searchProjectsByProjectName_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("searchProjectsByProjectName failed: unknown result");
-  }
-
-  public function searchProjectsByProjectDesc($userName, $description)
-  {
-    $this->send_searchProjectsByProjectDesc($userName, $description);
-    return $this->recv_searchProjectsByProjectDesc();
-  }
-
-  public function send_searchProjectsByProjectDesc($userName, $description)
-  {
-    $args = new \Airavata\API\Airavata_searchProjectsByProjectDesc_args();
-    $args->userName = $userName;
-    $args->description = $description;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'searchProjectsByProjectDesc', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('searchProjectsByProjectDesc', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_searchProjectsByProjectDesc()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_searchProjectsByProjectDesc_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_searchProjectsByProjectDesc_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("searchProjectsByProjectDesc failed: unknown result");
-  }
-
-  public function searchExperimentsByName($userName, $expName)
-  {
-    $this->send_searchExperimentsByName($userName, $expName);
-    return $this->recv_searchExperimentsByName();
-  }
-
-  public function send_searchExperimentsByName($userName, $expName)
-  {
-    $args = new \Airavata\API\Airavata_searchExperimentsByName_args();
-    $args->userName = $userName;
-    $args->expName = $expName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'searchExperimentsByName', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('searchExperimentsByName', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_searchExperimentsByName()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_searchExperimentsByName_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_searchExperimentsByName_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("searchExperimentsByName failed: unknown result");
-  }
-
-  public function searchExperimentsByDesc($userName, $description)
-  {
-    $this->send_searchExperimentsByDesc($userName, $description);
-    return $this->recv_searchExperimentsByDesc();
-  }
-
-  public function send_searchExperimentsByDesc($userName, $description)
-  {
-    $args = new \Airavata\API\Airavata_searchExperimentsByDesc_args();
-    $args->userName = $userName;
-    $args->description = $description;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'searchExperimentsByDesc', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('searchExperimentsByDesc', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_searchExperimentsByDesc()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_searchExperimentsByDesc_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_searchExperimentsByDesc_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("searchExperimentsByDesc failed: unknown result");
-  }
-
-  public function searchExperimentsByApplication($userName, $applicationId)
-  {
-    $this->send_searchExperimentsByApplication($userName, $applicationId);
-    return $this->recv_searchExperimentsByApplication();
-  }
-
-  public function send_searchExperimentsByApplication($userName, $applicationId)
-  {
-    $args = new \Airavata\API\Airavata_searchExperimentsByApplication_args();
-    $args->userName = $userName;
-    $args->applicationId = $applicationId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'searchExperimentsByApplication', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('searchExperimentsByApplication', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_searchExperimentsByApplication()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_searchExperimentsByApplication_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_searchExperimentsByApplication_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("searchExperimentsByApplication failed: unknown result");
-  }
-
-  public function getAllExperimentsInProject($projectId)
-  {
-    $this->send_getAllExperimentsInProject($projectId);
-    return $this->recv_getAllExperimentsInProject();
-  }
-
-  public function send_getAllExperimentsInProject($projectId)
-  {
-    $args = new \Airavata\API\Airavata_getAllExperimentsInProject_args();
-    $args->projectId = $projectId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getAllExperimentsInProject', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getAllExperimentsInProject', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getAllExperimentsInProject()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllExperimentsInProject_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getAllExperimentsInProject_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getAllExperimentsInProject failed: unknown result");
-  }
-
-  public function getAllUserExperiments($userName)
-  {
-    $this->send_getAllUserExperiments($userName);
-    return $this->recv_getAllUserExperiments();
-  }
-
-  public function send_getAllUserExperiments($userName)
-  {
-    $args = new \Airavata\API\Airavata_getAllUserExperiments_args();
-    $args->userName = $userName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getAllUserExperiments', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getAllUserExperiments', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getAllUserExperiments()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getAllUserExperiments_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getAllUserExperiments_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getAllUserExperiments failed: unknown result");
-  }
-
-  public function createExperiment(\Airavata\Model\Workspace\Experiment\Experiment $experiment)
-  {
-    $this->send_createExperiment($experiment);
-    return $this->recv_createExperiment();
-  }
-
-  public function send_createExperiment(\Airavata\Model\Workspace\Experiment\Experiment $experiment)
-  {
-    $args = new \Airavata\API\Airavata_createExperiment_args();
-    $args->experiment = $experiment;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'createExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('createExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_createExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_createExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_createExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("createExperiment failed: unknown result");
-  }
-
-  public function getExperiment($airavataExperimentId)
-  {
-    $this->send_getExperiment($airavataExperimentId);
-    return $this->recv_getExperiment();
-  }
-
-  public function send_getExperiment($airavataExperimentId)
-  {
-    $args = new \Airavata\API\Airavata_getExperiment_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getExperiment failed: unknown result");
-  }
-
-  public function updateExperiment($airavataExperimentId, \Airavata\Model\Workspace\Experiment\Experiment $experiment)
-  {
-    $this->send_updateExperiment($airavataExperimentId, $experiment);
-    $this->recv_updateExperiment();
-  }
-
-  public function send_updateExperiment($airavataExperimentId, \Airavata\Model\Workspace\Experiment\Experiment $experiment)
-  {
-    $args = new \Airavata\API\Airavata_updateExperiment_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $args->experiment = $experiment;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'updateExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('updateExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_updateExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_updateExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    return;
-  }
-
-  public function updateExperimentConfiguration($airavataExperimentId, \Airavata\Model\Workspace\Experiment\UserConfigurationData $userConfiguration)
-  {
-    $this->send_updateExperimentConfiguration($airavataExperimentId, $userConfiguration);
-    $this->recv_updateExperimentConfiguration();
-  }
-
-  public function send_updateExperimentConfiguration($airavataExperimentId, \Airavata\Model\Workspace\Experiment\UserConfigurationData $userConfiguration)
-  {
-    $args = new \Airavata\API\Airavata_updateExperimentConfiguration_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $args->userConfiguration = $userConfiguration;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'updateExperimentConfiguration', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('updateExperimentConfiguration', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_updateExperimentConfiguration()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateExperimentConfiguration_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_updateExperimentConfiguration_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    return;
-  }
-
-  public function updateResourceScheduleing($airavataExperimentId, \Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling $resourceScheduling)
-  {
-    $this->send_updateResourceScheduleing($airavataExperimentId, $resourceScheduling);
-    $this->recv_updateResourceScheduleing();
-  }
-
-  public function send_updateResourceScheduleing($airavataExperimentId, \Airavata\Model\Workspace\Experiment\ComputationalResourceScheduling $resourceScheduling)
-  {
-    $args = new \Airavata\API\Airavata_updateResourceScheduleing_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $args->resourceScheduling = $resourceScheduling;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'updateResourceScheduleing', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('updateResourceScheduleing', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_updateResourceScheduleing()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_updateResourceScheduleing_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_updateResourceScheduleing_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    return;
-  }
-
-  public function validateExperiment($airavataExperimentId)
-  {
-    $this->send_validateExperiment($airavataExperimentId);
-    return $this->recv_validateExperiment();
-  }
-
-  public function send_validateExperiment($airavataExperimentId)
-  {
-    $args = new \Airavata\API\Airavata_validateExperiment_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'validateExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('validateExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_validateExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_validateExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_validateExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("validateExperiment failed: unknown result");
-  }
-
-  public function launchExperiment($airavataExperimentId, $airavataCredStoreToken)
-  {
-    $this->send_launchExperiment($airavataExperimentId, $airavataCredStoreToken);
-    $this->recv_launchExperiment();
-  }
-
-  public function send_launchExperiment($airavataExperimentId, $airavataCredStoreToken)
-  {
-    $args = new \Airavata\API\Airavata_launchExperiment_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $args->airavataCredStoreToken = $airavataCredStoreToken;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'launchExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('launchExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_launchExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_launchExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_launchExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    if ($result->lve !== null) {
-      throw $result->lve;
-    }
-    return;
-  }
-
-  public function getExperimentStatus($airavataExperimentId)
-  {
-    $this->send_getExperimentStatus($airavataExperimentId);
-    return $this->recv_getExperimentStatus();
-  }
-
-  public function send_getExperimentStatus($airavataExperimentId)
-  {
-    $args = new \Airavata\API\Airavata_getExperimentStatus_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getExperimentStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getExperimentStatus', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getExperimentStatus()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getExperimentStatus_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getExperimentStatus_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("getExperimentStatus failed: unknown result");
-  }
-
-  public function getExperimentOutputs($airavataExperimentId)
-  {
-    $this->send_getExperimentOutputs($airavataExperimentId);
-    return $this->recv_getExperimentOutputs();
-  }
-
-  public function send_getExperimentOutputs($airavataExperimentId)
-  {
-    $args = new \Airavata\API\Airavata_getExperimentOutputs_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getExperimentOutputs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getExperimentOutputs', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getExperimentOutputs()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getExperimentOutputs_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getExperimentOutputs_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    throw new \Exception("getExperimentOutputs failed: unknown result");
-  }
-
-  public function getJobStatuses($airavataExperimentId)
-  {
-    $this->send_getJobStatuses($airavataExperimentId);
-    return $this->recv_getJobStatuses();
-  }
-
-  public function send_getJobStatuses($airavataExperimentId)
-  {
-    $args = new \Airavata\API\Airavata_getJobStatuses_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'getJobStatuses', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('getJobStatuses', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_getJobStatuses()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_getJobStatuses_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_getJobStatuses_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    throw new \Exception("getJobStatuses failed: unknown result");
-  }
-
-  public function cloneExperiment($existingExperimentID, $newExperimentName)
-  {
-    $this->send_cloneExperiment($existingExperimentID, $newExperimentName);
-    return $this->recv_cloneExperiment();
-  }
-
-  public function send_cloneExperiment($existingExperimentID, $newExperimentName)
-  {
-    $args = new \Airavata\API\Airavata_cloneExperiment_args();
-    $args->existingExperimentID = $existingExperimentID;
-    $args->newExperimentName = $newExperimentName;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'cloneExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('cloneExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_cloneExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_cloneExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_cloneExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->success !== null) {
-      return $result->success;
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    throw new \Exception("cloneExperiment failed: unknown result");
-  }
-
-  public function terminateExperiment($airavataExperimentId)
-  {
-    $this->send_terminateExperiment($airavataExperimentId);
-    $this->recv_terminateExperiment();
-  }
-
-  public function send_terminateExperiment($airavataExperimentId)
-  {
-    $args = new \Airavata\API\Airavata_terminateExperiment_args();
-    $args->airavataExperimentId = $airavataExperimentId;
-    $bin_accel = ($this->output_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_write_binary');
-    if ($bin_accel)
-    {
-      thrift_protocol_write_binary($this->output_, 'terminateExperiment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite());
-    }
-    else
-    {
-      $this->output_->writeMessageBegin('terminateExperiment', TMessageType::CALL, $this->seqid_);
-      $args->write($this->output_);
-      $this->output_->writeMessageEnd();
-      $this->output_->getTransport()->flush();
-    }
-  }
-
-  public function recv_terminateExperiment()
-  {
-    $bin_accel = ($this->input_ instanceof TBinaryProtocolAccelerated) && function_exists('thrift_protocol_read_binary');
-    if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, '\Airavata\API\Airavata_terminateExperiment_result', $this->input_->isStrictRead());
-    else
-    {
-      $rseqid = 0;
-      $fname = null;
-      $mtype = 0;
-
-      $this->input_->readMessageBegin($fname, $mtype, $rseqid);
-      if ($mtype == TMessageType::EXCEPTION) {
-        $x = new TApplicationException();
-        $x->read($this->input_);
-        $this->input_->readMessageEnd();
-        throw $x;
-      }
-      $result = new \Airavata\API\Airavata_terminateExperiment_result();
-      $result->read($this->input_);
-      $this->input_->readMessageEnd();
-    }
-    if ($result->ire !== null) {
-      throw $result->ire;
-    }
-    if ($result->enf !== null) {
-      throw $result->enf;
-    }
-    if ($result->ace !== null) {
-      throw $result->ace;
-    }
-    if ($result->ase !== null) {
-      throw $result->ase;
-    }
-    return;
-  }
-
-}
-
-// HELPER FUNCTIONS AND STRUCTURES
-
-class Airavata_getAPIVersion_args {
-  static $_TSPEC;
-
-
-  public function __construct() {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        );
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_getAPIVersion_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAPIVersion_args');
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_getAPIVersion_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_getAPIVersion_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAPIVersion_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_createProject_args {
-  static $_TSPEC;
-
-  public $project = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'project',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Project',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['project'])) {
-        $this->project = $vals['project'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_createProject_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->project = new \Airavata\Model\Workspace\Project();
-            $xfer += $this->project->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_createProject_args');
-    if ($this->project !== null) {
-      if (!is_object($this->project)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('project', TType::STRUCT, 1);
-      $xfer += $this->project->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_createProject_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRING,
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_createProject_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->success);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_createProject_result');
-    if ($this->success !== null) {
-      $xfer += $output->writeFieldBegin('success', TType::STRING, 0);
-      $xfer += $output->writeString($this->success);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_updateProject_args {
-  static $_TSPEC;
-
-  public $projectId = null;
-  public $updatedProject = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'projectId',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'updatedProject',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Project',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['projectId'])) {
-        $this->projectId = $vals['projectId'];
-      }
-      if (isset($vals['updatedProject'])) {
-        $this->updatedProject = $vals['updatedProject'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_updateProject_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->updatedProject = new \Airavata\Model\Workspace\Project();
-            $xfer += $this->updatedProject->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateProject_args');
-    if ($this->projectId !== null) {
-      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
-      $xfer += $output->writeString($this->projectId);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->updatedProject !== null) {
-      if (!is_object($this->updatedProject)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('updatedProject', TType::STRUCT, 2);
-      $xfer += $this->updatedProject->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_updateProject_result {
-  static $_TSPEC;
-
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_updateProject_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_updateProject_result');
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_getProject_args {
-  static $_TSPEC;
-
-  public $projectId = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'projectId',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['projectId'])) {
-        $this->projectId = $vals['projectId'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_getProject_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectId);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getProject_args');
-    if ($this->projectId !== null) {
-      $xfer += $output->writeFieldBegin('projectId', TType::STRING, 1);
-      $xfer += $output->writeString($this->projectId);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_getProject_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\Model\Workspace\Project',
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_getProject_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::STRUCT) {
-            $this->success = new \Airavata\Model\Workspace\Project();
-            $xfer += $this->success->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getProject_result');
-    if ($this->success !== null) {
-      if (!is_object($this->success)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0);
-      $xfer += $this->success->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_getAllUserProjects_args {
-  static $_TSPEC;
-
-  public $userName = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'userName',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['userName'])) {
-        $this->userName = $vals['userName'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_getAllUserProjects_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAllUserProjects_args');
-    if ($this->userName !== null) {
-      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
-      $xfer += $output->writeString($this->userName);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_getAllUserProjects_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Project',
-            ),
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_getAllUserProjects_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::LST) {
-            $this->success = array();
-            $_size0 = 0;
-            $_etype3 = 0;
-            $xfer += $input->readListBegin($_etype3, $_size0);
-            for ($_i4 = 0; $_i4 < $_size0; ++$_i4)
-            {
-              $elem5 = null;
-              $elem5 = new \Airavata\Model\Workspace\Project();
-              $xfer += $elem5->read($input);
-              $this->success []= $elem5;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_getAllUserProjects_result');
-    if ($this->success !== null) {
-      if (!is_array($this->success)) {
-        throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA);
-      }
-      $xfer += $output->writeFieldBegin('success', TType::LST, 0);
-      {
-        $output->writeListBegin(TType::STRUCT, count($this->success));
-        {
-          foreach ($this->success as $iter6)
-          {
-            $xfer += $iter6->write($output);
-          }
-        }
-        $output->writeListEnd();
-      }
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ire !== null) {
-      $xfer += $output->writeFieldBegin('ire', TType::STRUCT, 1);
-      $xfer += $this->ire->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ace !== null) {
-      $xfer += $output->writeFieldBegin('ace', TType::STRUCT, 2);
-      $xfer += $this->ace->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->ase !== null) {
-      $xfer += $output->writeFieldBegin('ase', TType::STRUCT, 3);
-      $xfer += $this->ase->write($output);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_searchProjectsByProjectName_args {
-  static $_TSPEC;
-
-  public $userName = null;
-  public $projectName = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        1 => array(
-          'var' => 'userName',
-          'type' => TType::STRING,
-          ),
-        2 => array(
-          'var' => 'projectName',
-          'type' => TType::STRING,
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['userName'])) {
-        $this->userName = $vals['userName'];
-      }
-      if (isset($vals['projectName'])) {
-        $this->projectName = $vals['projectName'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_searchProjectsByProjectName_args';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 1:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->userName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRING) {
-            $xfer += $input->readString($this->projectName);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        default:
-          $xfer += $input->skip($ftype);
-          break;
-      }
-      $xfer += $input->readFieldEnd();
-    }
-    $xfer += $input->readStructEnd();
-    return $xfer;
-  }
-
-  public function write($output) {
-    $xfer = 0;
-    $xfer += $output->writeStructBegin('Airavata_searchProjectsByProjectName_args');
-    if ($this->userName !== null) {
-      $xfer += $output->writeFieldBegin('userName', TType::STRING, 1);
-      $xfer += $output->writeString($this->userName);
-      $xfer += $output->writeFieldEnd();
-    }
-    if ($this->projectName !== null) {
-      $xfer += $output->writeFieldBegin('projectName', TType::STRING, 2);
-      $xfer += $output->writeString($this->projectName);
-      $xfer += $output->writeFieldEnd();
-    }
-    $xfer += $output->writeFieldStop();
-    $xfer += $output->writeStructEnd();
-    return $xfer;
-  }
-
-}
-
-class Airavata_searchProjectsByProjectName_result {
-  static $_TSPEC;
-
-  public $success = null;
-  public $ire = null;
-  public $ace = null;
-  public $ase = null;
-
-  public function __construct($vals=null) {
-    if (!isset(self::$_TSPEC)) {
-      self::$_TSPEC = array(
-        0 => array(
-          'var' => 'success',
-          'type' => TType::LST,
-          'etype' => TType::STRUCT,
-          'elem' => array(
-            'type' => TType::STRUCT,
-            'class' => '\Airavata\Model\Workspace\Project',
-            ),
-          ),
-        1 => array(
-          'var' => 'ire',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\InvalidRequestException',
-          ),
-        2 => array(
-          'var' => 'ace',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataClientException',
-          ),
-        3 => array(
-          'var' => 'ase',
-          'type' => TType::STRUCT,
-          'class' => '\Airavata\API\Error\AiravataSystemException',
-          ),
-        );
-    }
-    if (is_array($vals)) {
-      if (isset($vals['success'])) {
-        $this->success = $vals['success'];
-      }
-      if (isset($vals['ire'])) {
-        $this->ire = $vals['ire'];
-      }
-      if (isset($vals['ace'])) {
-        $this->ace = $vals['ace'];
-      }
-      if (isset($vals['ase'])) {
-        $this->ase = $vals['ase'];
-      }
-    }
-  }
-
-  public function getName() {
-    return 'Airavata_searchProjectsByProjectName_result';
-  }
-
-  public function read($input)
-  {
-    $xfer = 0;
-    $fname = null;
-    $ftype = 0;
-    $fid = 0;
-    $xfer += $input->readStructBegin($fname);
-    while (true)
-    {
-      $xfer += $input->readFieldBegin($fname, $ftype, $fid);
-      if ($ftype == TType::STOP) {
-        break;
-      }
-      switch ($fid)
-      {
-        case 0:
-          if ($ftype == TType::LST) {
-            $this->success = array();
-            $_size7 = 0;
-            $_etype10 = 0;
-            $xfer += $input->readListBegin($_etype10, $_size7);
-            for ($_i11 = 0; $_i11 < $_size7; ++$_i11)
-            {
-              $elem12 = null;
-              $elem12 = new \Airavata\Model\Workspace\Project();
-              $xfer += $elem12->read($input);
-              $this->success []= $elem12;
-            }
-            $xfer += $input->readListEnd();
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 1:
-          if ($ftype == TType::STRUCT) {
-            $this->ire = new \Airavata\API\Error\InvalidRequestException();
-            $xfer += $this->ire->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 2:
-          if ($ftype == TType::STRUCT) {
-            $this->ace = new \Airavata\API\Error\AiravataClientException();
-            $xfer += $this->ace->read($input);
-          } else {
-            $xfer += $input->skip($ftype);
-          }
-          break;
-        case 3:
-          if ($ftype == TType::STRUCT) {
-            $this->ase = new \Airavata\API\Error\AiravataSystemException();
-            $xfer += $this->ase->read($input);
-          } else 

<TRUNCATED>