Jaxb validating

SAXException; public class XMLValidation Employee validates against Employee.xsd? true Exception: cvc-elt.1: Cannot find the declaration of element 'Employee'.

jaxb validating-19jaxb validating-64jaxb validating-75

The company accepts no liability for any damage caused by any virus transmitted by this email.

Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email.

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. We have resolved this issue without needing to maintain a map of JAXB classes.

You will have to create the Schema instances from the correspondingly available XSD, more info can be found here [1]. We implemented a Validation Event Collector, and set this to handle validation events coming from the unmarshaller.

Leave a Reply