public static Object parseValue(WSComponentPort input, String valueString) {
String name = input.getName();
if (false) {
// Some user wants to pass empty strings, so this check is disabled.
if (valueString.length() == 0) {
throw new WorkflowRuntimeException("Input parameter, " + name + ", cannot be empty");
}
}
QName type = input.getType();
Object value;
if (LEADTypes.isKnownType(type)) {
// TODO check the type.
value = valueString;
} else {
try {
if(XBayaConstants.HTTP_SCHEMAS_AIRAVATA_APACHE_ORG_GFAC_TYPE.equals(input.getType().getNamespaceURI())){
value = XMLUtil.stringToXmlElement3(WorkflowInputUtil.createInputForGFacService(input, valueString));
}else {
throw new WorkflowRuntimeException("Input parameter, " + name + ", Unkown Type");
}
} catch (RuntimeException e) {
throw new WorkflowRuntimeException("Input parameter, " + name + ", is not valid XML", e);
}
}
return value;
}