public class PayloadValidatingInterceptor extends AbstractFaultCreatingValidatingInterceptor
WebServiceMessages using a schema. Allows for both W3C XML and
RELAX NG schemas.
When the payload is invalid, this interceptor stops processing of the interceptor chain. Additionally, if the message is a SOAP request message, a SOAP Fault is created as reply. Invalid SOAP responses do not result in a fault.
The schema to validate against is set with the schema property or schemas property. By default, only
the request message is validated, but this behaviour can be changed using the validateRequest and
validateResponse properties. Responses that contains faults are not validated.
AbstractValidatingInterceptor.setSchema(org.springframework.core.io.Resource),
AbstractValidatingInterceptor.setSchemas(org.springframework.core.io.Resource[]),
AbstractValidatingInterceptor.setValidateRequest(boolean),
AbstractValidatingInterceptor.setValidateResponse(boolean)DEFAULT_DETAIL_ELEMENT_NAME, DEFAULT_FAULTSTRING_OR_REASONlogger| Constructor and Description |
|---|
PayloadValidatingInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
protected Source |
getValidationRequestSource(WebServiceMessage request)
Returns the payload source of the given message.
|
protected Source |
getValidationResponseSource(WebServiceMessage response)
Returns the payload source of the given message.
|
getAddValidationErrorDetail, getDetailElementName, getFaultStringOrReason, getFaultStringOrReasonLocale, handleRequestValidationErrors, setAddValidationErrorDetail, setDetailElementName, setFaultStringOrReason, setFaultStringOrReasonLocaleafterCompletion, afterPropertiesSet, getSchemaLanguage, getSchemas, handleFault, handleRequest, handleResponse, handleResponseValidationErrors, setErrorHandler, setSchema, setSchemaLanguage, setSchemas, setValidateRequest, setValidateResponse, setXsdSchema, setXsdSchemaCollectioncreateTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transformprotected Source getValidationRequestSource(WebServiceMessage request)
getValidationRequestSource in class AbstractValidatingInterceptorrequest - the request messagenull not to validate anythingprotected Source getValidationResponseSource(WebServiceMessage response)
getValidationResponseSource in class AbstractValidatingInterceptorresponse - the response messagenull not to validate anythingCopyright © 2023 VMware, Inc.. All rights reserved.