Hi,
I need to set custom namespaces for the JAXB marshaller and one way is this:
Marshaller m = new Marshaller<T>(this, this.contextPath, getClassLoader());
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
m.setProperty("com.sun.xml.bind.namespacePrefixMapper", new
Kml.NameSpaceBeautyfier());
m.marshal(getObject(), writer);
where
final static class NameSpaceBeautyfier extends NamespacePrefixMapper
{
@Override
public String getPreferredPrefix(String namespaceUri, String
suggestion, boolean requirePrefix)
{...}
}
Are you aware of any other way for the JAXB extension to support custom
namespaces?
Thank you,
Emanuele
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2784642