} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
ODEClient xbayaRegistryClient = new ODEClient();
// if (workflowTemplateName.startsWith("http://extreme.indiana.edu/lead/workflow/")){
// QName workflowQName = new QName(workflowTemplateName);
// xBayaWorkflow = xbayaRegistryClient.getWorkflow(URI.create(xRegistryUrl), credential, workflowQName);
// } else {
// xBayaWorkflow = xbayaRegistryClient.getWorkflow(URI.create(xRegistryUrl), credential, workflowTemplateName);
// }
if (workflowTemplateName.startsWith("http://extreme.indiana.edu/lead/workflow/")){
String[] tokens = workflowTemplateName.split("/");
workflowTemplateName = tokens[tokens.length - 1];
}
//Fetch the required elements and load into to lighter experiment builder workflow model
try {
xBayaWorkflow = xbayaRegistryClient.getWorkflow(URI.create(context.getXRegistryUrl()), cred, workflowTemplateName);
if (xBayaWorkflow != null){
expBldrWorkflow.setId(xBayaWorkflow.getUniqueWorkflowName().toString());
expBldrWorkflow.setName(xBayaWorkflow.getName());
expBldrWorkflow.setDescription(xBayaWorkflow.getDescription());
expBldrWorkflow.setWorkflowImage(xBayaWorkflow.getImage());
// for (WSComponentPort wsComponentPort : inputs) {
// wsComponentPort.setDefaultValue("<whateverxml/>");
// wsComponentPort.getDescription();
// }
// Fetch All Workflow Inputs
List<WSComponentPort> workflowInputs = xbayaRegistryClient.getInputs(xBayaWorkflow);
LinkedList<Pair<WSComponentPort, String>> workflowInputExtensionPairs = new LinkedList<Pair<WSComponentPort, String>>();
//Iterate through all inputs and determine extensions and stuff them into experiment builder workflow object
for (WSComponentPort workflowInput : workflowInputs) {
String inputExtension = null;