users@jaxb.java.net

RE: Re: unexpected root element!

From: Mohsen Emami-Nouri <Mohsen.Emami-Nouri_at_litescape.com>
Date: Tue, 13 Dec 2005 11:51:24 -0800

Yes, you are right, simple, I should have looked harder. Thanks a lot
for your help.

Best regards,
~Mohsen

-----Original Message-----
From: Kohsuke Kawaguchi [mailto:kohsuke.kawaguchi_at_sun.com]
Sent: Tuesday, December 13, 2005 11:40 AM
To: users_at_jaxb.dev.java.net
Subject: Re: unexpected root element!

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}RequestS
ystemStatus>

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