Note: I'm the EclipseLink JAXB (MOXy) lead and a member of the JAXB (JSR-222) expert group.
JAXB does not provide an alternative to how you have described XmlBeans.compileXsd()
. The only expression of the metadata is through the annotations. You could use the JAXB APIs to generate an XML schema (see: http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JAXB/GenerateSchema), but you would require another tool to interpret it in the way you are looking for.