title: JAXB XmlElement maxOccurs Issue with Array elements
body: <p>I have used below getter method level XmlElement annotation for generating xsd from Java class. </p>
  
  <p><strong>@XmlElement(type=Integer.class, required=true)</strong></p>
  
  <p><em>public int [] getTestArrayInt () { .... }</em></p>
  
  <p><strong>Generated XML element:</strong></p>
  
  <pre><code>&lt;xsd:element name="testArrayInt" type="xsd:int"/&gt;
  </code></pre>
  
  <p>minOccurs's default value is said to be 1. Hence, it is not being displayed here. 
  But <strong>maxOccurs="unbounded"</strong> which should be listed for Array elements is missing. Soap UI expects maxOccurs="unbounded" to be present for the array elements. As a result, in Soap UI, this element is not being treated as an array. </p>
  
  <p>When I removed <strong>type=Integer.class</strong> from the annotation, I started getting <strong>maxOccurs="unbounded"</strong> in the XML.</p>
  
  <p><strong>@XmlElement(required=true)</strong> generated below element:</p>
  
  <pre><code>&lt;xsd:element name="testArrayInt" type="xsd:int" maxOccurs="unbounded"/&gt;
  </code></pre>
  
  <p>But I need this <strong><em>type</em></strong> specially for primitive datatypes. Without <strong><em>type</em></strong> in annotation, <strong>minOccurs=1</strong> gets missing for elements which are <strong>not required (i.e. required =true is not set)</strong>.</p>
  
  <p>Can someone help me in this? </p>