}
protected Document parseInput(InputStream is, Message message) throws Exception { //NOPMD
try {
ValidatorErrorHandler errorHandler = new DefaultValidationErrorHandler();
Schema schema = getSchema(message);
DocumentBuilder db = XmlSignatureHelper.newDocumentBuilder(getConfiguration().getDisallowDoctypeDecl(), schema);
db.setErrorHandler(errorHandler);
Document doc = db.parse(is);
errorHandler.handleErrors(message.getExchange(), schema, null); // throws ValidationException
return doc;
} catch (SAXException e) {
throw new XmlSignatureFormatException("Message has wrong format, it is not a XML signature document. Check the sent message.",
e);
}