title: axis2 "unexpected subelement value"
body: <p>I'm trying to use Axis2 to connect to a SOAP webservice. This was previously working in Axis 1, but 2 is causing problems. I've regenerated the Java code using <code>wsdl2java</code> which has generated the stubs for Axis2, but it's falling over when processing an element of the server response with "unexpected subelement value".</p>
  
  <p>The fragment of the wsdl document in question is:</p>
  
  <pre><code>&lt;complexType name="A"&gt;
  &lt;sequence&gt;
  &lt;element name="a" type="xsd:base64Binary" minOccurs="1" maxOccurs="1" nillable="false" /&gt;
  &lt;element name="b" type="xsd:string" minOccurs="1" maxOccurs="1" /&gt;
  &lt;element name="c" type="xsd:string" minOccurs="1" maxOccurs="1" /&gt;
  &lt;element name="d" type="xsd:string" minOccurs="1" maxOccurs="1" /&gt;
  &lt;element name="e" type="xsd:string" minOccurs="1" maxOccurs="1" /&gt;
  &lt;element name="f" type="xsd:string" minOccurs="1" maxOccurs="1" /&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  </code></pre>
  
  <p>The response being returned looks like:</p>
  
  <pre><code>&lt;stuff&gt;
  &lt;a&gt;dsfusdbifsdisuibvuidnfuisndfvl\sbvuidn&lt;/a&gt;
  &lt;b&gt;string&lt;/b&gt;
  &lt;c&gt;string&lt;/c&gt;
  &lt;d&gt;string&lt;/d&gt;
  &lt;e&gt;string&lt;/e&gt;
  &lt;f&gt;string&lt;/f&gt;
  &lt;/stuff&gt;
  &lt;stuff&gt;
  &lt;a&gt;dsfusdbifsdisdfsfsdfsdfuibvuidnfuisndfvl\dfgd&lt;/a&gt;
  &lt;b&gt;string&lt;/b&gt;
  &lt;c&gt;string&lt;/c&gt;
  &lt;d&gt;string&lt;/d&gt;
  &lt;e&gt;string&lt;/e&gt;
  &lt;f&gt;string&lt;/f&gt;
  &lt;/stuff&gt;
  &lt;stuff&gt;
  &lt;a&gt;dsfusdbifsdisuibvuidnfuisndfvl\sdfsdfvv&lt;/a&gt;
  &lt;b&gt;string&lt;/b&gt;
  &lt;c&gt;string&lt;/c&gt;
  &lt;d&gt;string&lt;/d&gt;
  &lt;e&gt;string&lt;/e&gt;
  &lt;f&gt;string&lt;/f&gt;
  &lt;/stuff&gt;
  &lt;stuff&gt;
  &lt;a&gt;wwasdfgfbdfb\sbv==uidn&lt;/a&gt;
  &lt;b&gt;string&lt;/b&gt;
  &lt;c&gt;string&lt;/c&gt;
  &lt;d&gt;string&lt;/d&gt;
  &lt;e&gt;string&lt;/e&gt;
  &lt;f&gt;string&lt;/f&gt;
  &lt;/stuff&gt;
  </code></pre>
  
  <p>sort of thing. Most of these <code>&lt;stuff&gt;</code> blocks process fine, but the last one fails on <code>&lt;b&gt;</code> with the above error. Debugging the code, it fails because <code>reader.isStartElement()</code> returns false and <code>new javax.xml.namespace.QName("","b").equals(reader.getName())</code> is false - <code>reader.getName()</code> returns "a". Debugging further, <code>reader.currentElement</code> reports "<b>string</b>" instead of the wrapped object type it usually returns. I have tried this with Axiom 1.2.7 and 1.2.8 - both seem to suffer from the same problem. Is this a known bug, or can anybody shed light on what might be going on?</p>