title: unexpected element (uri:"", local:""). Expected elements are (none)
body: <p>I am not able to map response xml to java generated by xsd using cxf-xjc-plugin.</p>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
                  &lt;artifactId&gt;cxf-xjc-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;extensions&gt;
                          &lt;extension&gt;org.apache.cxf.xjcplugins:cxf-xjc-dv:2.3.0&lt;/extension&gt;
                      &lt;/extensions&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;generate-sources-trans&lt;/id&gt;
                          &lt;phase&gt;generate-sources&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;xsdtojava&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;sourceRoot&gt;${basedir}/src/main/java&lt;/sourceRoot&gt;
                              &lt;xsdOptions&gt;
                                  &lt;xsdOption&gt;
                                      &lt;xsd&gt;src/main/resources/Response.xsd&lt;/xsd&gt;
                                      &lt;packagename&gt;com.test.response&lt;/packagename&gt;
                                      &lt;extensionArgs&gt;
                                          &lt;extensionArg&gt;-Xdv&lt;/extensionArg&gt;
                                      &lt;/extensionArgs&gt;
                                  &lt;/xsdOption&gt;                                
                                  &lt;/xsdOption&gt;
                              &lt;/xsdOptions&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  
  <p>Response.xsd    </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;schema targetNamespace="urn:automatedIDgenerationResponse" xmlns:tns="urn:automatedIDgenerationResponse" xmlns="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;!-- definition of simple elements --&gt;
      &lt;complexType name="generatedIDs"&gt;
              &lt;sequence&gt;
                  &lt;element name="idType" type="string"/&gt;
                  &lt;element name="id" type="string"/&gt;
              &lt;/sequence&gt;
      &lt;/complexType&gt;
      &lt;element name="automatedIDgenerationResponse" type="tns:automatedIDResponse"/&gt;
      &lt;complexType name="automatedIDResponse"&gt;
          &lt;sequence&gt;
              &lt;element name="requestID" type="string" nillable="false"/&gt;
              &lt;element name="status" type="string" nillable="false"/&gt;
              &lt;element name="errorCode" type="int" nillable="false"/&gt;
              &lt;element name="errorText" type="string" nillable="true"/&gt;
              &lt;element name="timestamp" type="string" nillable="true"/&gt;
              &lt;element name="generatedIDs" type="tns:generatedIDs"  maxOccurs="unbounded"  /&gt;
          &lt;/sequence&gt;
      &lt;/complexType&gt;
  &lt;/schema&gt;
  </code></pre>
  
  <p>AutomatedIDResponse.java</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "automatedIDResponse", propOrder = {
      "requestID",
      "status",
      "errorCode",
      "errorText",
      "timestamp",
      "generatedIDs"
  })
  public class AutomatedIDResponse {
  
      @XmlElement(required = true)
      protected String requestID;
      @XmlElement(required = true)
      protected String status;
      protected int errorCode;
      @XmlElement(required = true, nillable = true)
      protected String errorText;
      @XmlElement(required = true, nillable = true)
      protected String timestamp;
      @XmlElement(required = true)
      protected List&lt;GeneratedIDs&gt; generatedIDs;
  
      //getter setter
  }
  </code></pre>
  
  <p>GeneratedIDs.java</p>
  
  <pre><code>@XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "generatedIDs", propOrder = {
      "idType",
      "id"
  })
  public class GeneratedIDs {
  
      @XmlElement(required = true)
      protected String idType;
      @XmlElement(required = true)
      protected String id;
      //getter-setter
  }   
  </code></pre>
  
  <p>main.java</p>
  
  <pre><code>public static void main(String[] args) {
          try {
          String xml=&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;
                      &lt;ns3:automatedIDgenerationResponse xmlns:ns2="urn:automatedIDgeneration" xmlns:ns3="urn:automatedIDgenerationResponse"&gt;
                          &lt;requestID&gt;432012&lt;/requestID&gt;
                          &lt;status&gt;Failure&lt;/status&gt;
                          &lt;errorCode&gt;7000&lt;/errorCode&gt;
                          &lt;errorText&gt;002098 The subscriber name already exists in the database. [code 2]&lt;/errorText&gt;
                          &lt;timestamp&gt;Thu Aug 03 12:37:24 BST 2017&lt;/timestamp&gt;
                      &lt;/ns3:automatedIDgenerationResponse&gt;;
  
  
          StringReader reader = new StringReader(xml);
          JAXBContext jaxbContext2 = JAXBContext.newInstance(AutomatedIDResponse.class);
          Unmarshaller jaxbUnmarshaller2 = jaxbContext2.createUnmarshaller();
          AutomatedIDResponse obj = (AutomatedIDResponse) jaxbUnmarshaller2.unmarshal(reader);
          }catch (JAXBException e) {
              System.out.println("JAXBException" + e);
          }
      }
  </code></pre>
  
  <p>error :</p>
  
  <pre><code>JAXBExceptionjavax.xml.bind.UnmarshalException: unexpected element (uri:"urn:automatedIDgenerationResponse", local:"automatedIDgenerationResponse"). Expected elements are (none)
  </code></pre>