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