title: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:""). Expected elements are
body: <p>You can find a lot of questions like this in this site but none has solved my issue.</p>
  
  <p>This is my XML :</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8' standalone='yes'?&gt;
  &lt;lookupInstances xmlns='http://www.pqr.com/awd/rest/v1' name='LKIMGR'&gt;
  &lt;lookupParameters&gt;
  &lt;lookupParameter name='businessArea'&gt;PQAA&lt;/lookupParameter&gt;
  &lt;lookupParameter name='MEMBERNUMBER'&gt;ANTHONY1900&lt;/lookupParameter&gt;
  &lt;/lookupParameters&gt;
  &lt;/lookupInstances&gt;
  </code></pre>
  
  <p>I have created the Jaxb class using the XJC compiler and the file created is as :</p>
  
  <pre><code>//
  // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 
  // See &lt;a href="http://java.sun.com/xml/jaxb"&gt;http://java.sun.com/xml/jaxb&lt;/a&gt; 
  // Any modifications to this file will be lost upon recompilation of the source schema. 
  // Generated on: 2015.01.13 at 12:15:41 PM IST 
  //
  
  
  package com.dsths.ga.awd.main;
  
  import javax.xml.bind.annotation.XmlAccessType;
  import javax.xml.bind.annotation.XmlAccessorType;
  import javax.xml.bind.annotation.XmlAttribute;
  import javax.xml.bind.annotation.XmlElement;
  import javax.xml.bind.annotation.XmlRootElement;
  import javax.xml.bind.annotation.XmlType;
  
  
  /**
   * &lt;p&gt;Java class for anonymous complex type.
   * 
   * &lt;p&gt;The following schema fragment specifies the expected content contained within this class.
   * 
   * &lt;pre&gt;
   * &amp;lt;complexType&gt;
   *   &amp;lt;complexContent&gt;
   *     &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
   *       &amp;lt;sequence&gt;
   *         &amp;lt;element name="lookupParameters"&gt;
   *           &amp;lt;complexType&gt;
   *             &amp;lt;complexContent&gt;
   *               &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
   *                 &amp;lt;sequence&gt;
   *                   &amp;lt;element name="lookupParameter"&gt;
   *                     &amp;lt;complexType&gt;
   *                       &amp;lt;complexContent&gt;
   *                         &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
   *                           &amp;lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
   *                         &amp;lt;/restriction&gt;
   *                       &amp;lt;/complexContent&gt;
   *                     &amp;lt;/complexType&gt;
   *                   &amp;lt;/element&gt;
   *                 &amp;lt;/sequence&gt;
   *               &amp;lt;/restriction&gt;
   *             &amp;lt;/complexContent&gt;
   *           &amp;lt;/complexType&gt;
   *         &amp;lt;/element&gt;
   *       &amp;lt;/sequence&gt;
   *       &amp;lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
   *     &amp;lt;/restriction&gt;
   *   &amp;lt;/complexContent&gt;
   * &amp;lt;/complexType&gt;
   * &lt;/pre&gt;
   * 
   * 
   */
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "", propOrder = {
      "lookupParameters"
  })
  @XmlRootElement(name = "lookupInstances")
  public class LookupInstances {
  
      @XmlElement(required = true)
      protected LookupInstances.LookupParameters lookupParameters;
      @XmlAttribute
      protected String name;
  
      /**
       * Gets the value of the lookupParameters property.
       * 
       * @return
       *     possible object is
       *     {@link LookupInstances.LookupParameters }
       *     
       */
      public LookupInstances.LookupParameters getLookupParameters() {
          return lookupParameters;
      }
  
      /**
       * Sets the value of the lookupParameters property.
       * 
       * @param value
       *     allowed object is
       *     {@link LookupInstances.LookupParameters }
       *     
       */
      public void setLookupParameters(LookupInstances.LookupParameters value) {
          this.lookupParameters = value;
      }
  
      /**
       * Gets the value of the name property.
       * 
       * @return
       *     possible object is
       *     {@link String }
       *     
       */
      public String getName() {
          return name;
      }
  
      /**
       * Sets the value of the name property.
       * 
       * @param value
       *     allowed object is
       *     {@link String }
       *     
       */
      public void setName(String value) {
          this.name = value;
      }
  
  
      /**
       * &lt;p&gt;Java class for anonymous complex type.
       * 
       * &lt;p&gt;The following schema fragment specifies the expected content contained within this class.
       * 
       * &lt;pre&gt;
       * &amp;lt;complexType&gt;
       *   &amp;lt;complexContent&gt;
       *     &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
       *       &amp;lt;sequence&gt;
       *         &amp;lt;element name="lookupParameter"&gt;
       *           &amp;lt;complexType&gt;
       *             &amp;lt;complexContent&gt;
       *               &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
       *                 &amp;lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
       *               &amp;lt;/restriction&gt;
       *             &amp;lt;/complexContent&gt;
       *           &amp;lt;/complexType&gt;
       *         &amp;lt;/element&gt;
       *       &amp;lt;/sequence&gt;
       *     &amp;lt;/restriction&gt;
       *   &amp;lt;/complexContent&gt;
       * &amp;lt;/complexType&gt;
       * &lt;/pre&gt;
       * 
       * 
       */
      @XmlAccessorType(XmlAccessType.FIELD)
      @XmlType(name = "", propOrder = {
          "lookupParameter"
      })
      public static class LookupParameters {
  
          @XmlElement(required = true)
          protected LookupInstances.LookupParameters.LookupParameter lookupParameter;
  
          /**
           * Gets the value of the lookupParameter property.
           * 
           * @return
           *     possible object is
           *     {@link LookupInstances.LookupParameters.LookupParameter }
           *     
           */
          public LookupInstances.LookupParameters.LookupParameter getLookupParameter() {
              return lookupParameter;
          }
  
          /**
           * Sets the value of the lookupParameter property.
           * 
           * @param value
           *     allowed object is
           *     {@link LookupInstances.LookupParameters.LookupParameter }
           *     
           */
          public void setLookupParameter(LookupInstances.LookupParameters.LookupParameter value) {
              this.lookupParameter = value;
          }
  
  
          /**
           * &lt;p&gt;Java class for anonymous complex type.
           * 
           * &lt;p&gt;The following schema fragment specifies the expected content contained within this class.
           * 
           * &lt;pre&gt;
           * &amp;lt;complexType&gt;
           *   &amp;lt;complexContent&gt;
           *     &amp;lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
           *       &amp;lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" /&gt;
           *     &amp;lt;/restriction&gt;
           *   &amp;lt;/complexContent&gt;
           * &amp;lt;/complexType&gt;
           * &lt;/pre&gt;
           * 
           * 
           */
          @XmlAccessorType(XmlAccessType.FIELD)
          @XmlType(name = "")
          public static class LookupParameter {
  
              @XmlAttribute
              protected String name;
  
              /**
               * Gets the value of the name property.
               * 
               * @return
               *     possible object is
               *     {@link String }
               *     
               */
              public String getName() {
                  return name;
              }
  
              /**
               * Sets the value of the name property.
               * 
               * @param value
               *     allowed object is
               *     {@link String }
               *     
               */
              public void setName(String value) {
                  this.name = value;
              }
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>Unmarshal Code :</p>
  
  <pre><code>    public LookupInstances unmarshallXmlRequest(String xmlReq)
      {
          LookupInstances instances = null;
             try {
              JAXBContext jc = JAXBContext.newInstance( LookupInstances.class );
                 Unmarshaller u = jc.createUnmarshaller();
                 StringBuffer xmlStr = new StringBuffer( xmlReq );
                 StringReader strReader = new StringReader( xmlStr.toString() );
                 StreamSource strSource = new StreamSource(strReader);
                 Object o = u.unmarshal( strSource );
                 instances = (LookupInstances)o;
          } catch (JAXBException e) {
  
              e.printStackTrace();
          }
          return instances;
      }
  </code></pre>
  
  <p>I got this error :</p>
  
  <pre><code>javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.pqr.com/awd/rest/v1", local:"lookupInstances"). Expected elements are &lt;{}lookupInstances&gt;
  </code></pre>
  
  <p><strong>Please help.</strong></p>