for (Iterator iterator = rawWsdlMap.entrySet().iterator(); iterator.hasNext();) {
Map.Entry entry = (Map.Entry) iterator.next();
URI key = (URI) entry.getKey();
Object value = entry.getValue();
if (value instanceof SchemaDocument) {
SchemaDocument schemaDocument = (SchemaDocument) ((SchemaDocument) value).copy();
SchemaDocument.Schema schema = schemaDocument.getSchema();
rewriteSchema(schema, contextURI, key);
String schemaString = xmlObjectToString(schemaDocument);
wsdlMap.put(key.toString(), schemaString);
} else if (value instanceof DefinitionsDocument) {
DefinitionsDocument doc = (DefinitionsDocument) ((DefinitionsDocument) value).copy();