@Test public void testRegexpContentValidation_DataMatches() throws Exception { XmlRuleValidator validator = new XmlRuleValidator(); validator.addValidationStage(new ValidationStage(XPATH_ITERATION_CHILDREN_OF_ZEUS, XPATH_CHILDREN_OF_HERA, new RegexpContentValidation("[a-zA-Z]+"))); AdaptrisMessage msg = new DefaultMessageFactory().newMessage(XML_FAMILY_TREE); XmlValidationService service = new XmlValidationService(validator); try { ExampleServiceCase.start(service); service.doService(new DefaultMessageFactory().newMessage(XML_FAMILY_TREE)); service.doService(new DefaultMessageFactory().newMessage(XML_FAMILY_TREE)); } catch (ServiceException e) { fail("RuleValidationService failure when expecting success"); } 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);  }