users@jaxb.java.net

Namespace prefix for schemas?

From: Brian Matzon <brian_at_matzon.dk>
Date: Thu, 18 Dec 2008 10:47:09 +0100

Hi

According to https://jaxb.dev.java.net/guide/Changing_prefixes.html I can
set a property called "com.sun.xml.bind.namespacePrefixMapper" to change
the namespace prefix mapper. However, this only seems to work for
marshalling. I get an error if I try to set the property on the context:

javax.xml.bind.JAXBException: property
"com.sun.xml.bind.namespacePrefixMapper" is not supported
        at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:114)

How do I change the namespace prefixes for schemas generated through
JAXBContext.generateSchema?

/matzon