title: javax.xml.bind.UnmarshalException: Unexpected element. What am i missing?
body: <p>I am doing this,</p>
  
  <pre><code>JAXBContext jaxbContext = JAXBContext.newInstance(new Class[] { 
        mine.beans.ObjectFactory.class }); 
  Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
  orderhistory = (OrderHistory) unmarshaller.unmarshal(new StreamSource(
        new StringReader(responseXML)));`
  </code></pre>
  
  <p>I am getting <code>javax.xml.bind.UnmarshalException: Unexpected element "OrderHistory". Expected elements are "{_http://orderhistory.shc.com/common/domain}OrderHistory".</code> but i checked my OrderHistory.java i have the</p>
  
  <pre><code>@XmlRootElement(name = "OrderHistory")
  public class OrderHistory{
  </code></pre>
  
  <p>What am i missing???</p>
  
  <p>Even the package-info.java file is also present </p>
  
  <p>Here is my response xml,<br/>
  <code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code><br/>
    <code>&lt;OrderHistory&gt;</code><br/>
    <code>&lt;guid&gt;5555&lt;/guid&gt;</code><br/>
    <code>&lt;syNumber xsi:nil="true"&gt;&lt;/syNumber&gt;</code><br/>
   <code>&lt;email xsi:nil="true"&gt;&lt;/email&gt;</code><br/>
    <code>&lt;totalPages&gt;0&lt;/totalPages&gt;</code><br/>
  <code>&lt;/OrderHistory&gt;</code><br/></p>
  
  <p>Still i am facing the same issue???</p>
  
  <p>I ve made changes to my package-info.java i have removed the namespace attribute but still i am seeing the same issue,</p>
  
  <p><code>@javax.xml.bind.annotation.XmlSchema()
  package mine.beans;</code></p>