airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [1/2] git commit: Update to PHP Client samples. Will commit the re-organization into features next
Date Wed, 09 Jul 2014 16:50:55 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 4244103cb -> 607dd92ba


Update to PHP Client samples. Will commit the re-organization into features next


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

Branch: refs/heads/master
Commit: b61f6a071eec2b4eababbee070d46b02e4b79e51
Parents: 417a310
Author: Suresh Marru <smarru@apache.org>
Authored: Wed Jul 9 12:50:46 2014 -0400
Committer: Suresh Marru <smarru@apache.org>
Committed: Wed Jul 9 12:50:46 2014 -0400

----------------------------------------------------------------------
 .../php-cli-samples/add-compute-resources.php   |  79 --------------
 .../airavata-client-api-tester.php              |  33 ++----
 .../php-cli-samples/cloneExperiment.php         |  40 ++------
 .../php-cli-samples/createExperiment.php        |  32 ++----
 .../getAllExperimentsInProject.php              |  36 ++-----
 .../php-cli-samples/getAllUserExperiments.php   |  36 ++-----
 .../php-cli-samples/getAllUserProjects.php      |  39 ++-----
 .../getApplicationDeployedResources.php         |  36 ++-----
 .../php-cli-samples/getApplicationInputs.php    |   7 +-
 .../php-cli-samples/getApplicationOutputs.php   |   6 +-
 .../resources/php-cli-samples/getExperiment.php |  39 ++-----
 .../php-cli-samples/getExperimentOutputs.php    |  12 ++-
 .../php-cli-samples/getExperimentStatus.php     |  37 ++-----
 .../php-cli-samples/launchExperiment.php        |  36 ++-----
 .../list-application-interfaces.php             |  77 --------------
 .../php-cli-samples/list-compute-resources.php  | 102 -------------------
 .../search_experiments_by_application.php       |  37 ++-----
 .../search_experiments_by_description.php       |  37 ++-----
 .../search_experiments_by_name.php              |  37 ++-----
 .../php-cli-samples/terminateExperiment.php     |  36 ++-----
 .../php-cli-samples/updateExperiment.php        |  48 ++-------
 .../resources/php-cli-samples/updateProject.php |  36 ++-----
 22 files changed, 147 insertions(+), 731 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/add-compute-resources.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/add-compute-resources.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/add-compute-resources.php
deleted file mode 100644
index 628f40c..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/add-compute-resources.php
+++ /dev/null
@@ -1,79 +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']);
-$transport->setSendTimeout($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/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/airavata-client-api-tester.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/airavata-client-api-tester.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/airavata-client-api-tester.php
index 04f0fce..7ebf0a2 100755
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/airavata-client-api-tester.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/airavata-client-api-tester.php
@@ -1,29 +1,12 @@
 <?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';
-
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/cloneExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/cloneExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/cloneExperiment.php
index 61a2d45..1469f4f 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/cloneExperiment.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/cloneExperiment.php
@@ -1,29 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -37,10 +20,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 if ($argc != 2)
 {
     echo 'php cloneExperiment.php <experiment_id>';
@@ -56,9 +35,6 @@ else
     echo "Created clone with ID $clone->experimentID named $clone->name \n\n";
 }
 
-
-
-
 //var_dump($experiment);
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/createExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/createExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/createExperiment.php
index da8b6d4..f87258c 100755
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/createExperiment.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/createExperiment.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllExperimentsInProject.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllExperimentsInProject.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllExperimentsInProject.php
index 10a1ec4..07cd96d 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllExperimentsInProject.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllExperimentsInProject.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,10 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 try
 {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserExperiments.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserExperiments.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserExperiments.php
index d0d3afc..4423263 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserExperiments.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserExperiments.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,10 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 try
 {
     if ($argc != 2)

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserProjects.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserProjects.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserProjects.php
index 6da7521..c8c43da 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserProjects.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getAllUserProjects.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,13 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
-
-
 try
 {
     if ($argc != 2)

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationDeployedResources.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationDeployedResources.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationDeployedResources.php
index 5de6e52..ccad572 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationDeployedResources.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationDeployedResources.php
@@ -1,27 +1,13 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -35,12 +21,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
-
 if ($argc != 2)
 {
     exit("php getApplicationDeployedResources.php <appModuleID> \n");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationInputs.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationInputs.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationInputs.php
index b490d7b..433dcb0 100755
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationInputs.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationInputs.php
@@ -12,6 +12,7 @@ use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
 use Airavata\API\Error\InvalidRequestException;
 use Thrift\Exception\TTransportException;
+use Airavata\Model\AppCatalog\AppInterface\DataType;
 
 try
 {
@@ -27,7 +28,11 @@ try
         $appInputs = $airavataclient->getApplicationInputs($appInterfaceId);
 
         if ($appInputs) {
-            var_dump($appInputs);
+            foreach ($appInputs as $appInput) {
+                var_dump($appInput);
+                $inputType = DataType::$__names[$appInput->type];
+                echo "\n Application Input Name: $appInput->name \t Input Type $inputType \n";
+            }
         } else {
             echo "\n Failed to fetch application interface Inputs. \n";
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationOutputs.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationOutputs.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationOutputs.php
index b8b569f..fd8e83f 100755
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationOutputs.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getApplicationOutputs.php
@@ -12,6 +12,7 @@ use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
 use Airavata\API\Error\InvalidRequestException;
 use Thrift\Exception\TTransportException;
+use Airavata\Model\AppCatalog\AppInterface\DataType;
 
 try
 {
@@ -27,7 +28,10 @@ try
         $appOutputs = $airavataclient->getApplicationOutputs($appInterfaceId);
 
         if ($appOutputs) {
-            var_dump($appOutputs);
+            foreach ($appOutputs as $appOutput) {
+                $outputType = DataType::$__names[$appOutput->type];
+                echo "\n Application Output Name: $appOutput->name \t Output Type $outputType \n";
+            }
         } else {
             echo "\n Failed to fetch application interface Outputs. \n";
         }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperiment.php
index b809927..24371bd 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperiment.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperiment.php
@@ -1,27 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -35,10 +20,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 
 if (count($argv) < 2) {
     exit("Please provide an experimentID. \n");
@@ -52,10 +33,6 @@ $experiment = get_experiment($expId);
 var_dump($experiment);
 
 
-
-
-
-
 $transport->close();
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentOutputs.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentOutputs.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentOutputs.php
index b822092..d8bc0df 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentOutputs.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentOutputs.php
@@ -1,4 +1,12 @@
 <?php
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -6,10 +14,6 @@ use Airavata\API\Error\ExperimentNotFoundException;
 use Airavata\API\Error\InvalidRequestException;
 use Thrift\Exception\TTransportException;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 if ($argc != 2)
 {
     exit("php getExperimentOutputs.php <experiment_id> \n");

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentStatus.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentStatus.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentStatus.php
index 2ef5afa..babda01 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentStatus.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/getExperimentStatus.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -35,11 +19,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
 if (count($argv) < 2) {
     exit("Please provide an experimentID. \n");
 }

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/launchExperiment.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/launchExperiment.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/launchExperiment.php
index d248064..5b5b8fa 100755
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/launchExperiment.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/launchExperiment.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -37,10 +21,6 @@ use Airavata\API\AiravataClient;
 use Airavata\Model\Workspace\Project;
 use Airavata\Model\Workspace\Experiment\Experiment;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 try
 {
    if (count($argv) < 2) {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-application-interfaces.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-application-interfaces.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-application-interfaces.php
deleted file mode 100644
index 6d308fc..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-application-interfaces.php
+++ /dev/null
@@ -1,77 +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']);
-$transport->setSendTimeout($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/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-compute-resources.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-compute-resources.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-compute-resources.php
deleted file mode 100644
index c381551..0000000
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/list-compute-resources.php
+++ /dev/null
@@ -1,102 +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']);
-$transport->setSendTimeout($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/b61f6a07/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_application.php
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_application.php b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_application.php
index 3d4419e..8d4d498 100644
--- a/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_application.php
+++ b/airavata-api/airavata-client-sdks/airavata-php-sdk/src/main/resources/php-cli-samples/search_experiments_by_application.php
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,11 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
 try
 {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/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
index 9951aa6..26b68b5 100644
--- 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
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,11 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
 try
 {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/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
index 932cfc9..20499ac 100644
--- 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
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,11 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
 try
 {
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/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
index 5f81875..5f83029 100644
--- 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
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -36,10 +20,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 
 if ($argc != 2)
 {

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/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
index af806c2..7a39418 100644
--- 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
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -36,13 +20,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
-
-
-
 if ($argc != 2)
 {
     echo 'php updateExperiment.php <experiment_id>';
@@ -52,15 +29,6 @@ else
     update_experiment($argv[1]);
 }
 
-
-
-
-
-
-
-
-
-
 $transport->close();
 
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/b61f6a07/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
index ea9f5c5..1b9847a 100644
--- 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
@@ -1,28 +1,12 @@
 <?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';
+/**
+ * Bundle all thrift and Airavata stubs into a include file. This is simple but not so elegant way.
+ *  Contributions welcome to improve writing PHP Client Samples.
+ *
+ */
+include 'getAiravataClient.php';
+global $airavataclient;
+global $transport;
 
 use Airavata\API\Error\AiravataClientException;
 use Airavata\API\Error\AiravataSystemException;
@@ -33,10 +17,6 @@ use Thrift\Transport\TBufferedTransport;
 use Thrift\Transport\TSocket;
 use Airavata\API\AiravataClient;
 
-include 'getAiravataClient.php';
-global $airavataclient;
-global $transport;
-
 try 
 {
 		  if($argc != 3) 


Mime
View raw message