Hi
I have a schema with following attributes in schema element:
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:abc="http://abc.example.com" targetNamespace="http://abc.example.com" elementFormDefault="qualified" attributeFormDefault="unqualified">
I could compile it and get java classes. Using these classes, I filled in data in an object and marshalled it to get an XML file.
But the XML elements in this marshalled file is not having the prefix "abc".
I tweaked a little using XMLStreamWriter.setPrefix while marshalling, and I could get the XML file with all elements prefixed as "abc".
Now when I try to unmarshall the same XML file, it throws error saying :
[org.xml.sax.SAXParseException: The prefix "abc" for element "abc:Name" is not bound.]
Please help me in how to let JAXB know that abc is correct prefix.
Thank You Pradeep