According to the javadocs, specifying required = true on an element wrapper should make the wrapper element required (minOccurs = 1) in the generated schema. This doesn't appear work in JAXB 2.1.3. Is it supposed to?
I guess that depends on how you look at it. The default value for minOccurs is always 1, so actually adding minOccurs="1" as an element attribute in the schema is really a no-op of sorts. Whether it is present or not wouldn't affect validation, for example.
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.