users@jaxb.java.net

Re: Again: Problem with namespaces in jaxb generated files

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_sun.com>
Date: Wed, 06 Nov 2002 10:42:32 -0500

Hi Zoltan,

You're right - we aren't maintaining the namespace prefix across unmarshal/marshal
operations yet. There currently isn't anyway to change this behavior.

Thanks for the feedback...

--Ryan

Zoltan Sebestyen wrote:
> Hi,
>
> I think I'm a bit closer to the solution of my problem, but since I'm a newbie to both XML and JAXB, I still seek for some help.
> So, I think to reason behind this 'ns1' namespace problem is that the XSD and the original XML file defines the namespace so that it does not assign any prefix to it. JAXB thinks it's a failure and kindly assigns the default 'ns1' namespace prefix.
>
> The original namespace definition:
>
> xmlns="http://www.mx.com/Schemas/2002/Service"
>
> The JAXB 'ns1' namespace definition:
>
> xmlns:ns1="http://www.mx.com/Schemas/2002/Service"
>
> Can be this behavior disabled somehow?
>
> Regards,
>
> Zoltan
>