Does anybody has an idea about how I can return an error message. I am trying to return an specific xml error message in my validator. This is my code:
@Override
public void validate(Object target, Errors errors) {
try {
ValidationClassUtil.validateDocument(new String((byte[]) target), xmlVersionEnum);
(//should the error be returned here when I send an invalid xml file over http?)
} catch (Exception exc) {
errors.reject(errorCode);
}
}