protected void addIncludedSchemas(Schema schema) throws WSDLException, IOException, TransformerException, TransformerFactoryConfigurationError {
        List<SchemaReference> includes = schema.getIncludes();
        for (SchemaReference schemaReference : includes) {
            String schemaLocation;
            URI locationURI = URI.create(schemaReference.getSchemaLocationURI());
            if (locationURI.isAbsolute()) {
                schemaLocation = schemaReference.getSchemaLocationURI();
            } else {
                schemaLocation = schema.getDocumentBaseURI().substring(0, schema.getDocumentBaseURI().lastIndexOf('/') + 1) + schemaReference.getSchemaLocationURI();
            }

            schemaResources.add(new FileSystemResource(schemaLocation));
        }
    }
protected void addIncludedSchemas ( Schema schema ) throws WSDLException , IOException , TransformerException , TransformerFactoryConfigurationError { List < SchemaReference > includes = schema . getIncludes ( ) ; for ( SchemaReference schemaReference : includes ) { String schemaLocation ; URI locationURI = URI . create ( schemaReference . getSchemaLocationURI ( ) ) ; if ( locationURI . isAbsolute ( ) ) { schemaLocation = schemaReference . getSchemaLocationURI ( ) ; } else { schemaLocation = schema . getDocumentBaseURI ( ) . substring ( 0 , schema . getDocumentBaseURI ( ) . lastIndexOf ( '/' ) + 1 ) + schemaReference . getSchemaLocationURI ( ) ; } schemaResources . add ( new FileSystemResource ( schemaLocation ) ) ; } }
Recursively add all included schemas as schema resource.