airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [2/3] Moving samples into SDK directory for packaging - AIRAVATA-1274
Date Tue, 01 Jul 2014 10:29:04 GMT
http://git-wip-us.apache.org/repos/asf/airavata/blob/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_description.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_description.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_description.php
new file mode 100644
index 0000000..631ad15
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_description.php
@@ -0,0 +1,79 @@
+<?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/Types.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
+{
+
+    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/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_name.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_name.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_name.php
new file mode 100644
index 0000000..d71a166
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_name.php
@@ -0,0 +1,79 @@
+<?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/Types.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
+{
+
+    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/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/terminateExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/terminateExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/terminateExperiment.php
new file mode 100644
index 0000000..b701abf
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/terminateExperiment.php
@@ -0,0 +1,101 @@
+<?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/Types.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\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;
+
+$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/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
new file mode 100644
index 0000000..e3aefd3
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateExperiment.php
@@ -0,0 +1,155 @@
+<?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/Types.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\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;
+
+$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/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateProject.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateProject.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateProject.php
new file mode 100644
index 0000000..f77ab8c
--- /dev/null
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/updateProject.php
@@ -0,0 +1,75 @@
+<?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/Types.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 
+{
+		  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();
+
+?>
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/GetAiravataVersion.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/GetAiravataVersion.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/GetAiravataVersion.php
deleted file mode 100644
index c1cd799..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/GetAiravataVersion.php
+++ /dev/null
@@ -1,18 +0,0 @@
-<?php
-
-//use Airavata\Client;
-
-ini_set("include_path", ini_get("include_path") . PATH_SEPARATOR . "../lib" . PATH_SEPARATOR .
-    "../lib/Thrift" . PATH_SEPARATOR . "../lib/Airavata/" . PATH_SEPARATOR);
-require_once 'autoload.php';
-
-require_once 'AiravataClientFactory.php';
-
-use Airavata\Client\AiravataClientFactory;
-
-$airavataClientFactory = new AiravataClientFactory(array('airavataServerHost' => "gw111.iu.xsede.org", 'airavataServerPort' => "8930"));
-
-$airavata = $airavataClientFactory->getAiravataClient();
-
-echo "Airavata Server Version is: " . $airavata->GetAPIVersion() . "\n";
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/add-compute-resources.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/add-compute-resources.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/add-compute-resources.php
deleted file mode 100644
index 6f5de40..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/add-compute-resources.php
+++ /dev/null
@@ -1,75 +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;
-
-//$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TSocket('localhost', 8931);
-$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="stampede-host";
-$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();
-?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/airavata-client-sample.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/airavata-client-sample.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/airavata-client-sample.php
deleted file mode 100644
index 4953cee..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/airavata-client-sample.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/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\Model\Workspace\Experiment\ComputationalResourceScheduling;
-use Airavata\Model\Workspace\Experiment\DataObjectType;
-use Airavata\Model\Workspace\Experiment\UserConfigurationData;
-use Thrift\Protocol\TBinaryProtocol;
-use Thrift\Transport\TSocket;
-use Airavata\API\AiravataClient;
-use Airavata\Model\Workspace\Experiment\Experiment;
-
-$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$protocol = new TBinaryProtocol($transport);
-
-$airavataclient = new AiravataClient($protocol);
-$transport->open();
-
-echo "Airavata Server Version is: " . $airavataclient->GetAPIVersion();
-
-echo "<br><br>"."Creating New Experiment.... "."<br>";
-
-//Create a Experiment
-$experiment = new Experiment();
-$experiment->name = "PHPTest";
-$experiment->description = "Testingfromphp";
-$experiment->userName = "admin";
-$experiment->projectID = "project1";
-$experiment->applicationId = "US3AppTrestles";
-
-$experimentInputs = new DataObjectType();
-$experimentInputs->key = "input";
-$experimentInputs->value = "file:///home/airavata/input/hpcinput.tar";
-$experiment->experimentInputs = array($experimentInputs);
-
-$scheduling = new ComputationalResourceScheduling();
-$scheduling->resourceHostId = "gsissh-trestles";
-
-$userConfigData = new UserConfigurationData();
-$userConfigData->computationalResourceScheduling = $scheduling;
-$userConfigData->overrideManualScheduledParams = False;
-$userConfigData->airavataAutoSchedule = False;
-$experiment->userConfigurationData = $userConfigData;
-
-try {
-
-    $expId = $airavataclient->createExperiment($experiment);
-    echo "Experiment Id created is: " . $expId;
-
-    echo "<br><br>"."Launching Experiment.... "."<br>";
-    $airavataclient->launchExperiment($expId, "airavataToken");
-    echo "....Launched Experiment ".$expId."<br>";
-
-    echo "<br><br>"."Checking Experiment Status.... "."<br>";
-    $experimentStatus = $airavataclient->getExperimentStatus($expId);
-    echo "Experiment Status: "."<br>";
-    echo "State: ".$experimentStatus->ExperimentState ."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".
-        "Time of last state change:". $experimentStatus->timeOfStateChange;
-
-    echo "<br><br>"."Checking Job Status.... "."<br>";
-    $jobStatus = $airavataclient->getJobStatuses($expId);
-    echo "Job Status: "."<br>";
-    echo "State: "."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".
-        "Time of last state change:";
-
-} catch (TException $texp) {
-    print 'Exception: ' . $texp->getMessage()."\n";
-} catch (AiravataSystemException $ase) {
-    print 'Airavata System Exception: ' . $ase->getMessage()."\n";
-}
-$transport->close();
-
-?>
-

http://git-wip-us.apache.org/repos/asf/airavata/blob/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-application-interfaces.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-application-interfaces.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-application-interfaces.php
deleted file mode 100644
index 473e033..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-application-interfaces.php
+++ /dev/null
@@ -1,73 +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;
-
-//$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TSocket('localhost', 8931);
-$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"."Deployments : ".count($app_interface->applicationDeployments)."\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/4d338df2/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-compute-resources.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-compute-resources.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-compute-resources.php
deleted file mode 100644
index 4ff8a6f..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/samples/list-compute-resources.php
+++ /dev/null
@@ -1,97 +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;
-
-//$transport = new TSocket('gw111.iu.xsede.org', 8930);
-$transport = new TSocket('localhost', 8931);
-$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"."Job Submission Protocol Data : ".count($compute_resource->jobSubmissionProtocols)."\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"."Data Movement Data : ".count($compute_resource->dataMovementProtocols)."\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/4d338df2/samples/php-cli-samples/GetAPIVersion.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/GetAPIVersion.php b/samples/php-cli-samples/GetAPIVersion.php
deleted file mode 100644
index 7a2e82e..0000000
--- a/samples/php-cli-samples/GetAPIVersion.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?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/4d338df2/samples/php-cli-samples/README
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/README b/samples/php-cli-samples/README
deleted file mode 100644
index 8684750..0000000
--- a/samples/php-cli-samples/README
+++ /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/4d338df2/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
deleted file mode 100644
index 0413903..0000000
--- a/samples/php-cli-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/4d338df2/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
deleted file mode 100755
index 17d4b80..0000000
--- a/samples/php-cli-samples/airavata-client-api-tester.php
+++ /dev/null
@@ -1,230 +0,0 @@
-<?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/Types.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\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;
-
-/* 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/4d338df2/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
deleted file mode 100644
index 4e24eaa..0000000
--- a/samples/php-cli-samples/airavata-client-properties.ini
+++ /dev/null
@@ -1,24 +0,0 @@
-; 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 = "localhost"
-
-; 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/4d338df2/samples/php-cli-samples/cloneExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/cloneExperiment.php b/samples/php-cli-samples/cloneExperiment.php
deleted file mode 100644
index 35cd70c..0000000
--- a/samples/php-cli-samples/cloneExperiment.php
+++ /dev/null
@@ -1,153 +0,0 @@
-<?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';
-
-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;
-
-$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/4d338df2/samples/php-cli-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/createExperiment.php b/samples/php-cli-samples/createExperiment.php
deleted file mode 100755
index e37c463..0000000
--- a/samples/php-cli-samples/createExperiment.php
+++ /dev/null
@@ -1,157 +0,0 @@
-<?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/Types.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;
-
-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;
-
-$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/4d338df2/samples/php-cli-samples/createProject.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/createProject.php b/samples/php-cli-samples/createProject.php
deleted file mode 100755
index 6e33199..0000000
--- a/samples/php-cli-samples/createProject.php
+++ /dev/null
@@ -1,89 +0,0 @@
-<?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/Types.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;
-use Airavata\Model\Workspace\Project;
-
-$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/4d338df2/samples/php-cli-samples/getAllExperimentsInProject.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAllExperimentsInProject.php b/samples/php-cli-samples/getAllExperimentsInProject.php
deleted file mode 100644
index 0de2d2c..0000000
--- a/samples/php-cli-samples/getAllExperimentsInProject.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?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/Types.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
-{
-
-   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/4d338df2/samples/php-cli-samples/getAllUserExperiments.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAllUserExperiments.php b/samples/php-cli-samples/getAllUserExperiments.php
deleted file mode 100644
index f1877a0..0000000
--- a/samples/php-cli-samples/getAllUserExperiments.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?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/Types.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
-{
-    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/4d338df2/samples/php-cli-samples/getAllUserProjects.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAllUserProjects.php b/samples/php-cli-samples/getAllUserProjects.php
deleted file mode 100644
index 274f5d9..0000000
--- a/samples/php-cli-samples/getAllUserProjects.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?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/Types.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
-{
-    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/4d338df2/samples/php-cli-samples/getAppModule.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getAppModule.php b/samples/php-cli-samples/getAppModule.php
deleted file mode 100644
index 1324b7d..0000000
--- a/samples/php-cli-samples/getAppModule.php
+++ /dev/null
@@ -1,95 +0,0 @@
-<?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'] . 'API/Error/Types.php';
-require_once $GLOBALS['AIRAVATA_ROOT'] . 'Model/AppCatalog/AppDeployment/Types.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;
-
-$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 appModuleID. \n");
-}
-
-$appModuleId = $argv[1];
-
-$applicationModule = get_appModule($appModuleId);
-
-var_dump($applicationModule);
-
-$transport->close();
-
-/**
- * Get the appModule with the given ID
- * @param $appModuleId
- * @return null
- */
-function get_appModule($appModuleId)
-{
-    global $airavataclient;
-
-    try
-    {
-        return $airavataclient->getAppicationModule($appModuleId);
-    }
-    catch (InvalidRequestException $ire)
-    {
-        echo 'InvalidRequestException!<br><br>' . $ire->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/4d338df2/samples/php-cli-samples/getExperiment.php
----------------------------------------------------------------------
diff --git a/samples/php-cli-samples/getExperiment.php b/samples/php-cli-samples/getExperiment.php
deleted file mode 100644
index 2872a61..0000000
--- a/samples/php-cli-samples/getExperiment.php
+++ /dev/null
@@ -1,106 +0,0 @@
-<?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\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;
-
-$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();
-    }
-
-}
-
-?>
-


Mime
View raw message