I have generated Java classes from XSD, all works fine from a unmarshalling point of view.
However, when I marshall from JAXB classes I get the following:
You can use the @XmlSchema annotation on a package-info class to assign a prefix to the namespace:
@XmlSchema(
namespace = "http://poc.cmc.com/ScreenLayout",
elementFormDefault = XmlNsForm.QUALIFIED,
xmlns={@XmlNs(prefix="ns0", namespaceURI="http://poc.cmc.com/ScreenLayout")})
package your.package;
import javax.xml.bind.annotation.*;