How to configure schema validation for JAX-RS RESTFul services?
We are using XSD to define the models, and JAXB to generate the java models.
How to configure schema validation for JAX-RS RESTFul services?
We are using XSD to define the models, and JAXB to generate the java models.
This is how it's done automatically in ReXSL: XslResolver#addXsdValidatorToMarshaller() (pay attention to the highlighted method). In a nutshell, you need to use
setSchema()
of your JAXBMarshaller
.