title: test if JAXB generated field is required
body: <p>I have a JAXB generated class PersonType with the properties name, phone, address. In the XSD I define that "phone" minoccurs="1".
  How can I test programatically(i.e. via reflection, etc), in Java code, if the property "phone" is required or not in the XSD?</p>
  
  <p>Later edit: 
  The JAXB generator creates a class without any "required", etc. attributes. So there's no annotation on the class or it's fields to indicate if it's required or not. However, there's the @XmlElement annotation on the field specifying the XSD equivalent element. So I guess the only solution is to inspect this annotation and then make an XPath or something against the XSD?</p>
  
  <p>Thank you!</p>