On my current project we generate JAXB beans from an XSD file.
We need line number information on the beans (beyond XSD validation errors!) so I used the -Xlocator option specified here:
http://java.sun.com/webservices/docs/1.6/jaxb/xjc.html
However, I’m missing the Locator class. The jar file referenced to on that six-year old page can’t be found anywhere, as I don’t see a download for JWSDP on any site at all.
Is XJC dead? Should I be using something else?
Edit: solution has to use Java 1.5
I found the problem, or at least part of it. XJC generates imports to the “internal” package versions of XmlLocation and Locatable. Don’t ask me why!
I wrote a little script to replace these imports with the correct ones, and it seems to work fine now.