Fixed the disribution and tested the SSH protocol communication to different machines. AIRAVATA-1585 AIRAVATA-1595
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/9a6eaaae Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/9a6eaaae Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/9a6eaaae Branch: refs/heads/queue-gfac-rabbitmq Commit: 9a6eaaae2abc2d5e687bbda5a393f1dd519d54f1 Parents: 3504410 Author: raminder <[email protected]> Authored: Tue Feb 24 22:28:53 2015 -0500 Committer: raminder <[email protected]> Committed: Tue Feb 24 22:28:53 2015 -0500 ---------------------------------------------------------------------- .../client/samples/CreateLaunchExperiment.java | 205 +- .../tools/RegisterSampleApplications.java | 31 +- modules/commons/utils/pom.xml | 4 +- .../airavata/common/utils/WSConstants.java | 10 +- .../apache/airavata/common/utils/WSDLUtil.java | 764 ++--- .../apache/airavata/common/utils/XMLUtil.java | 34 +- .../credential-store/pom.xml | 5 + modules/distribution/server/pom.xml | 64 +- modules/gfac/gfac-bes/pom.xml | 5 + modules/gfac/gfac-gsissh/pom.xml | 10 - .../handler/GSISSHDirectorySetupHandler.java | 7 +- modules/gfac/gfac-ssh/pom.xml | 10 - .../ssh/handler/SSHDirectorySetupHandler.java | 7 +- .../airavata/gfac/ssh/util/GFACSSHUtils.java | 45 +- modules/workflow-model/workflow-engine/pom.xml | 5 +- .../engine/gfac/GFacRegistryClient.java | 186 +- .../workflow/engine/gfac/SimpleWSClient.java | 166 +- .../interpretor/SystemComponentInvoker.java | 86 +- .../engine/interpretor/WorkflowInterpreter.java | 24 +- .../engine/invoker/AsynchronousInvoker.java | 98 +- .../workflow/engine/invoker/DynamicInvoker.java | 48 +- .../workflow/engine/invoker/Invoker.java | 84 +- .../workflow/engine/invoker/SimpleInvoker.java | 411 +-- .../workflow/engine/util/InterpreterUtil.java | 112 +- .../workflow/engine/util/XBayaUtil.java | 94 +- .../engine/workflow/proxy/WorkflowContext.java | 4 +- .../workflow-model-component/pom.xml | 7 +- .../workflow-model/workflow-model-core/pom.xml | 8 +- .../component/system/SubWorkflowComponent.java | 4 +- .../component/url/URLComponentRegistry.java | 12 +- .../component/ws/WSComponentApplication.java | 2 +- .../model/component/ws/WSComponentFactory.java | 8 +- .../model/component/ws/WSComponentRegistry.java | 32 +- .../model/component/ws/WorkflowComponent.java | 108 +- .../airavata/workflow/model/gpel/DSCUtil.java | 140 +- .../workflow/model/gpel/script/BPELScript.java | 1276 ++++---- .../model/gpel/script/WorkflowWSDL.java | 528 ++-- .../model/graph/system/StreamSourceNode.java | 7 +- .../workflow/model/ode/ODEBPELTransformer.java | 1260 ++++---- .../airavata/workflow/model/ode/ODEClient.java | 200 +- .../model/ode/ODEDeploymentDescriptor.java | 368 +-- .../workflow/model/ode/ODEWSDLTransformer.java | 872 +++--- .../workflow/model/ode/WSDLCleaner.java | 196 +- .../workflow/model/wf/TridentTransformer.java | 50 +- .../airavata/workflow/model/wf/Workflow.java | 542 ++-- modules/xbaya-gui/pom.xml | 5 + .../xbaya/core/generators/BPELFiler.java | 38 +- .../xbaya/core/generators/ODEScriptFiler.java | 68 +- .../xbaya/invoker/factory/InvokerFactory.java | 16 +- .../graph/dynamic/DynamicNodeWindow.java | 72 +- tools/gsissh/pom.xml | 8 +- .../java/com/jcraft/jsch/ExtendedSession.java | 2 - .../illinois/ncsa/BCGSS/BCGSSContextImpl.java | 2894 +++++++++--------- .../illinois/ncsa/BCGSS/CircularByteBuffer.java | 1648 +++++----- .../ncsa/BCGSS/GlobusTlsCipherFactory.java | 126 +- .../illinois/ncsa/BCGSS/GlobusTlsClient.java | 494 +-- .../edu/illinois/ncsa/BCGSS/TlsHandlerUtil.java | 564 ++-- .../apache/airavata/gsi/ssh/GSSContextX509.java | 32 +- .../gsi/ssh/impl/GSISSHAbstractCluster.java | 163 +- .../apache/airavata/gsi/ssh/util/SSHUtils.java | 4 +- .../impl/DefaultSSHApiTestWithMyProxyAuth.java | 15 +- .../gsi/ssh/impl/VanilaTestWithSSHAuth.java | 46 +- 62 files changed, 7221 insertions(+), 7113 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/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 9f4cd12..a5bc81c 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 @@ -47,10 +47,10 @@ import java.util.*; public class CreateLaunchExperiment { //FIXME: Read from a config file -// public static final String THRIFT_SERVER_HOST = "localhost"; -// public static final int THRIFT_SERVER_PORT = 8930; - public static final String THRIFT_SERVER_HOST = "gw111.iu.xsede.org"; - public static final int THRIFT_SERVER_PORT = 9930; + public static final String THRIFT_SERVER_HOST = "localhost"; + public static final int THRIFT_SERVER_PORT = 8930; +// public static final String THRIFT_SERVER_HOST = "gw111.iu.xsede.org"; +// public static final int THRIFT_SERVER_PORT = 9930; private final static Logger logger = LoggerFactory.getLogger(CreateLaunchExperiment.class); private static final String DEFAULT_USER = "default.registry.user"; @@ -60,7 +60,7 @@ public class CreateLaunchExperiment { private static String echoAppId = "Echo_2e539083-665d-40fd-aaa2-4a751028326b"; private static String mpiAppId = "HelloMPI_720e159f-198f-4daa-96ca-9f5eafee92c9"; private static String wrfAppId = "WRF_7ad5da38-c08b-417c-a9ea-da9298839762"; - private static String amberAppId = "Amber_42124128-628b-484c-829d-aff8b584eb00"; + private static String amberAppId = "Amber_9e4f28b6-7a5d-4fe1-b07f-2053f8f0deb3"; private static String gromacsAppId = "GROMACS_05622038-9edd-4cb1-824e-0b7cb993364b"; private static String espressoAppId = "ESPRESSO_10cc2820-5d0b-4c63-9546-8a8b595593c1"; private static String lammpsAppId = "LAMMPS_10893eb5-3840-438c-8446-d26c7ecb001f"; @@ -92,19 +92,19 @@ public class CreateLaunchExperiment { public static void createAndLaunchExp() throws TException { // final String expId = createEchoExperimentForFSD(airavataClient); try { - for (int i = 0; i < 300; i++) { + for (int i = 0; i < 1; i++) { // final String expId = createExperimentForSSHHost(airavata); // final String expId = createEchoExperimentForFSD(airavataClient); // final String expId = createMPIExperimentForFSD(airavataClient); // final String expId = createEchoExperimentForStampede(airavataClient); - final String expId = createEchoExperimentForTrestles(airavataClient); +// final String expId = createEchoExperimentForTrestles(airavataClient); // final String expId = createExperimentEchoForLocalHost(airavataClient); // final String expId = createExperimentWRFTrestles(airavataClient); // final String expId = createExperimentForBR2(airavataClient); // final String expId = createExperimentForBR2Amber(airavataClient); // final String expId = createExperimentWRFStampede(airavataClient); // final String expId = createExperimentForStampedeAmber(airavataClient); -// final String expId = createExperimentForTrestlesAmber(airavataClient); + final String expId = createExperimentForTrestlesAmber(airavataClient); // final String expId = createExperimentGROMACSStampede(airavataClient); // final String expId = createExperimentESPRESSOStampede(airavataClient); // final String expId = createExperimentLAMMPSStampede(airavataClient); @@ -1295,47 +1295,28 @@ public class CreateLaunchExperiment { public static String createExperimentForBR2Amber(Airavata.Client client) throws TException { try { - List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>(); - InputDataObjectType input = new InputDataObjectType(); - input.setName("Heat_Restart_File"); - input.setType(DataType.URI); - input.setValue("/Users/lahirugunathilake/Downloads/02_Heat.rst"); - exInputs.add(input); - - InputDataObjectType input1 = new InputDataObjectType(); - input1.setName("Production_Control_File"); - input1.setType(DataType.URI); - input1.setValue("/Users/lahirugunathilake/Downloads/03_Prod.in"); - exInputs.add(input1); - - InputDataObjectType input2 = new InputDataObjectType(); - input2.setName("Parameter_Topology_File"); - input2.setType(DataType.URI); - input2.setValue("/Users/lahirugunathilake/Downloads/prmtop"); - exInputs.add(input2); - - List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>(); - OutputDataObjectType output = new OutputDataObjectType(); - output.setName("AMBER_Execution_Summary"); - output.setType(DataType.URI); - output.setValue(""); - exOut.add(output); + List<InputDataObjectType> exInputs = client.getApplicationInputs(amberAppId); +// for (InputDataObjectType inputDataObjectType : exInputs) { +// if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) { +// inputDataObjectType.setValue("/Users/raminder/Documents/Sample/Amber/02_Heat.rst"); +// } else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) { +// inputDataObjectType.setValue("/Users/raminder/Documents/Sample/Amber/03_Prod.in"); +// } else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) { +// inputDataObjectType.setValue("/Users/raminder/Documents/Sample/Amber/prmtop"); +// } +// +// } + for (InputDataObjectType inputDataObjectType : exInputs) { + if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/02_Heat.rst"); + } else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/03_Prod.in"); + } else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/prmtop"); + } + } - OutputDataObjectType output1 = new OutputDataObjectType(); - output1.setName("AMBER_Execution_log"); - output1.setType(DataType.URI); - output1.setValue(""); - exOut.add(output1); - OutputDataObjectType output2 = new OutputDataObjectType(); - output2.setName("AMBER_Trajectory_file"); - output2.setType(DataType.URI); - output2.setValue(""); - exOut.add(output2); - OutputDataObjectType output3 = new OutputDataObjectType(); - output3.setName("AMBER_Restart_file"); - output3.setType(DataType.URI); - output3.setValue(""); - exOut.add(output3); + List<OutputDataObjectType> exOut = client.getApplicationOutputs(amberAppId); Project project = ProjectModelUtil.createProject("default", "admin", "test project"); String projectId = client.createProject(project); @@ -1378,47 +1359,29 @@ public class CreateLaunchExperiment { public static String createExperimentForStampedeAmber(Airavata.Client client) throws TException { try { - List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>(); - InputDataObjectType input = new InputDataObjectType(); - input.setName("Heat_Restart_File"); - input.setType(DataType.URI); - input.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AMBER_FILES/02_Heat.rst"); - exInputs.add(input); - - InputDataObjectType input1 = new InputDataObjectType(); - input1.setName("Production_Control_File"); - input1.setType(DataType.URI); - input1.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AMBER_FILES/03_Prod.in"); - exInputs.add(input1); - - InputDataObjectType input2 = new InputDataObjectType(); - input2.setName("Parameter_Topology_File"); - input2.setType(DataType.URI); - input2.setValue("/Users/shameera/Downloads/PHP-Gateway-Scripts/appScripts/AMBER_FILES/prmtop"); - exInputs.add(input2); + List<InputDataObjectType> exInputs = client.getApplicationInputs(amberAppId); +// for (InputDataObjectType inputDataObjectType : exInputs) { +// if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) { +// inputDataObjectType.setValue("/Users/raminder/Documents/Sample/Amber/02_Heat.rst"); +// } else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) { +// inputDataObjectType.setValue("/Users/raminder/Documents/Sample/Amber/03_Prod.in"); +// } else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) { +// inputDataObjectType.setValue("/Users/raminder/Documents/Sample/Amber/prmtop"); +// } +// +// } + for (InputDataObjectType inputDataObjectType : exInputs) { + if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/02_Heat.rst"); + } else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/03_Prod.in"); + } else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/prmtop"); + } + } - List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>(); - OutputDataObjectType output = new OutputDataObjectType(); - output.setName("AMBER_Execution_Summary"); - output.setType(DataType.URI); - output.setValue(""); - exOut.add(output); + List<OutputDataObjectType> exOut = client.getApplicationOutputs(amberAppId); - OutputDataObjectType output1 = new OutputDataObjectType(); - output1.setName("AMBER_Execution_Summary"); - output1.setType(DataType.URI); - output1.setValue(""); - exOut.add(output1); - OutputDataObjectType output2 = new OutputDataObjectType(); - output2.setName("AMBER_Trajectory_file"); - output2.setType(DataType.URI); - output2.setValue(""); - exOut.add(output2); - OutputDataObjectType output3 = new OutputDataObjectType(); - output3.setName("AMBER_Restart_file"); - output3.setType(DataType.URI); - output3.setValue(""); - exOut.add(output3); Project project = ProjectModelUtil.createProject("default", "admin", "test project"); String projectId = client.createProject(project); @@ -1473,69 +1436,15 @@ public class CreateLaunchExperiment { // // } for (InputDataObjectType inputDataObjectType : exInputs) { - if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) { - inputDataObjectType.setValue("/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/02_Heat.rst"); - } else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) { - inputDataObjectType.setValue("/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/03_Prod.in"); - } else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) { - inputDataObjectType.setValue("/Users/chathuri/dev/airavata/source/php/inputs/AMBER_FILES/prmtop"); - } - + if (inputDataObjectType.getName().equalsIgnoreCase("Heat_Restart_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/02_Heat.rst"); + } else if (inputDataObjectType.getName().equalsIgnoreCase("Production_Control_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/03_Prod.in"); + } else if (inputDataObjectType.getName().equalsIgnoreCase("Parameter_Topology_File")) { + inputDataObjectType.setValue("file://[email protected]:/var/www/experimentData/admin101a290e6330f15a91349159553ae8b6bb1/prmtop"); + } } List<OutputDataObjectType> exOut = client.getApplicationOutputs(amberAppId); -// List<InputDataObjectType> exInputs = new ArrayList<InputDataObjectType>(); -// InputDataObjectType input = new InputDataObjectType(); -// input.setName("Heat_Restart_File"); -// input.setType(DataType.URI); -// input.setValue("/Users/raminder/Documents/Sample/Amber/02_Heat.rst"); -// exInputs.add(input); -// InputDataObjectType input1 = new InputDataObjectType(); -// input1.setName("Production_Control_File"); -// input1.setType(DataType.URI); -// input1.setValue("/Users/raminder/Documents/Sample/Amber/03_Prod.in"); -// exInputs.add(input1); -// -// InputDataObjectType input2 = new InputDataObjectType(); -// input2.setName("Parameter_Topology_File"); -// input2.setType(DataType.URI); -// input2.setValue("/Users/raminder/Documents/Sample/Amber/prmtop"); -// exInputs.add(input2); - -// List<OutputDataObjectType> exOut = new ArrayList<OutputDataObjectType>(); -// OutputDataObjectType output = new OutputDataObjectType(); -// output.setName("AMBER_Execution_Summary"); -// output.setType(DataType.URI); -// output.setValue("03_Prod.info"); -// exOut.add(output); -// -// OutputDataObjectType output1 = new OutputDataObjectType(); -// output1.setName("AMBER_Execution_log"); -// output1.setType(DataType.URI); -// output1.setValue("03_Prod.out"); -// exOut.add(output1); -// OutputDataObjectType output2 = new OutputDataObjectType(); -// output2.setName("AMBER_Trajectory_file"); -// output2.setType(DataType.URI); -// output2.setValue("03_Prod.mdcrd"); -// exOut.add(output2); -// OutputDataObjectType output3 = new OutputDataObjectType(); -// output3.setName("AMBER_Restart_file"); -// output3.setType(DataType.URI); -// output3.setValue("03_Prod.rst"); -// exOut.add(output3); -// -// OutputDataObjectType output4 = new OutputDataObjectType(); -// output4.setName("STDERR"); -// output4.setType(DataType.STDERR); -// output4.setValue(""); -// exOut.add(output4); -// -// OutputDataObjectType output5 = new OutputDataObjectType(); -// output5.setName("STDOUT"); -// output5.setType(DataType.STDOUT); -// output5.setValue(""); -// exOut.add(output5); - Project project = ProjectModelUtil.createProject("default", "admin", "test project"); String projectId = client.createProject(project); http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java ---------------------------------------------------------------------- diff --git a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java index 57f7512..acc5b7c 100644 --- a/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java +++ b/airavata-api/airavata-client-sdks/java-client-samples/src/main/java/org/apache/airavata/client/tools/RegisterSampleApplications.java @@ -188,12 +188,12 @@ public class RegisterSampleApplications { //Register Stampede stampedeResourceId = registerComputeHost("stampede.tacc.xsede.org", "TACC Stampede Cluster", - ResourceJobManagerType.SLURM, "push", "/usr/bin", SecurityProtocol.GSI, 2222, null); + ResourceJobManagerType.SLURM, "push", "/usr/bin", SecurityProtocol.SSH_KEYS, 22, null); System.out.println("Stampede Resource Id is " + stampedeResourceId); //Register Trestles trestlesResourceId = registerComputeHost("trestles.sdsc.xsede.org", "SDSC Trestles Cluster", - ResourceJobManagerType.PBS, "push", "/opt/torque/bin/", SecurityProtocol.GSI, 22, null); + ResourceJobManagerType.PBS, "push", "/opt/torque/bin/", SecurityProtocol.SSH_KEYS, 22, null); System.out.println("Trestles Resource Id is " + trestlesResourceId); //Register BigRedII @@ -547,17 +547,20 @@ public class RegisterSampleApplications { applicationInputs.add(input2); applicationInputs.add(input3); - OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Execution_Summary",null,DataType.URI, true, true); - OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Execution_log",null,DataType.URI, true, true); - OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Trajectory_file",null,DataType.URI, true, true); - OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Restart_file",null,DataType.URI, true, true); - + OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Execution_Summary","03_Prod.info",DataType.URI, true, true); + OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Execution_log","03_Prod.out",DataType.URI, true, true); + OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Trajectory_file","03_Prod.mdcrd",DataType.URI, true, true); + OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("AMBER_Restart_file","03_Prod.rst",DataType.URI, true, true); + OutputDataObjectType output5 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true); + OutputDataObjectType output6 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true); List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); applicationOutputs.add(output2); applicationOutputs.add(output3); applicationOutputs.add(output4); - + applicationOutputs.add(output5); + applicationOutputs.add(output6); + amberInterfaceId = airavataClient.registerApplicationInterface( RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(amberName, amberDescription, appModules, applicationInputs, applicationOutputs)); @@ -624,10 +627,14 @@ public class RegisterSampleApplications { OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("ESPRESSO_Execution_Log",null,DataType.URI, true, true); OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("ESPRESSO_WFC_Binary_file",null,DataType.URI, true, true); - + OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true); + OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true); + List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); applicationOutputs.add(output2); + applicationOutputs.add(output3); + applicationOutputs.add(output4); espressoInterfaceId = airavataClient.registerApplicationInterface( RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(espressoName, espressoDescription, @@ -659,11 +666,15 @@ public class RegisterSampleApplications { OutputDataObjectType output1 = RegisterSampleApplicationsUtils.createAppOutput("GROMACS_Execution_Log",null,DataType.URI, true, true); OutputDataObjectType output2 = RegisterSampleApplicationsUtils.createAppOutput("Full_Precision_Trajectory_file",null,DataType.URI, true, true); OutputDataObjectType output3 = RegisterSampleApplicationsUtils.createAppOutput("Portable_Energy_file",null,DataType.URI, true, true); - + OutputDataObjectType output4 = RegisterSampleApplicationsUtils.createAppOutput("STDOUT",null,DataType.STDOUT, true, true); + OutputDataObjectType output5 = RegisterSampleApplicationsUtils.createAppOutput("STDERR",null,DataType.STDERR, true, true); + List<OutputDataObjectType> applicationOutputs = new ArrayList<OutputDataObjectType>(); applicationOutputs.add(output1); applicationOutputs.add(output2); applicationOutputs.add(output3); + applicationOutputs.add(output4); + applicationOutputs.add(output5); gromacsInterfaceId = airavataClient.registerApplicationInterface( RegisterSampleApplicationsUtils.createApplicationInterfaceDescription(gromacsName, gromacsDescription, http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/commons/utils/pom.xml ---------------------------------------------------------------------- diff --git a/modules/commons/utils/pom.xml b/modules/commons/utils/pom.xml index b23ef29..5514364 100644 --- a/modules/commons/utils/pom.xml +++ b/modules/commons/utils/pom.xml @@ -44,7 +44,7 @@ <artifactId>xpp5</artifactId> <version>${xpp5.version}</version> </dependency> - <dependency> + <!--dependency> <groupId>org.ogce</groupId> <artifactId>xsul</artifactId> <version>${xsul.version}</version> @@ -64,7 +64,7 @@ <groupId>org.apache.axis2</groupId> <artifactId>axis2-kernel</artifactId> <version>${axis2.version}</version> - </dependency> + </dependency> --> <dependency> <groupId>commons-dbcp</groupId> <artifactId>commons-dbcp</artifactId> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSConstants.java ---------------------------------------------------------------------- diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSConstants.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSConstants.java index d780379..9737ac4 100644 --- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSConstants.java +++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSConstants.java @@ -25,8 +25,6 @@ import javax.xml.namespace.QName; import org.xmlpull.infoset.XmlNamespace; -import xsul5.XmlConstants; - public interface WSConstants { /** @@ -44,10 +42,10 @@ public interface WSConstants { */ public static final String XSD_NS_URI = "http://www.w3.org/2001/XMLSchema"; - /** - * XML Schema Namespace - */ - public static final XmlNamespace XSD_NS = XmlConstants.BUILDER.newNamespace(XSD_NS_PREFIX, XSD_NS_URI); +// /** +// * XML Schema Namespace +// */ +// public static final XmlNamespace XSD_NS = XmlConstants.BUILDER.newNamespace(XSD_NS_PREFIX, XSD_NS_URI); /** * The any type. http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java ---------------------------------------------------------------------- diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java index 5eb3436..522bb73 100644 --- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java +++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/WSDLUtil.java @@ -40,378 +40,378 @@ import org.xmlpull.infoset.XmlBuilderException; import org.xmlpull.infoset.XmlElement; import org.xmlpull.infoset.XmlNamespace; -import xsul.XmlConstants; -import xsul5.wsdl.WsdlBinding; -import xsul5.wsdl.WsdlDefinitions; -import xsul5.wsdl.WsdlPortType; -import xsul5.wsdl.WsdlPortTypeOperation; -import xsul5.wsdl.WsdlUtil; +//import xsul.XmlConstants; +//import xsul5.wsdl.WsdlBinding; +//import xsul5.wsdl.WsdlDefinitions; +//import xsul5.wsdl.WsdlPortType; +//import xsul5.wsdl.WsdlPortTypeOperation; +//import xsul5.wsdl.WsdlUtil; public class WSDLUtil { private static final Logger logger = LoggerFactory.getLogger(WSDLUtil.class); - /** - * @param wsdlString - * @return The WSDL - * @throws UtilsException - */ - public static WsdlDefinitions stringToWSDL(String wsdlString) throws UtilsException { - try { - XmlElement wsdlElement = XMLUtil.stringToXmlElement(wsdlString); - WsdlDefinitions definitions = new WsdlDefinitions(wsdlElement); - return definitions; - } catch (RuntimeException e) { - throw new UtilsException(e); - } - } - - /** - * @param definitions3 - * @return The WsdlDefinitions (XSUL5) - */ - public static xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5(xsul.wsdl.WsdlDefinitions definitions3) { - - return new xsul5.wsdl.WsdlDefinitions(XMLUtil.xmlElement3ToXmlElement5(definitions3)); - } - - /** - * @param definitions5 - * @return The WsdlDefinitions (XSUL3) - */ - public static xsul.wsdl.WsdlDefinitions wsdlDefinitions5ToWsdlDefintions3(xsul5.wsdl.WsdlDefinitions definitions5) { - - return new xsul.wsdl.WsdlDefinitions(XMLUtil.xmlElement5ToXmlElement3(definitions5.xml())); - } - - /** - * @param definitions - * @return The name of the WSDL. - */ - public static String getWSDLName(WsdlDefinitions definitions) { - String wsdlName = definitions.xml().attributeValue(WSConstants.NAME_ATTRIBUTE); - if (wsdlName == null) { - // name is optional. - wsdlName = ""; - } - return wsdlName; - } - - /** - * @param definitions - * @return The QName of the WSDL. - */ - public static QName getWSDLQName(WsdlDefinitions definitions) { - String targetNamespace = definitions.getTargetNamespace(); - String wsdlName = getWSDLName(definitions); - return new QName(targetNamespace, wsdlName); - } - - /** - * @param definitions - * @return The first portType - * @throws UtilsException - */ - public static WsdlPortType getFirstPortType(WsdlDefinitions definitions) throws UtilsException { - for (WsdlPortType portType : definitions.portTypes()) { - return portType; - } - throw new UtilsException("No portType is defined in WSDL"); - } - - public static WsdlPortTypeOperation getFirstOperation(WsdlDefinitions definitions) throws UtilsException { - for (WsdlPortTypeOperation operation : getFirstPortType(definitions).operations()) { - return operation; - } - throw new UtilsException("No portType is defined in WSDL"); - } - - /** - * @param definitions - * @return The QName of the first portType. - * @throws UtilsException - */ - public static QName getFirstPortTypeQName(WsdlDefinitions definitions) throws UtilsException { - String targetNamespace = definitions.getTargetNamespace(); - for (WsdlPortType portType : definitions.portTypes()) { - String portTypeName = portType.getName(); - QName portTypeQName = new QName(targetNamespace, portTypeName); - return portTypeQName; - } - throw new UtilsException("No portType is defined."); - } - - /** - * @param definitions - * @param portTypeQName - * @return The name of the first operation in a given portType. - * @throws UtilsException - */ - public static String getFirstOperationName(WsdlDefinitions definitions, QName portTypeQName) throws UtilsException { - WsdlPortType portType = definitions.getPortType(portTypeQName.getLocalPart()); - for (WsdlPortTypeOperation operation : portType.operations()) { - String operationName = operation.getOperationName(); - - // XXX Temporary solution to skip some GFac specific operations. - if ("Shutdown".equals(operationName)) { - continue; - } else if ("Kill".equals(operationName)) { - continue; - } else if ("Ping".equals(operationName)) { - continue; - } - - return operationName; - } - throw new UtilsException("No operation is defined"); - } - - /** - * @param definitions - * @return The cloned WsdlDefinitions - */ - public static WsdlDefinitions deepClone(WsdlDefinitions definitions) throws UtilsException { - return new WsdlDefinitions(XMLUtil.deepClone(definitions.xml())); - } - - /** - * @param definitions - * @param paramType - * @return The schema that includes the type definition - */ - public static XmlElement getSchema(WsdlDefinitions definitions, QName paramType) throws UtilsException { - XmlElement types = definitions.getTypes(); - - Iterable<XmlElement> schemas = types.elements(WSConstants.XSD_NS, WSConstants.SCHEMA_TAG); - for (XmlElement schema : schemas) { - if (isTypeDefinedInSchema(paramType, schema)) { - return schema; - } - } - - // ok we didnt find the type in the schema in first level - // now we try try to see if it exist in schema imports. - // we loop in two step because its better to avoid the network - // connection if possible - for (XmlElement schema : schemas) { - Iterable<XmlElement> imports = schema.elements(WSConstants.XSD_NS, WSConstants.IMPORT_TAG); - for (XmlElement importEle : imports) { - String schemaLocation = importEle.attributeValue(WSConstants.SCHEMA_LOCATION_ATTRIBUTE); - if (null != schemaLocation && !"".equals(schemaLocation)) { - try { - // connect using a url connection - URL url = new URL(schemaLocation); - URLConnection connection = url.openConnection(); - connection.connect(); - XmlElement importedSchema = xsul5.XmlConstants.BUILDER.parseFragmentFromInputStream(connection - .getInputStream()); - if (isTypeDefinedInSchema(paramType, importedSchema)) { - // still return the parent schema - return schema; - } - } catch (MalformedURLException e) { - throw new UtilsException(e); - } catch (XmlBuilderException e) { - throw new UtilsException(e); - } catch (IOException e) { - throw new UtilsException(e); - } - } - } - } - - return null; - } - - private static boolean isTypeDefinedInSchema(QName paramType, XmlElement schema) { - String schemaTargetNamespace = schema.attributeValue(WSConstants.TARGET_NAMESPACE_ATTRIBUTE); - if (schemaTargetNamespace.equals(paramType.getNamespaceURI())) { - for (XmlElement complexType : schema.elements(WSConstants.XSD_NS, WSConstants.COMPLEX_TYPE_TAG)) { - String complexTypeName = complexType.attributeValue(WSConstants.NAME_ATTRIBUTE); - if (complexTypeName.equals(paramType.getLocalPart())) { - return true; - } - } - for (XmlElement simpleType : schema.elements(WSConstants.XSD_NS, WSConstants.SIMPLE_TYPE_TAG)) { - String simpleTypeName = simpleType.attributeValue(WSConstants.NAME_ATTRIBUTE); - if (simpleTypeName.equals(paramType.getLocalPart())) { - return true; - } - } - } - return false; - } - - /** - * @param definitions - * @param paramType - * @return The type definition - */ - public static XmlElement getTypeDefinition(WsdlDefinitions definitions, QName paramType) throws UtilsException { - XmlElement types = definitions.getTypes(); - XmlElement returnType = null; - types.element(null, WSConstants.SCHEMA_TAG); - Iterable<XmlElement> schemas = types.elements(null, WSConstants.SCHEMA_TAG); - for (XmlElement schema : schemas) { - - returnType = findTypeInSchema(paramType, schema); - if (returnType != null) { - return returnType; - } - } - // ok we didnt find the type in the schemas - // try to find it in the schema imports. - - // if not found it will return null so we would return null - return findTypeDefinitionInImports(definitions, paramType); - - } - - /** - * - * @param definitions - * @param paramType - * @return - */ - - public static XmlElement getImportContainingTypeDefinition(WsdlDefinitions definitions, QName paramType) - throws UtilsException { - XmlElement types = definitions.getTypes(); - XmlElement returnType = null; - Iterable<XmlElement> schemas = types.elements(WSConstants.XSD_NS, WSConstants.SCHEMA_TAG); - for (XmlElement schema : schemas) { - Iterable<XmlElement> imports = schema.elements(WSConstants.XSD_NS, WSConstants.IMPORT_TAG); - for (XmlElement importEle : imports) { - String schemaLocation = importEle.attributeValue(WSConstants.SCHEMA_LOCATION_ATTRIBUTE); - if (null != schemaLocation && !"".equals(schemaLocation)) { - try { - // connect using a url connection - URL url = new URL(schemaLocation); - URLConnection connection = url.openConnection(); - connection.connect(); - XmlElement importedSchema = xsul5.XmlConstants.BUILDER.parseFragmentFromInputStream(connection - .getInputStream()); - returnType = findTypeInSchema(paramType, importedSchema); - if (returnType != null) { - return importEle; - } - - } catch (MalformedURLException e) { - throw new UtilsException(e); - } catch (XmlBuilderException e) { - throw new UtilsException(e); - } catch (IOException e) { - throw new UtilsException(e); - } - } - } - } - return null; - } - - /** - * - * @param definitions - * @param paramType - * @return - */ - - public static XmlElement findTypeDefinitionInImports(WsdlDefinitions definitions, QName paramType) - throws UtilsException { - XmlElement types = definitions.getTypes(); - XmlElement returnType = null; - Iterable<XmlElement> schemas = types.elements(null, WSConstants.SCHEMA_TAG); - for (XmlElement schema : schemas) { - Iterable<XmlElement> imports = schema.elements(WSConstants.XSD_NS, WSConstants.IMPORT_TAG); - for (XmlElement importEle : imports) { - String schemaLocation = importEle.attributeValue(WSConstants.SCHEMA_LOCATION_ATTRIBUTE); - if (null != schemaLocation && !"".equals(schemaLocation)) { - try { - // connect using a url connection - URL url = new URL(schemaLocation); - URLConnection connection = url.openConnection(); - connection.connect(); - XmlElement importedSchema = xsul5.XmlConstants.BUILDER.parseFragmentFromInputStream(connection - .getInputStream()); - returnType = findTypeInSchema(paramType, importedSchema); - if (returnType != null) { - return returnType; - } - - } catch (MalformedURLException e) { - throw new UtilsException(e); - } catch (XmlBuilderException e) { - throw new UtilsException(e); - } catch (IOException e) { - throw new UtilsException(e); - } - } - } - } - return null; - - } - - private static XmlElement findTypeInSchema(QName paramType, XmlElement schema) { - String schemaTargetNamespace = schema.attributeValue(WSConstants.TARGET_NAMESPACE_ATTRIBUTE); - if (null != schemaTargetNamespace && schemaTargetNamespace.equals(paramType.getNamespaceURI())) { - for (XmlElement complexType : schema.elements(WSConstants.XSD_NS, WSConstants.COMPLEX_TYPE_TAG)) { - String complexTypeName = complexType.attributeValue(WSConstants.NAME_ATTRIBUTE); - if (complexTypeName.equals(paramType.getLocalPart())) { - return complexType; - - } - } - for (XmlElement simpleType : schema.elements(WSConstants.XSD_NS, WSConstants.SIMPLE_TYPE_TAG)) { - String simpleTypeName = simpleType.attributeValue(WSConstants.NAME_ATTRIBUTE); - if (simpleTypeName.equals(paramType.getLocalPart())) { - return simpleType; - } - } - } - return null; - } - - /** - * @param wsdl - * @return true if the WSDL is AWSDL; false otherwise. - */ - public static boolean isAWSDL(WsdlDefinitions wsdl) { - if (wsdl.services().iterator().hasNext()) { - return false; - } - return true; - } - - /** - * @param definitions - * @return true if the service supports asynchronous invocation; false otherwise; - */ - public static boolean isAsynchronousSupported(WsdlDefinitions definitions) { - for (WsdlBinding binding : definitions.bindings()) { - XmlElement element = binding.xml().element(WSConstants.USING_ADDRESSING_TAG); - if (element != null) { - return true; - } - } - return false; - } - - /** - * Converts a specified AWSDL to CWSDL using DSC URI. - * - * @param definitions - * The specified AWSDL. This will be modified. - * @param url - * The URL of the service - * @return The CWSDL converted. - */ - public static WsdlDefinitions convertToCWSDL(WsdlDefinitions definitions, URI url) { - for (WsdlPortType portType : definitions.portTypes()) { - WsdlUtil.createCWSDL(definitions, portType, url); - } - return definitions; - } +// /** +// * @param wsdlString +// * @return The WSDL +// * @throws UtilsException +// */ +// public static WsdlDefinitions stringToWSDL(String wsdlString) throws UtilsException { +// try { +// XmlElement wsdlElement = XMLUtil.stringToXmlElement(wsdlString); +// WsdlDefinitions definitions = new WsdlDefinitions(wsdlElement); +// return definitions; +// } catch (RuntimeException e) { +// throw new UtilsException(e); +// } +// } +// +// /** +// * @param definitions3 +// * @return The WsdlDefinitions (XSUL5) +// */ +// public static xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5(xsul.wsdl.WsdlDefinitions definitions3) { +// +// return new xsul5.wsdl.WsdlDefinitions(XMLUtil.xmlElement3ToXmlElement5(definitions3)); +// } +// +// /** +// * @param definitions5 +// * @return The WsdlDefinitions (XSUL3) +// */ +// public static xsul.wsdl.WsdlDefinitions wsdlDefinitions5ToWsdlDefintions3(xsul5.wsdl.WsdlDefinitions definitions5) { +// +// return new xsul.wsdl.WsdlDefinitions(XMLUtil.xmlElement5ToXmlElement3(definitions5.xml())); +// } +// +// /** +// * @param definitions +// * @return The name of the WSDL. +// */ +// public static String getWSDLName(WsdlDefinitions definitions) { +// String wsdlName = definitions.xml().attributeValue(WSConstants.NAME_ATTRIBUTE); +// if (wsdlName == null) { +// // name is optional. +// wsdlName = ""; +// } +// return wsdlName; +// } +// +// /** +// * @param definitions +// * @return The QName of the WSDL. +// */ +// public static QName getWSDLQName(WsdlDefinitions definitions) { +// String targetNamespace = definitions.getTargetNamespace(); +// String wsdlName = getWSDLName(definitions); +// return new QName(targetNamespace, wsdlName); +// } +// +// /** +// * @param definitions +// * @return The first portType +// * @throws UtilsException +// */ +// public static WsdlPortType getFirstPortType(WsdlDefinitions definitions) throws UtilsException { +// for (WsdlPortType portType : definitions.portTypes()) { +// return portType; +// } +// throw new UtilsException("No portType is defined in WSDL"); +// } +// +// public static WsdlPortTypeOperation getFirstOperation(WsdlDefinitions definitions) throws UtilsException { +// for (WsdlPortTypeOperation operation : getFirstPortType(definitions).operations()) { +// return operation; +// } +// throw new UtilsException("No portType is defined in WSDL"); +// } +// +// /** +// * @param definitions +// * @return The QName of the first portType. +// * @throws UtilsException +// */ +// public static QName getFirstPortTypeQName(WsdlDefinitions definitions) throws UtilsException { +// String targetNamespace = definitions.getTargetNamespace(); +// for (WsdlPortType portType : definitions.portTypes()) { +// String portTypeName = portType.getName(); +// QName portTypeQName = new QName(targetNamespace, portTypeName); +// return portTypeQName; +// } +// throw new UtilsException("No portType is defined."); +// } +// +// /** +// * @param definitions +// * @param portTypeQName +// * @return The name of the first operation in a given portType. +// * @throws UtilsException +// */ +// public static String getFirstOperationName(WsdlDefinitions definitions, QName portTypeQName) throws UtilsException { +// WsdlPortType portType = definitions.getPortType(portTypeQName.getLocalPart()); +// for (WsdlPortTypeOperation operation : portType.operations()) { +// String operationName = operation.getOperationName(); +// +// // XXX Temporary solution to skip some GFac specific operations. +// if ("Shutdown".equals(operationName)) { +// continue; +// } else if ("Kill".equals(operationName)) { +// continue; +// } else if ("Ping".equals(operationName)) { +// continue; +// } +// +// return operationName; +// } +// throw new UtilsException("No operation is defined"); +// } +// +// /** +// * @param definitions +// * @return The cloned WsdlDefinitions +// */ +// public static WsdlDefinitions deepClone(WsdlDefinitions definitions) throws UtilsException { +// return new WsdlDefinitions(XMLUtil.deepClone(definitions.xml())); +// } +// +// /** +// * @param definitions +// * @param paramType +// * @return The schema that includes the type definition +// */ +// public static XmlElement getSchema(WsdlDefinitions definitions, QName paramType) throws UtilsException { +// XmlElement types = definitions.getTypes(); +// +// Iterable<XmlElement> schemas = types.elements(WSConstants.XSD_NS, WSConstants.SCHEMA_TAG); +// for (XmlElement schema : schemas) { +// if (isTypeDefinedInSchema(paramType, schema)) { +// return schema; +// } +// } +// +// // ok we didnt find the type in the schema in first level +// // now we try try to see if it exist in schema imports. +// // we loop in two step because its better to avoid the network +// // connection if possible +// for (XmlElement schema : schemas) { +// Iterable<XmlElement> imports = schema.elements(WSConstants.XSD_NS, WSConstants.IMPORT_TAG); +// for (XmlElement importEle : imports) { +// String schemaLocation = importEle.attributeValue(WSConstants.SCHEMA_LOCATION_ATTRIBUTE); +// if (null != schemaLocation && !"".equals(schemaLocation)) { +// try { +// // connect using a url connection +// URL url = new URL(schemaLocation); +// URLConnection connection = url.openConnection(); +// connection.connect(); +// XmlElement importedSchema = xsul5.XmlConstants.BUILDER.parseFragmentFromInputStream(connection +// .getInputStream()); +// if (isTypeDefinedInSchema(paramType, importedSchema)) { +// // still return the parent schema +// return schema; +// } +// } catch (MalformedURLException e) { +// throw new UtilsException(e); +// } catch (XmlBuilderException e) { +// throw new UtilsException(e); +// } catch (IOException e) { +// throw new UtilsException(e); +// } +// } +// } +// } +// +// return null; +// } +// +// private static boolean isTypeDefinedInSchema(QName paramType, XmlElement schema) { +// String schemaTargetNamespace = schema.attributeValue(WSConstants.TARGET_NAMESPACE_ATTRIBUTE); +// if (schemaTargetNamespace.equals(paramType.getNamespaceURI())) { +// for (XmlElement complexType : schema.elements(WSConstants.XSD_NS, WSConstants.COMPLEX_TYPE_TAG)) { +// String complexTypeName = complexType.attributeValue(WSConstants.NAME_ATTRIBUTE); +// if (complexTypeName.equals(paramType.getLocalPart())) { +// return true; +// } +// } +// for (XmlElement simpleType : schema.elements(WSConstants.XSD_NS, WSConstants.SIMPLE_TYPE_TAG)) { +// String simpleTypeName = simpleType.attributeValue(WSConstants.NAME_ATTRIBUTE); +// if (simpleTypeName.equals(paramType.getLocalPart())) { +// return true; +// } +// } +// } +// return false; +// } +// +// /** +// * @param definitions +// * @param paramType +// * @return The type definition +// */ +// public static XmlElement getTypeDefinition(WsdlDefinitions definitions, QName paramType) throws UtilsException { +// XmlElement types = definitions.getTypes(); +// XmlElement returnType = null; +// types.element(null, WSConstants.SCHEMA_TAG); +// Iterable<XmlElement> schemas = types.elements(null, WSConstants.SCHEMA_TAG); +// for (XmlElement schema : schemas) { +// +// returnType = findTypeInSchema(paramType, schema); +// if (returnType != null) { +// return returnType; +// } +// } +// // ok we didnt find the type in the schemas +// // try to find it in the schema imports. +// +// // if not found it will return null so we would return null +// return findTypeDefinitionInImports(definitions, paramType); +// +// } +// +// /** +// * +// * @param definitions +// * @param paramType +// * @return +// */ +// +// public static XmlElement getImportContainingTypeDefinition(WsdlDefinitions definitions, QName paramType) +// throws UtilsException { +// XmlElement types = definitions.getTypes(); +// XmlElement returnType = null; +// Iterable<XmlElement> schemas = types.elements(WSConstants.XSD_NS, WSConstants.SCHEMA_TAG); +// for (XmlElement schema : schemas) { +// Iterable<XmlElement> imports = schema.elements(WSConstants.XSD_NS, WSConstants.IMPORT_TAG); +// for (XmlElement importEle : imports) { +// String schemaLocation = importEle.attributeValue(WSConstants.SCHEMA_LOCATION_ATTRIBUTE); +// if (null != schemaLocation && !"".equals(schemaLocation)) { +// try { +// // connect using a url connection +// URL url = new URL(schemaLocation); +// URLConnection connection = url.openConnection(); +// connection.connect(); +// XmlElement importedSchema = xsul5.XmlConstants.BUILDER.parseFragmentFromInputStream(connection +// .getInputStream()); +// returnType = findTypeInSchema(paramType, importedSchema); +// if (returnType != null) { +// return importEle; +// } +// +// } catch (MalformedURLException e) { +// throw new UtilsException(e); +// } catch (XmlBuilderException e) { +// throw new UtilsException(e); +// } catch (IOException e) { +// throw new UtilsException(e); +// } +// } +// } +// } +// return null; +// } +// +// /** +// * +// * @param definitions +// * @param paramType +// * @return +// */ +// +// public static XmlElement findTypeDefinitionInImports(WsdlDefinitions definitions, QName paramType) +// throws UtilsException { +// XmlElement types = definitions.getTypes(); +// XmlElement returnType = null; +// Iterable<XmlElement> schemas = types.elements(null, WSConstants.SCHEMA_TAG); +// for (XmlElement schema : schemas) { +// Iterable<XmlElement> imports = schema.elements(WSConstants.XSD_NS, WSConstants.IMPORT_TAG); +// for (XmlElement importEle : imports) { +// String schemaLocation = importEle.attributeValue(WSConstants.SCHEMA_LOCATION_ATTRIBUTE); +// if (null != schemaLocation && !"".equals(schemaLocation)) { +// try { +// // connect using a url connection +// URL url = new URL(schemaLocation); +// URLConnection connection = url.openConnection(); +// connection.connect(); +// XmlElement importedSchema = xsul5.XmlConstants.BUILDER.parseFragmentFromInputStream(connection +// .getInputStream()); +// returnType = findTypeInSchema(paramType, importedSchema); +// if (returnType != null) { +// return returnType; +// } +// +// } catch (MalformedURLException e) { +// throw new UtilsException(e); +// } catch (XmlBuilderException e) { +// throw new UtilsException(e); +// } catch (IOException e) { +// throw new UtilsException(e); +// } +// } +// } +// } +// return null; +// +// } +// +// private static XmlElement findTypeInSchema(QName paramType, XmlElement schema) { +// String schemaTargetNamespace = schema.attributeValue(WSConstants.TARGET_NAMESPACE_ATTRIBUTE); +// if (null != schemaTargetNamespace && schemaTargetNamespace.equals(paramType.getNamespaceURI())) { +// for (XmlElement complexType : schema.elements(WSConstants.XSD_NS, WSConstants.COMPLEX_TYPE_TAG)) { +// String complexTypeName = complexType.attributeValue(WSConstants.NAME_ATTRIBUTE); +// if (complexTypeName.equals(paramType.getLocalPart())) { +// return complexType; +// +// } +// } +// for (XmlElement simpleType : schema.elements(WSConstants.XSD_NS, WSConstants.SIMPLE_TYPE_TAG)) { +// String simpleTypeName = simpleType.attributeValue(WSConstants.NAME_ATTRIBUTE); +// if (simpleTypeName.equals(paramType.getLocalPart())) { +// return simpleType; +// } +// } +// } +// return null; +// } +// +// /** +// * @param wsdl +// * @return true if the WSDL is AWSDL; false otherwise. +// */ +// public static boolean isAWSDL(WsdlDefinitions wsdl) { +// if (wsdl.services().iterator().hasNext()) { +// return false; +// } +// return true; +// } +// +// /** +// * @param definitions +// * @return true if the service supports asynchronous invocation; false otherwise; +// */ +// public static boolean isAsynchronousSupported(WsdlDefinitions definitions) { +// for (WsdlBinding binding : definitions.bindings()) { +// XmlElement element = binding.xml().element(WSConstants.USING_ADDRESSING_TAG); +// if (element != null) { +// return true; +// } +// } +// return false; +// } +// +// /** +// * Converts a specified AWSDL to CWSDL using DSC URI. +// * +// * @param definitions +// * The specified AWSDL. This will be modified. +// * @param url +// * The URL of the service +// * @return The CWSDL converted. +// */ +// public static WsdlDefinitions convertToCWSDL(WsdlDefinitions definitions, URI url) { +// for (WsdlPortType portType : definitions.portTypes()) { +// WsdlUtil.createCWSDL(definitions, portType, url); +// } +// return definitions; +// } /** * @param uri @@ -470,15 +470,15 @@ public class WSDLUtil { return uri; } - /** - * @param valueElement - * @return - */ - public static org.xmlpull.v1.builder.XmlElement xmlElement5ToXmlElementv1(XmlElement valueElement) { - - return XmlConstants.BUILDER.parseFragmentFromReader(new StringReader(xsul5.XmlConstants.BUILDER - .serializeToStringPretty(valueElement))); - } +// /** +// * @param valueElement +// * @return +// */ +// public static org.xmlpull.v1.builder.XmlElement xmlElement5ToXmlElementv1(XmlElement valueElement) { +// +// return XmlConstants.BUILDER.parseFragmentFromReader(new StringReader(xsul5.XmlConstants.BUILDER +// .serializeToStringPretty(valueElement))); +// } /** * @@ -494,12 +494,12 @@ public class WSDLUtil { } - /** - * @param serviceSchema - */ - public static void print(XmlElement serviceSchema) { - System.out.println(xsul5.XmlConstants.BUILDER.serializeToStringPretty(serviceSchema)); - } +// /** +// * @param serviceSchema +// */ +// public static void print(XmlElement serviceSchema) { +// System.out.println(xsul5.XmlConstants.BUILDER.serializeToStringPretty(serviceSchema)); +// } /** * @param workflowID http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/XMLUtil.java ---------------------------------------------------------------------- diff --git a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/XMLUtil.java b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/XMLUtil.java index 6e5b718..0ba02f9 100644 --- a/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/XMLUtil.java +++ b/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/XMLUtil.java @@ -183,23 +183,23 @@ public class XMLUtil { return domElement; } - /** - * @param definitions3 - * @return The WsdlDefinitions (XSUL5) - */ - @Deprecated - public static xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5(xsul.wsdl.WsdlDefinitions definitions3) { - return WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(definitions3); - } - - /** - * @param definitions5 - * @return The WsdlDefinitions (XSUL3) - */ - @Deprecated - public static xsul.wsdl.WsdlDefinitions wsdlDefinitions5ToWsdlDefintions3(xsul5.wsdl.WsdlDefinitions definitions5) { - return WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(definitions5); - } +// /** +// * @param definitions3 +// * @return The WsdlDefinitions (XSUL5) +// */ +// @Deprecated +// public static xsul5.wsdl.WsdlDefinitions wsdlDefinitions3ToWsdlDefintions5(xsul.wsdl.WsdlDefinitions definitions3) { +// return WSDLUtil.wsdlDefinitions3ToWsdlDefintions5(definitions3); +// } +// +// /** +// * @param definitions5 +// * @return The WsdlDefinitions (XSUL3) +// */ +// @Deprecated +// public static xsul.wsdl.WsdlDefinitions wsdlDefinitions5ToWsdlDefintions3(xsul5.wsdl.WsdlDefinitions definitions5) { +// return WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(definitions5); +// } /** * Converts a specified XPP3 XML element to a DOM element under a specified document. http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/credential-store-service/credential-store/pom.xml ---------------------------------------------------------------------- diff --git a/modules/credential-store-service/credential-store/pom.xml b/modules/credential-store-service/credential-store/pom.xml index 6e8ded3..d8af25f 100644 --- a/modules/credential-store-service/credential-store/pom.xml +++ b/modules/credential-store-service/credential-store/pom.xml @@ -117,6 +117,11 @@ <artifactId>commons-email</artifactId> <version>1.3.2</version> </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-io</artifactId> + <version>1.3.2</version> + </dependency> </dependencies> <build> <plugins> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/distribution/server/pom.xml ---------------------------------------------------------------------- diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml index 5f44c45..b1b3a06 100644 --- a/modules/distribution/server/pom.xml +++ b/modules/distribution/server/pom.xml @@ -169,7 +169,7 @@ <artifactId>jcr</artifactId> <version>${jcr.version}</version> </dependency> - <dependency> + <!-- dependency> <groupId>org.ogce</groupId> <artifactId>xpp3</artifactId> <version>${xpp3.version}</version> @@ -193,18 +193,24 @@ <groupId>org.python</groupId> <artifactId>jython</artifactId> <version>${jython.version}</version> - </dependency> + </dependency> --> <dependency> <groupId>com.amazonaws</groupId> <artifactId>aws-java-sdk</artifactId> - <version>1.3.20</version> + <version>1.9.0</version> + <exclusions> + <exclusion> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>net.java.dev.jets3t</groupId> <artifactId>jets3t</artifactId> <version>0.8.0</version> </dependency> - <dependency> + <!-- dependency> <groupId>org.ogce</groupId> <artifactId>atomixmiser</artifactId> <version>${atomixmiser.version}</version> @@ -213,7 +219,7 @@ <groupId>org.ogce</groupId> <artifactId>yfilter</artifactId> <version>${yfilter.version}</version> - </dependency> + </dependency> --> <dependency> <groupId>commons-collections</groupId> <artifactId>commons-collections</artifactId> @@ -258,11 +264,39 @@ <groupId>org.apache.airavata</groupId> <artifactId>airavata-common-utils</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.ws.commons.schema</groupId> + <artifactId>XmlSchema</artifactId> + </exclusion> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xmlParserAPIs</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.neethi</groupId> + <artifactId>neethi</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-orchestrator-service</artifactId> <version>${project.version}</version> + <exclusions> + <exclusion> + <groupId>org.apache.ws.commons.schema</groupId> + <artifactId>XmlSchema</artifactId> + </exclusion> + <exclusion> + <groupId>xerces</groupId> + <artifactId>xmlParserAPIs</artifactId> + </exclusion> + <exclusion> + <groupId>org.apache.neethi</groupId> + <artifactId>neethi</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.airavata</groupId> @@ -484,6 +518,12 @@ <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> <version>2.9.1</version> + <exclusions> + <exclusion> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>com.ibm.icu</groupId> @@ -511,6 +551,16 @@ <groupId>org.apache.whirr</groupId> <artifactId>whirr-core</artifactId> <version>0.7.1</version> + <exclusions> + <exclusion> + <groupId>org.bouncycastle</groupId> + <artifactId>bcprov-jdk16</artifactId> + </exclusion> + <exclusion> + <groupId>org.jclouds.driver</groupId> + <artifactId>jclouds-bouncycastle</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.apache.whirr</groupId> @@ -547,11 +597,11 @@ <artifactId>jsch</artifactId> <version>0.1.50</version> </dependency> - <dependency> + <!-- dependency> <groupId>org.ogce</groupId> <artifactId>bcgss</artifactId> <version>146</version> - </dependency> + </dependency> --> <dependency> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/gfac/gfac-bes/pom.xml ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-bes/pom.xml b/modules/gfac/gfac-bes/pom.xml index 8fdeb7c..365f260 100644 --- a/modules/gfac/gfac-bes/pom.xml +++ b/modules/gfac/gfac-bes/pom.xml @@ -95,6 +95,11 @@ </dependency> <!-- Unicore dependencies --> <dependency> + <groupId>commons-httpclient</groupId> + <artifactId>commons-httpclient</artifactId> + <version>3.1</version> + </dependency> + <dependency> <groupId>eu.unicore</groupId> <artifactId>unicore-client-wrapper</artifactId> <version>1.7.2_1</version> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/gfac/gfac-gsissh/pom.xml ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-gsissh/pom.xml b/modules/gfac/gfac-gsissh/pom.xml index 1c355ac..dc96412 100644 --- a/modules/gfac/gfac-gsissh/pom.xml +++ b/modules/gfac/gfac-gsissh/pom.xml @@ -98,11 +98,6 @@ <version>0.1.50</version> </dependency> <dependency> - <groupId>org.ogce</groupId> - <artifactId>bcgss</artifactId> - <version>146</version> - </dependency> - <dependency> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> <version>${xmlbeans.version}</version> @@ -112,10 +107,5 @@ <artifactId>sshj</artifactId> <version>0.6.1</version> </dependency> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - <version>${mysql.connector.version}</version> - </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java index c360909..968f159 100644 --- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java +++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/handler/GSISSHDirectorySetupHandler.java @@ -75,8 +75,11 @@ public class GSISSHDirectorySetupHandler extends AbstractRecoverableHandler { String workingDirectory = jobExecutionContext.getWorkingDir(); cluster.makeDirectory(workingDirectory); - cluster.makeDirectory(jobExecutionContext.getInputDir()); - cluster.makeDirectory(jobExecutionContext.getOutputDir()); + if(!jobExecutionContext.getInputDir().equals(workingDirectory)) + cluster.makeDirectory(jobExecutionContext.getInputDir()); + if(!jobExecutionContext.getOutputDir().equals(workingDirectory)) + cluster.makeDirectory(jobExecutionContext.getOutputDir()); + DataTransferDetails detail = new DataTransferDetails(); TransferStatus status = new TransferStatus(); status.setTransferState(TransferState.DIRECTORY_SETUP); http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/gfac/gfac-ssh/pom.xml ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-ssh/pom.xml b/modules/gfac/gfac-ssh/pom.xml index 9826f20..a7c97f1 100644 --- a/modules/gfac/gfac-ssh/pom.xml +++ b/modules/gfac/gfac-ssh/pom.xml @@ -93,11 +93,6 @@ <version>0.1.50</version> </dependency> <dependency> - <groupId>org.ogce</groupId> - <artifactId>bcgss</artifactId> - <version>146</version> - </dependency> - <dependency> <groupId>org.apache.xmlbeans</groupId> <artifactId>xmlbeans</artifactId> <version>${xmlbeans.version}</version> @@ -107,11 +102,6 @@ <artifactId>sshj</artifactId> <version>0.6.1</version> </dependency> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - <version>${mysql.connector.version}</version> - </dependency> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java index 634ee07..90dc70b 100644 --- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java +++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/SSHDirectorySetupHandler.java @@ -71,8 +71,11 @@ public class SSHDirectorySetupHandler extends AbstractHandler { } String workingDirectory = jobExecutionContext.getWorkingDir(); cluster.makeDirectory(workingDirectory); - cluster.makeDirectory(jobExecutionContext.getInputDir()); - cluster.makeDirectory(jobExecutionContext.getOutputDir()); + if(!jobExecutionContext.getInputDir().equals(workingDirectory)) + cluster.makeDirectory(jobExecutionContext.getInputDir()); + if(!jobExecutionContext.getOutputDir().equals(workingDirectory)) + cluster.makeDirectory(jobExecutionContext.getOutputDir()); + DataTransferDetails detail = new DataTransferDetails(); TransferStatus status = new TransferStatus(); status.setTransferState(TransferState.DIRECTORY_SETUP); http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java index cb73752..d4292d9 100644 --- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java +++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/util/GFACSSHUtils.java @@ -38,6 +38,7 @@ import org.apache.airavata.gsi.ssh.api.Cluster; import org.apache.airavata.gsi.ssh.api.ServerInfo; import org.apache.airavata.gsi.ssh.api.authentication.AuthenticationInfo; import org.apache.airavata.gsi.ssh.api.job.JobDescriptor; +import org.apache.airavata.gsi.ssh.api.job.JobManagerConfiguration; import org.apache.airavata.gsi.ssh.impl.GSISSHAbstractCluster; import org.apache.airavata.gsi.ssh.impl.PBSCluster; import org.apache.airavata.gsi.ssh.util.CommonUtils; @@ -62,6 +63,9 @@ public class GFACSSHUtils { public static Map<String, List<Cluster>> clusters = new HashMap<String, List<Cluster>>(); + public static final String PBS_JOB_MANAGER = "pbs"; + public static final String SLURM_JOB_MANAGER = "slurm"; + public static final String SUN_GRID_ENGINE_JOB_MANAGER = "UGE"; public static int maxClusterCount = 5; /** @@ -129,8 +133,21 @@ public class GFACSSHUtils { recreate = true; } if (recreate) { - pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo, - CommonUtils.getPBSJobManager(installedParentPath)); + JobManagerConfiguration jConfig = null; + String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString(); + if (jobManager == null) { + logger.error("No Job Manager is configured, so we are picking pbs as the default job manager"); + jConfig = CommonUtils.getPBSJobManager(installedParentPath); + } else { + if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) { + jConfig = CommonUtils.getPBSJobManager(installedParentPath); + } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) { + jConfig = CommonUtils.getSLURMJobManager(installedParentPath); + } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) { + jConfig = CommonUtils.getSGEJobManager(installedParentPath); + } + } + pbsCluster = new PBSCluster(serverInfo, tokenizedSSHAuthInfo,jConfig); List<Cluster> pbsClusters = null; if (!(clusters.containsKey(key))) { pbsClusters = new ArrayList<Cluster>(); @@ -166,6 +183,10 @@ public class GFACSSHUtils { throw new GFacException("Error adding security Context, because sshAuthWrapper is null"); } SSHSecurityContext sshSecurityContext = new SSHSecurityContext(); + AppCatalog appCatalog = jobExecutionContext.getAppCatalog(); + JobSubmissionInterface preferredJobSubmissionInterface = jobExecutionContext.getPreferredJobSubmissionInterface(); + SSHJobSubmission sshJobSubmission = appCatalog.getComputeResource().getSSHJobSubmission(preferredJobSubmissionInterface.getJobSubmissionInterfaceId()); + Cluster pbsCluster = null; String key=sshAuth.getKey(); boolean recreate = false; @@ -195,7 +216,25 @@ public class GFACSSHUtils { recreate = true; } if (recreate) { - pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),null); + JobManagerConfiguration jConfig = null; + String installedParentPath = jobExecutionContext.getResourceJobManager().getJobManagerBinPath(); + if (installedParentPath == null) { + installedParentPath = "/"; + } + String jobManager = sshJobSubmission.getResourceJobManager().getResourceJobManagerType().toString(); + if (jobManager == null) { + logger.error("No Job Manager is configured, so we are picking pbs as the default job manager"); + jConfig = CommonUtils.getPBSJobManager(installedParentPath); + } else { + if (PBS_JOB_MANAGER.equalsIgnoreCase(jobManager)) { + jConfig = CommonUtils.getPBSJobManager(installedParentPath); + } else if (SLURM_JOB_MANAGER.equalsIgnoreCase(jobManager)) { + jConfig = CommonUtils.getSLURMJobManager(installedParentPath); + } else if (SUN_GRID_ENGINE_JOB_MANAGER.equalsIgnoreCase(jobManager)) { + jConfig = CommonUtils.getSGEJobManager(installedParentPath); + } + } + pbsCluster = new PBSCluster(sshAuth.getServerInfo(), sshAuth.getAuthenticationInfo(),jConfig); key = sshAuth.getKey(); List<Cluster> pbsClusters = null; if (!(clusters.containsKey(key))) { http://git-wip-us.apache.org/repos/asf/airavata/blob/9a6eaaae/modules/workflow-model/workflow-engine/pom.xml ---------------------------------------------------------------------- diff --git a/modules/workflow-model/workflow-engine/pom.xml b/modules/workflow-model/workflow-engine/pom.xml index a043170..a136ae7 100644 --- a/modules/workflow-model/workflow-engine/pom.xml +++ b/modules/workflow-model/workflow-engine/pom.xml @@ -90,7 +90,7 @@ <type>zip</type> <optional>true</optional> </dependency--> - + <dependency> <groupId>org.ogce</groupId> <artifactId>xpp3</artifactId> @@ -101,6 +101,7 @@ <artifactId>xpp5</artifactId> <version>${xpp5.version}</version> </dependency> + <!-- <dependency> <groupId>org.ogce</groupId> <artifactId>xsul</artifactId> @@ -110,7 +111,7 @@ <groupId>org.ogce</groupId> <artifactId>gpel-client</artifactId> <version>${gpel.version}</version> - </dependency> + </dependency> --> <dependency> <groupId>org.ogce</groupId> <artifactId>atomixmiser</artifactId>
