0

I was going through the Jersey doc and found that the marshalling and unmarshalling happens automatically using the JAXB annotation @XmlRootElement. My question here is how to impose the schema (xsd) validation before the unmarshalling process to get rid of any xml request errors.Any example of how validation works would be really great.

Thanks, sanvy

sanv
  • 1
  • 4
  • possible duplicate of [Validate JAXBElement in JPA/JAX-RS Web Service](http://stackoverflow.com/questions/3428273/validate-jaxbelement-in-jpa-jax-rs-web-service) – bdoughan Jan 05 '12 at 11:29

1 Answers1

0

Check out my answer to a similar question, it involves creating a MessageBodyReader:

Community
  • 1
  • 1
bdoughan
  • 147,609
  • 23
  • 300
  • 400