public class PayloadValidatingInterceptor extends AbstractValidatingInterceptor
WebServiceMessage
s 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.
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)
logger
Constructor and Description |
---|
PayloadValidatingInterceptor() |
Modifier and Type | Method and Description |
---|---|
protected Source |
getValidationRequestSource(WebServiceMessage request)
Returns the part of the request message that is to be validated.
|
protected Source |
getValidationResponseSource(WebServiceMessage response)
Returns the part of the response message that is to be validated.
|
afterCompletion, afterPropertiesSet, getSchemaLanguage, getSchemas, handleFault, handleRequest, handleRequestValidationErrors, handleResponse, handleResponseValidationErrors, setSchema, setSchemaLanguage, setSchemas, setValidateRequest, setValidateResponse, setXsdSchema, setXsdSchemaCollection
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
protected Source getValidationRequestSource(WebServiceMessage request)
getValidationRequestSource
in class AbstractValidatingInterceptor
request
- the request messagenull
not to validate anythingprotected Source getValidationResponseSource(WebServiceMessage response)
getValidationResponseSource
in class AbstractValidatingInterceptor
response
- the response messagenull
not to validate anythingCopyright © 2018 Pivotal Software. All rights reserved.