title: How can I set the schema in a wsdl to correctly parse a list of items?
body: <p>I've searched intensively and didn't find how to address this: 
  I have a web service that needs to accept a list of items like this:</p>
  
  <pre><code>&lt;registrationform&gt;  
      ...
      ...
      &lt;registerdoclist&gt;
          &lt;registerdoc&gt;
              &lt;date&gt;2015-10-27&lt;/date&gt;
              &lt;doctype&gt;CC&lt;/doctype&gt;
              &lt;filename&gt;document1.pdf&lt;/filename&gt;
              &lt;filecontent&gt;JVBERi0xLjUNCi1tb1DQoxIDAg&lt;/filecontent&gt;
              &lt;extrainfo&gt;document A&lt;/extrainfo&gt;
          &lt;/registerdoc&gt;
          &lt;registerdoc&gt;
              &lt;date&gt;2015-10-27&lt;/date&gt;
              &lt;doctype&gt;CC&lt;/doctype&gt;
              &lt;filename&gt;document2.pdf&lt;/filename&gt;
              &lt;filecontent&gt;IHRydWU+Pj4+DQplbmRvYmoNCjI&lt;/filecontent&gt;
              &lt;extrainfo&gt;document b&lt;/extrainfo&gt;
          &lt;/registerdoc&gt;
      &lt;/registerdoclist&gt;
      ...
      ...
  &lt;/registrationform&gt;
  </code></pre>
  
  <p>The schema is configured this way (only relevant parts):</p>
  
  <pre><code>&lt;xs:element maxOccurs="unbounded" minOccurs="0" name="registerdoclist" nillable="true" type="tns:registerdoc"/&gt;
  
  
   &lt;xs:complexType name="registerdoc"&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:element  minOccurs="1" name="date"          type="xs:date"/&gt;
                  &lt;xs:element  minOccurs="1" name="doctype"       type="tns:Alfa3Type"/&gt;
                  &lt;xs:element  minOccurs="1" name="filename"      type="tns:Alfa255Type"/&gt;
                  &lt;xs:element  minOccurs="1" name="filecontent"   type="xs:base64Binary"/&gt;
                  &lt;xs:element  minOccurs="0" name="url"           type="tns:Alfa255Type"/&gt;
                  &lt;xs:element  minOccurs="0" name="extrainfo"     type="tns:Alfa255Type"/&gt;                    
              &lt;/xs:sequence&gt;
             &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>When I generate the webservice java objects, in the registration class, the registerdoclist seems to be ok, as it's a list of Registerdoc objects:</p>
  
  <pre><code>@XmlElement(nillable = true)
  protected List&lt;Registerdoc&gt; registerdoclist;
  </code></pre>
  
  <p>And the Registerdoc class:</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "registerdoc", propOrder = {
      "date",
      "doctype",
      "filename",
      "filecontent",
      "url",
      "extrainfo"
  })
  public class Registerdoc {
  
      @XmlElement(required = true, type = String.class)
      @XmlJavaTypeAdapter(SctdXmlGregorianCalendarAdapter.class)
      @XmlSchemaType(name = "date")
      protected XMLGregorianCalendar date;
      @XmlElement(required = true)
      protected String doctype;
      @XmlElement(required = true)
      protected String filename;
      @XmlElement(required = true)
      protected byte[] filecontent;
      protected String url;
      protected String extrainfo;
      ...
      ...
  </code></pre>
  
  <p>In the registrationform object I have a list named registerdoclist of registerdoc objects that apparently match the xml structure to parse, but when I call the webservice, I get this error:</p>
  
  <pre><code> &lt;faultstring&gt;&lt;![CDATA[Unmarshalling Error: unexpected element (uri:"", local:"registerdoc")
  </code></pre>
  
  <p>So, what's wrong with the schema and How can I configure it in a way that it parses correctly the sample xml in the list registerdoclist shown above? </p>