users@jaxb.java.net

Re: unexpected root element!

From: Kohsuke Kawaguchi <kohsuke.kawaguchi_at_sun.com>
Date: Tue, 13 Dec 2005 11:40:18 -0800

Mohsen Emami-Nouri wrote:
> Hi,
>
> I am using 1.0.5 RI.I successfully used jxc to create java classes out of
> schemas (these schemas include other schemas) . When I am trying to unmarshall a
> sample XML, I get a exception.

I'm thinking that the error message is pretty self-explanatory.

It says "I was expecting one of these elements but instead found this",
and sure enough, if you look at it, one of the expected element is:

<{http://www.ecma-international.org/standards/ecma-323/csta/ed3}RequestSystemStatus>

whereas it saw:

(uri:"http://www.ecma-international.org/standard/ecma-323/csta/ed3",
local:"RequestSystemStatus").

If you compare two namespace URIs carefully:

   http://www.ecma-international.org/standard/ecma-323/csta/ed3
   http://www.ecma-international.org/standards/ecma-323/csta/ed3

and now you know why it's an error.


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com