List extElements = wsdlDef.getExtensibilityElements();
for (Iterator iter = extElements.iterator(); iter.hasNext();) {
Object e = iter.next();
if (e instanceof TypeMappingType) {
TypeMappingType tmType = (TypeMappingType) e;
CorbaTypeMap map = null;
for (Iterator<CorbaTypeMap> it = typeMaps.iterator(); it.hasNext();) {
CorbaTypeMap tm = it.next();
if (tm.getTargetNamespace().equals(tmType.getTargetNamespace())) {
LOG.info("Found an existing typemap with the same namespace");
map = tm;
break;
}
}
if (map == null) {
map = new CorbaTypeMap(tmType.getTargetNamespace());
map.setPrefix(wsdlDef.getPrefix(tmType.getTargetNamespace()));
typeMaps.add(map);
}
LOG.info("Found typemap in WSDL (Namespace: " + tmType.getTargetNamespace()
+ ", Prefix: " + wsdlDef.getPrefix(tmType.getTargetNamespace()));
List<CorbaTypeImpl> types = tmType.getStructOrExceptionOrUnion();
LOG.info("Found " + types.size() + " types defined in the typemap");
for (Iterator<CorbaTypeImpl> it = types.iterator(); it.hasNext();) {
CorbaTypeImpl corbaType = it.next();
map.addType(corbaType.getName(), corbaType);
LOG.info("Adding type " + corbaType.getName());