users@jaxb.java.net

Re: default namespace problem

From: hotwater <nabble_at_funfab.com>
Date: Wed, 20 Feb 2008 12:02:17 -0800 (PST)

This was being caused by including a package in the context initialization
that wasn't used in the object to be marshalled. In NamespaceContextImpl,
JAXB assigns a namespace of "" for this package and that overrides any
previously set default namespace, causing it to use generated namespace for
the previous one instead. I don't understand why the unused package is
assigned a namespace of "" - it seems like it ought to just be ignored
altogether. Is it a JAXB bug? Anyway, to work around the problem, I
create a jaxb context without the package that I'm not going to use. And
when I do use that package, I create the jaxb context with that package.
-- 
View this message in context: http://www.nabble.com/default-namespace-problem-tp15579623p15597391.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.