A single schema location is not sufficient. There may be schema imports or type references from other schemas.
The contract has been changed to pass a map of schema locations to the JAXB layer
// Get the xsdSchema location map Map<String, List<URL>> xsdURLMap = serContext.getSchemaLocations(); jaxbUnmarshaller.setProperty(JAXBConstants.JAXB_SCHEMA_LOCATION_MAP, xsdURLMap);
The JAXBMashallerImpl/JAXBUnmarshallerImpl needs to pass the map down to JBossXB. This needs to be done.
In future we don't want to be dealing with location URLs at all. JBossXB should be able to consume the JBossXSModel, which is the read/write version of the xerces XSModel, directly.
As I can see JBossXSModel implements XSModel. Since jbossxb internally uses XSModel, it's not an issue.
JBossXSModel (or XSModel) is the final built Schema Model that is built after taking XSD:include into consideration. If JAXB is just interested in the XSTypeDefinitions, then JBossXSModel will suffice. There is no need to pass in a set of schema urls to JAXB.
Alex, does JBossXSModel with types/elements/attributes suffice for your needs? Also, JBossXSModel has NamespaceItems which store the locations of the schema files that contributed to that model.
The post implies that your XSModel implementation is not complete? What's missing?
JBossXSModel is just a read/write based Xerces XSModel implementation. It is complete.