Class ValidatorInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.interceptor.schemavalidation.ValidatorInterceptor
- All Implemented Interfaces:
Interceptor,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class ValidatorInterceptor
extends AbstractInterceptor
implements org.springframework.context.ApplicationContextAware
Basically switches over
WSDLValidator, XMLSchemaValidator,
JSONValidator and SchematronValidator depending on the
attributes.- Topic
- 8. SOAP based Web Services
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
Fields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetWsdl()handleRequest(Exchange exc) handleResponse(Exchange exc) voidinit()Called after parsing is complete and this has been added to the object tree (whose root is Router).voidbooleanvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetFailureHandler(String failureHandler) voidsetJsonSchema(String jsonSchema) voidsetResourceResolver(ResolverMap resourceResolver) voidvoidsetSchematron(String schematron) voidsetServiceName(String serviceName) voidsetSkipFaults(boolean skipFaults) voidMethods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getMessage, getRouter, getRule, handleAbort, setDisplayName, setFlow
-
Constructor Details
-
ValidatorInterceptor
public ValidatorInterceptor()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
init
Description copied from class:AbstractInterceptorCalled after parsing is complete and this has been added to the object tree (whose root is Router).- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
setWsdl
- Description
- The WSDL (URL or file) to validate against.
- Example
- "http://predic8.com:8080/material/ArticleService?wsdl
-
getWsdl
-
getSchema
-
setSchema
- Description
- The XSD Schema (URL or file) to validate against.
- Example
- http://www.predic8.com/schemas/order.xsd
-
getFailureHandler
-
setFailureHandler
- Default
- response
- Description
- If "response", the HTTP response will include a detailled error message. If "log", the response will be generic and the validation error will be logged.
- Example
- log
-
getJsonSchema
-
setJsonSchema
- Description
- The JSON Schema (URL or file) to validate against.
- Example
- examples/validation/json-schema/schema2000.json
-
getSchematron
-
setSchematron
- Description
- The Schematron schema (URL or file) to validate against.
- Example
- examples/validation/schematron/car-schematron.xml
-
isSkipFaults
public boolean isSkipFaults() -
setSkipFaults
public void setSkipFaults(boolean skipFaults) - Default
- false
- Description
- Whether to skip validation for SOAP fault messages.
-
getServiceName
-
setServiceName
- Description
- Optional name of a serivce element in a WSDL. If specified it will be checked if the SOAP element is possible for that service.
-
init
- Specified by:
initin interfaceInterceptor- Overrides:
initin classAbstractInterceptor- Throws:
Exception
-
setResourceResolver
-
getShortDescription
- Specified by:
getShortDescriptionin interfaceInterceptor- Overrides:
getShortDescriptionin classAbstractInterceptor
-
getLongDescription
- Specified by:
getLongDescriptionin interfaceInterceptor- Overrides:
getLongDescriptionin classAbstractInterceptor
-