users@jaxb.java.net

Re: ns2 issue

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 16 Jan 2007 14:47:57 -0800

Hi,

As long as all the JAXB implementations involved (be it one in JDK6, the
JAXB RI, or a JAXB implementation from some other vendors) implement
JAXB 2.0, you should be able to use one for development for another for
deployment.

This is particularly true between JDK6 and the JAXB RI, because they are
essentially derived from the same codebase. So I doubt if that's really
the root cause of the issue.

JAXB using "ns2" as the namespace prefix by itself is not a bug.
Prefixes are just proxies, and machines don't care whether prefixes have
any relation to English words or not at all. They are just the same.

If you'd like JAXB to use more human-friendly prefixes, however, we let
you do so, too. Just look at the namespace-prefix sample in the JAXB RI
distribution.

You haven't gave us the exact nature of the "misqualifying" problem, so
I can't say what might be causing it. However, often the perceived
problem is simply that the user misunderstood the XML namespace
recommendation. I'm not saying you are, but I'm just saying in general
it's the #1 "cause" of this issue. For this, I recommend
http://www.jclark.com/xml/xmlns.htm

If you still experience problems, please explain more details about the
problem. We are happy to help.

Dovholuk, Clint wrote:
> Hello all,
>
> I'm sending this email to the distribution list in hopes that someone
> else who has a problem with jaxb qualifying the root element with "ns2"
> (or sometimes MIS-qualifying it) has the same problem we have and as a
> general fyi to the community.
>
> In our scenario this was not a bug with JAXB (well - at least I don't
> "think" so). We use jaxb to generate class files to consume POX
> services. Those class files are compiled into a jar and included with
> our war. During the last release cycle - the compiled jar file was
> compiled with java 6, but we were still using java 5 for production. As
> such, the compiled class files were compiled with a different version of
> jaxb (due to inclusion with java 6).
>
> These classes would "pretty much" work in production but the xml would
> either be wrong or entirely qualified with ns2.
>
> I just wanted to share this to the distro to give other people out there
> who run into similar issues one more thing to "rule out".
>
> Thanks,
> -Clint
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com