@Test public void testRegexpContentValidation_ComplexRegexp() throws Exception { XmlRuleValidator validator = new XmlRuleValidator(); validator.addValidationStage(new ValidationStage(" "text()", new RegexpContentValidation("^[0-9]{13}$"))); AdaptrisMessage msg = new DefaultMessageFactory().newMessage(REGEXP_XML); XmlValidationService service = new XmlValidationService(validator); try { ExampleServiceCase.execute(service, msg); fail("RuleValidationService success when expecting failure"); } catch (ServiceException expected) { assertTrue(expected.getMessage().startsWith("NodeList entry ")); } finally { ExampleServiceCase.stop(service); } }
public void addValidationStage(ValidationStage vs) { validationStages.add(vs); }
XmlRuleValidator extends MessageValidatorImpl { public void addValidationStage(ValidationStage vs) { validationStages.add(vs); } }
XmlRuleValidator extends MessageValidatorImpl { public void addValidationStage(ValidationStage vs) { validationStages.add(vs); } XmlRuleValidator();  XmlRuleValidator(ValidationStage... stages); }
XmlRuleValidator extends MessageValidatorImpl { public void addValidationStage(ValidationStage vs) { validationStages.add(vs); } XmlRuleValidator();  XmlRuleValidator(ValidationStage... stages); @Override void validate(AdaptrisMessage msg); void addValidationStage(ValidationStage vs); List<ValidationStage> getValidationStages(); void setValidationStages(List<ValidationStage> l); KeyValuePairSet getNamespaceContext(); void setNamespaceContext(KeyValuePairSet set); DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig(); void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml); }
XmlRuleValidator extends MessageValidatorImpl { public void addValidationStage(ValidationStage vs) { validationStages.add(vs); } XmlRuleValidator();  XmlRuleValidator(ValidationStage... stages); @Override void validate(AdaptrisMessage msg); void addValidationStage(ValidationStage vs); List<ValidationStage> getValidationStages(); void setValidationStages(List<ValidationStage> l); KeyValuePairSet getNamespaceContext(); void setNamespaceContext(KeyValuePairSet set); DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig(); void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml);  }