The JAXB reference implementation doesn't use this attribute for validation, it's purely there for documentation purposes.
If you need to validate the documents, you need to define an XML Schema, and inject it into the Marshaller or Unmarshaller, using SchemaFactory.
http://stackoverflow.com/questions/2669632/jaxb-required-true-doesnt-seem-to-require
No comments:
Post a Comment