Rather than creating a general validating mechanism it might be better to have a general mechanism you inherit from for specific validating purposes i.e. Our Validation Event Collector throws an unchecked exception (JAXBParser Exception) which we then handle with Exception Mapper. Hi Andrew, Validating is indeed deprecated and you need to set the Schema object to validate against.
In this respect i am unsure how you can create a general validating mechanism unless you keep a map of known JAXB class to Schema instance.
Unmarshalling and Marshalling with the JAXP 1.3 Validation Schema One of the enhancements in JAXB 2.0 is the additional validation capabilities provided through the use of the JAXP 1.3 validation APIs.
Hi Andrew, Validating is indeed deprecated and you need to set the Schema object to validate against. = To question ----------------\ Paul Sandoz x38109 33-4-76188109 --------------------------------------------------------------------- To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email] Thanks for your dedication to the list, Paul.
These three aspects of JAXB are covered by three separate interfaces.
You'll find the example code for this tip in a downloadable archive.You will have to create the Schema instances from the correspondingly available XSD, more info can be found here .  Cole wrote: wrote: While Paul is on vacation, can somebody help illuminate his response to my query below?Rather than creating a general validating mechanism it might be better to have a general mechanism you inherit from for specific validating purposes i.e. Trying to follow his instructions, I have implemented a Context Resolver as follows: @Provider public class Validating JAXBContext Resolver implements Context Resolver and a JAXBContext (modeled after the JSONJAXBContext in the jersey source) as: public class Validating JAXBContext extends JAXBContext Now, when I hit a method that would require unmarshalling content from XML, I receive an exception at my call to set Validating: Unsupported Operation Exception at v2.runtime.unmarshaller. Unmarshaller Validating(Unmarshaller Impl.java:483) at my Code. Validating JAXBContext.create Unmarshaller(Validating JAXBContext.java:33) at impl.provider.entity. XMLRoot Element From(XMLRoot Element Provider.java:58) at spi.container.Abstract Container Entity(Abstract Container Request.java:179) [stack trace truncated] Am I on the right track here?