use of nl.nn.adapterframework.validation.AbstractXmlValidator in project iaf by ibissource.
the class XmlValidatorTest method getValidator.
public static XmlValidator getValidator(String schemaLocation, boolean addNamespaceToSchema, Class<AbstractXmlValidator> implementation) throws ConfigurationException {
XmlValidator validator = getUnconfiguredValidator(schemaLocation, addNamespaceToSchema, implementation);
validator.configure();
return validator;
}
use of nl.nn.adapterframework.validation.AbstractXmlValidator in project iaf by ibissource.
the class XmlValidatorTest2 method getValidator.
public static XmlValidator getValidator(String schemaLocation, boolean addNamespaceToSchema, Class<AbstractXmlValidator> implementation) throws ConfigurationException {
XmlValidator validator = new XmlValidator();
try {
validator.setImplementation(implementation);
} catch (Exception e) {
throw new RuntimeException(e);
}
validator.setSchemaLocation(schemaLocation);
if (addNamespaceToSchema) {
validator.setAddNamespaceToSchema(addNamespaceToSchema);
}
validator.registerForward(getSuccess());
validator.setThrowException(true);
validator.setFullSchemaChecking(true);
validator.configure();
return validator;
}
use of nl.nn.adapterframework.validation.AbstractXmlValidator in project iaf by ibissource.
the class XmlValidatorTest method getUnconfiguredValidator.
public static XmlValidator getUnconfiguredValidator(String schemaLocation, boolean addNamespaceToSchema, Class<AbstractXmlValidator> implementation) {
XmlValidator validator = new XmlValidator();
try {
validator.setImplementation(implementation);
} catch (Exception e) {
throw new RuntimeException(e);
}
validator.setSchemaLocation(schemaLocation);
if (addNamespaceToSchema) {
validator.setAddNamespaceToSchema(addNamespaceToSchema);
}
validator.registerForward(getSuccess());
validator.setThrowException(true);
validator.setFullSchemaChecking(true);
return validator;
}
Aggregations