Class XmlValidatingMessageSelector
java.lang.Object
org.springframework.integration.xml.selector.XmlValidatingMessageSelector
- All Implemented Interfaces:
 GenericSelector<Message<?>>,MessageSelector
The XML validation-specific 
MessageSelector.- Since:
 - 2.0
 - Author:
 - Oleg Zhurakousky, Gary Russell, Liujiong, Artem Bilan
 
- 
Nested Class Summary
Nested Classes - 
Constructor Summary
ConstructorsConstructorDescriptionXmlValidatingMessageSelector(Resource schema, @Nullable String schemaType) XmlValidatingMessageSelector(Resource schema, @Nullable XmlValidatingMessageSelector.SchemaType schemaType) Create a selector with a defaultXmlValidator.XmlValidatingMessageSelector(XmlValidator xmlValidator)  - 
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetConverter(XmlPayloadConverter converter) Specify the Converter to use when converting payloads prior to validation.voidsetThrowExceptionOnRejection(boolean throwExceptionOnRejection)  
- 
Constructor Details
- 
XmlValidatingMessageSelector
public XmlValidatingMessageSelector(Resource schema, @Nullable XmlValidatingMessageSelector.SchemaType schemaType) throws IOException Create a selector with a defaultXmlValidator. The validator will be initialized with the provided 'schema' locationResourceand 'schemaType'. The valid options for schema type areXmlValidatorFactory.SCHEMA_W3C_XMLorXmlValidatorFactory.SCHEMA_RELAX_NG. If no 'schemaType' is provided it will default toXmlValidatorFactory.SCHEMA_W3C_XML;- Parameters:
 schema- The schema.schemaType- The schema type.- Throws:
 IOException- if the XmlValidatorFactory fails to create a validator
 - 
XmlValidatingMessageSelector
 - 
XmlValidatingMessageSelector
public XmlValidatingMessageSelector(Resource schema, @Nullable String schemaType) throws IOException - Throws:
 IOException
 
 - 
 - 
Method Details
- 
setThrowExceptionOnRejection
public void setThrowExceptionOnRejection(boolean throwExceptionOnRejection)  - 
setConverter
Specify the Converter to use when converting payloads prior to validation.- Parameters:
 converter- The payload converter.
 - 
accept
- Specified by:
 acceptin interfaceGenericSelector<Message<?>>- Specified by:
 acceptin interfaceMessageSelector
 
 -