Wrong annotation type after JAXB generation
<p>After JAXB generation I have a class that includes wrong type for my int array, it annotates it with Integer type instead of int[].</p>

<p>here is my XSD:</p>

<pre><code>&lt;complexType name="GenericChartTask"&gt;
    &lt;sequence&gt;
        &lt;element name="clients" type="struct:IDNameSiteServiceImageIndex"
            maxOccurs="unbounded" minOccurs="0"&gt;
        &lt;/element&gt;
        &lt;element name="commonTasks" type="struct:NameAndID"
            maxOccurs="unbounded" minOccurs="0"&gt;
        &lt;/element&gt;
        &lt;element name="groups" type="int" maxOccurs="unbounded"
            minOccurs="0"&gt;&lt;/element&gt;
        &lt;element name="siteServices" type="struct:SiteService"
            maxOccurs="unbounded" minOccurs="0"&gt;
        &lt;/element&gt;
    &lt;/sequence&gt;
&lt;/complexType&gt;
</code></pre>

<p>And here is what I get after generation:</p>

<pre><code>public class GenericChartTask {

    @XmlElement(namespace = "http://american-data.com/ecs/struct")
    protected ad.ecs.struct.IDNameSiteServiceImageIndex[] clients;
    @XmlElement(namespace = "http://american-data.com/ecs/struct")
    protected ad.ecs.struct.NameAndID[] commonTasks;
    @XmlElement(namespace = "http://american-data.com/ecs/struct", type = Integer.class)
    protected int[] groups;
    @XmlElement(namespace = "http://american-data.com/ecs/struct")
    protected ad.ecs.struct.SiteService[] siteServices;
    ...
</code></pre>

<p>I also have a binding to generate the array instead of the list, since JAXB doesn't want to generate legal bean (it drops setters for lists).</p>

<pre><code>&lt;jxb:bindings node="//xs:element[@name='groups']"&gt;
    &lt;jxb:property collectionType="indexed" /&gt;
&lt;/jxb:bindings&gt;
</code></pre>

<p>My question would be, Is there any way to get rid of that faulty part <strong>type = Integer.class</strong>? Because its causing problems when I want to deserialize my JSON for this object.</p>