More Notes on JAXB and XML

1.6 vs. 1.5
I recently upgraded JWSDP to version 1.6, and I've had problems with it.
Simply going back to 1.5 seems to have fixed things up. If I get
ambitious, I'll see if I can figure out what's going on. I was getting an
exception containing the following string:
Javax/xml/validation/Schema
I notice in the
release
notes for JWSDP 1.6 that a bunch of the JAR file includes have changed, but
that didn't seem to fix my problem.
Including JAXB Code in the Same Eclipse Project
In my other examples, I suggest putting the JAXB code in its own Eclipse
project. This is nice, but if you'd prefer not to do it this way, it is
possible just to place it in the same project. Here's a few quick notes:
- Create an exclude\jaxb directory in the root of your Eclipse
project
- Place your .xsd file in there
- Copy this jaxb-doit.bat file in there
and edit it appropriately
- Run it
- Copy com/bitrazor/netflixrss/jaxb (or whatever your path is) to
the corresponsding src/ path in your Eclipse project
- Add the external JARs indicated by the
release notes (jaxb-*.jar,
jax-qname,jar, etc.) to your Eclipse project (more
help on this)
- In Eclipse, right-click your project and do Refresh
- Project - Clean (just to be on the safe side)
Changing Schema/Updating
If you find it necessary to change your schema and regenerate your JAXB code,
simply delete the previously generated code in exclude\jaxb, copy in the new .xsd,
and repeat the steps above.
|