if (types != null) {
List extensibleElements = types.getExtensibilityElements();
Schema schemaExtension;
Object extensionObject;
XmlSchema xmlSchema;
XmlSchemaCollection xmlSchemaCollection;
SchemaFileProcessor schemaFileProcessor;
Map changedLocationMap;
String basuri = wsdlDefinition.getDocumentBaseURI();
basuri = basuri.substring(0, basuri.lastIndexOf("/") + 1);
for (Object extensibleElement : extensibleElements) {
extensionObject = extensibleElement;
if (extensionObject instanceof Schema) {
// first get the schema object
schemaExtension = (Schema)extensionObject;
// create an xml schema object to be processed by SchemaFile procesor.
xmlSchemaCollection = new XmlSchemaCollection();
xmlSchemaCollection.setBaseUri(basuri);
xmlSchema = xmlSchemaCollection.read(schemaExtension.getElement());
schemaFileProcessor = new SchemaFileProcessor(registry);
changedLocationMap = new HashMap();
HashSet visitedSchemas = new HashSet();
schemaFileProcessor.calculateNewSchemaNames(
xmlSchema, processedScheamMap, visitedSchemas, true, processImports);