title: xml namespace to java, how to model 'choice'?
body: <p>What is the best way to represent in java a "choice" namespace tag?
  ie.</p>
  
  <pre><code>&lt;xs:complexType name="MyType"&gt;
    &lt;xs:sequence&gt;
      &lt;!-- common elements here --&gt;
      &lt;xs:element type="xs:string" name="name" ... /&gt;
    &lt;/xs:sequence&gt;
    &lt;xs:choice&gt;
      &lt;xs:element name="stringValue" type="xs:string"&gt;&lt;/xs:element&gt;
      &lt;xs:element name="intValue" type="xs:int"&gt;&lt;/xs:element&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>How do I model this in Java? I was thinking about something like:</p>
  
  <pre><code>public class MyType
    String name;
  
    String stringValue;
    int intValue;
  ...
  </code></pre>
  
  <p>but this is sure not the best way, or I am wrong? Plus, if I want to expose services with Axis2 which use that type, do I need to implement some custom message receiver?</p>