title: Why classes generated by wsimport requires JAXBElement<ClassName> parameters?
body: <p>I have a WSDL file which is from an Axis2 Web Service. When I generate a client stub using <code>wsimport</code> given the WSDL file, the resulting classes require <code>JAXBElement</code> paramaters. Why is it like that?</p>
  
  <p>Sample Method from one of the Generated Classes:</p>
  
  <pre><code>JAXBElement&lt;DataBean&gt; value;
  
  public void setValue(JAXBElement&lt;DataBean&gt; value)
  {
      this.value = ((JAXBElement&lt;DataBean&gt;) value);
  }
  </code></pre>
  
  <p>I am expecting it to look like this (without the JAXBElement):</p>
  
  <pre><code>DataBean value;
  
  public void setValue(DataBean value)
  {
      this.value= (DataBean) value;
  }
  </code></pre>
  
  <p>The tutorials I saw on the net does not set the classes to JAXBElement. What could be the problem? Please take note that the server is an Axis2 web service and the WSDL file is auto-generated by Axis2. The assumption is I have no control over the server.</p>
  
  <p>How can I make it in such a way that <code>wsimport</code> won't convert the parameters to JAXBElements?</p>
  
  <p>Below is an excerpt from the WSDL file: (I ignored some of the tags to include only the essential tags)</p>
  
  <pre><code>&lt;xs:element name="getData"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element minOccurs="0" name="getData" nillable="true" type="ax220:getData"/&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;xs:complexType name="getData"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element minOccurs="0" name="value" nillable="true" type="ax219:DataBean"/&gt;
      &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
  
  &lt;wsdl:message name="getDataRequest"&gt;
      &lt;wsdl:part name="parameters" element="ns:getData"/&gt;
  &lt;/wsdl:message&gt;
  
  &lt;wsdl:message name="getDataResponse"&gt;
      &lt;wsdl:part name="parameters" element="ns:getDataResponse"/&gt;
  &lt;/wsdl:message&gt;
  
  &lt;wsdl:operation name="getData"&gt;
      &lt;wsdl:input message="ns:getDataRequest" wsaw:Action="urn:getData"/&gt;
      &lt;wsdl:output message="ns:getDataResponse" wsaw:Action="urn:getDataResponse"/&gt;
  &lt;/wsdl:operation&gt;
  
  &lt;wsdl:operation name="getData"&gt;
      &lt;soap:operation soapAction="urn:getData" style="document"/&gt;
      &lt;wsdl:input&gt;
          &lt;soap:body use="literal"/&gt;
      &lt;/wsdl:input&gt;
      &lt;wsdl:output&gt;
          &lt;soap:body use="literal"/&gt;
      &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  
  &lt;wsdl:operation name="getData"&gt;
      &lt;soap12:operation soapAction="urn:getData" style="document"/&gt;
      &lt;wsdl:input&gt;
          &lt;soap12:body use="literal"/&gt;
      &lt;/wsdl:input&gt;
      &lt;wsdl:output&gt;
          &lt;soap12:body use="literal"/&gt;
      &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  
  &lt;wsdl:operation name="getData"&gt;
      &lt;http:operation location="getData"/&gt;
      &lt;wsdl:input&gt;
          &lt;mime:content type="text/xml" part="parameters"/&gt;
      &lt;/wsdl:input&gt;
      &lt;wsdl:output&gt;
          &lt;mime:content type="text/xml" part="parameters"/&gt;
      &lt;/wsdl:output&gt;
  &lt;/wsdl:operation&gt;
  </code></pre>