ProfileParser profParser = new ProfileParser(true);
RuntimeProfile profile = profParser.parse(profileString);
exceptions = val.validate(message, profile.getMessage());
} else {
throw new ProfileException("Unable to find the profile " + id);
}
} catch (IOException e) {
throw new ProfileException("Error retreiving profile " + id, e);
}
ValidationException[] result = new ValidationException[exceptions.length];
for (int i = 0; i < exceptions.length; i++) {
result[i] = new ValidationException(exceptions[i].getMessage(), exceptions[i]);