How to set the default namespace using JAXB
问题 I have a ATOM-XML representation of my data that is returned via a Spring MVC web service. I'm using JAXB to do the serialization, I have a number of namespaces but I want the default namespace set to Atom with no prefix. Here is what I have so far in package-info.java but the atom prefix is being set to ns3. @XmlSchema(namespace = com.mycomponay.foo.ATOM_NAMESPACE, xmlns = { @XmlNs(prefix = "foo", namespaceURI = com.mycomponay.foo.NAMESPACE_FOO), }, elementFormDefault = javax.xml.bind