users@jaxb.java.net

RE: Re: Issue 29

From: Andrew Ferguson <Andrew.Ferguson_at_arm.com>
Date: Mon, 11 Oct 2004 18:20:18 +0100

Ryan,

 thanks very much - its working now and that's very good news :)

Andrew

-----Original Message-----
From: Ryan Shoemaker - JavaSoft East [mailto:Ryan.Shoemaker_at_Sun.COM]
Sent: 07 October 2004 21:33
To: users_at_jaxb.dev.java.net
Subject: Re: Issue 29

Andrew Ferguson wrote:
> hi,
>
> sometime in november I'm hoping to alpha an application using JAXB
> that is required to validate xml (as it's the entry point of data to
> some shared storage).
>
> Because of this, issue 29 is a real showstopper -

Hi Andrew,

The problem is that you aren't configuring the SAXParserFactory so that
it reports namespace info to the unmarshaller. Add this to your code
and everything should work fine:

     spf.setNamespaceAware(true);

I admit that the RI did a pretty shabby job at reporting the error.
Kohsuke and I discussed the issue and I committed a change that will
hopefully make the RI a little more flexible in these situations.
The fix will be available on Monday, but you won't need it if you flip
the namespace switch on your parser.


> in a couple of weeks
> time I'm anticipating that I'll be able to devote a few days to trying

> to learn more about whats going wrong here, but having looked at the
> xjc generated java files am already feeling intimidated :)
>

Welcome to the club ;8-)

> Is there any documentation giving an overview about how the generated
> files work and interact with each other and the underlying sax parser?
> Or are there any other docs that might help with this?
>

Unfortunately not. This is kind of a gray area where we moved code that
used to be bundled in the jaxb jars into the client runtime.
The reason we did this was to make it easier for us to modify things in
the RI between releases without impacting backwards compatibility.
As a result, we exposed a lot of the gory details of the RI to curious
end users. Hopefully, not many people will have to look at that code to
figure out what's going on.

I'm going to close issue 29. Feel free to reopen it if you run into any
other problems.

Thanks,

--Ryan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net