I\'ve been using com.sun.xml.bind.marshaller.NamespacePrefixMapper in my project, and i had no problem with it in JDK 6u17. Now I just updated to 6u18, and I sa
The NamespacePrefixMapper is not usable anymore.
Use the annotations in package-info.java:
@javax.xml.bind.annotation.XmlSchema(namespace = "http://nameSpaceUri"
, xmlns = {
@XmlNs(prefix = "myPrefix", namespaceURI = "http://nameSpaceUri")
}
, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package my.package.;
This works with the JAXB bundled with JDK7, for other JDK version update JAXB to 2.2.4.