Given the following structure of base xsd:s and imports, it can be hard to use it in some frameworks.
- base-types.xsd
- special-types.xsd (imports base-types.xsd)
- web-service1.xsd (request and response structures, imports base-types.xsd and special-types.xsd)
- web-service1.wsdl (imports webservice.xsd)
A solution is to avoid schemaLocation in the special-types.xsd file.
So special-types.xsd without schemaLocation:
<xs:import namespace="http://example.org/base-types/v1"/>
and web-service1.xsd with schemaLocation:
<xs:import namespace="http://example.org/base-types/v1"
schemaLocation="base-types.xsd"/>
<xs:import namespace="http://example.org/special-types/v1"
schemaLocation="special-types.xsd"/>
Voíla!