title: Generating Java classes from WSDL with complex types using Axis2
body: <p>I have a web service built in .NET (2.0 I believe), and the WSDL for it was auto-generated by the framework. I'm trying to build a Java client to it, and using Axis2's wsdl2java to generate the stub classes with the ADB databinding (primarily because the lead partner for this client has been doing the same thing for services written in Java).</p>
  
  <p>The WSDL contains a number of complex types that look like this...snippet:</p>
  
  <pre><code>&lt;s:sequence&gt;
    &lt;s:element minOccurs="1" maxOccurs="1" name="ID" type="s:long" /&gt; 
    &lt;s:element minOccurs="0" maxOccurs="1" name="PRODUCT_NAME"&gt;
     &lt;s:complexType mixed="true"&gt;
      &lt;s:sequence&gt;
       &lt;s:any /&gt; 
      &lt;/s:sequence&gt;
     &lt;/s:complexType&gt;
    &lt;/s:element&gt;
     ...
  </code></pre>
  
  <p>In the SOAP messages, those fields would all have CDATA tags-- </p>
  
  <pre><code>&lt;PRODUCT_NAME&gt;&lt;![CDATA[test]]&gt;&lt;/PRODUCT_NAME&gt;
  </code></pre>
  
  <p>When wsdl2java generates the code to consume this service, these fields are defined as being of types like PRODUCT_NAME_type0, and they expect to find PRODUCT_NAME_type0 as a tag in the SOAP response. Having it the Java code is a bummer, but expecting it to be in the SOAP response is causing errors. Is there a flag for wsdl2java that would change this behavior? Do I have to use a different binding? Different tool?</p>