You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/02/28 16:06:28 UTC

git commit: client sample to get experiments

Repository: airavata
Updated Branches:
  refs/heads/master a33b8c6e0 -> 0aecca776


client sample to get experiments


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

Branch: refs/heads/master
Commit: 0aecca776937cd154f9d11fc5bca5f4eff2ce302
Parents: a33b8c6
Author: chathuri <ch...@apache.org>
Authored: Fri Feb 28 10:06:21 2014 -0500
Committer: chathuri <ch...@apache.org>
Committed: Fri Feb 28 10:06:21 2014 -0500

----------------------------------------------------------------------
 .../airavata/client/samples/CreateLaunchExperiment.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0aecca77/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
----------------------------------------------------------------------
diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
index bfe631c..4c8739b 100644
--- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
+++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/samples/CreateLaunchExperiment.java
@@ -44,7 +44,9 @@ public class CreateLaunchExperiment {
         airavata = AiravataClientFactory.createAiravataClient(THRIFT_SERVER_HOST, THRIFT_SERVER_PORT);
         try {
             System.out.println("API version is " + airavata.GetAPIVersion());
-            createExperiment(airavata);
+            String expId = createExperiment(airavata);
+            Experiment experiment = airavata.getExperiment(expId);
+            System.out.println("retrieved exp id : " + experiment.getExperimentID());
         } catch (TException e) {
            logger.error("Error while connecting with server", e.getMessage());
         }
@@ -57,13 +59,13 @@ public class CreateLaunchExperiment {
             System.out.println("Experiment ID : " + expId);
             return expId;
         } catch (AiravataSystemException e) {
-            e.printStackTrace();
+            logger.error("Error occured while creating the experiment...", e.getMessage());
         } catch (InvalidRequestException e) {
-            e.printStackTrace();
+            logger.error("Error occured while creating the experiment...", e.getMessage());
         } catch (AiravataClientException e) {
-            e.printStackTrace();
+            logger.error("Error occured while creating the experiment...", e.getMessage());
         }catch (TException e) {
-            e.printStackTrace();
+            logger.error("Error occured while creating the experiment...", e.getMessage());
         }
         return null;
     }