for (Definition def : defList) {
for (Iterator<?> ite = def.getPortTypes().entrySet().iterator(); ite.hasNext();) {
Entry<?, ?> entry = (Entry<?, ?>)ite.next();
PortType portType = def.getPortType((QName)entry.getKey());
ServiceInfo serviceInfo = this.buildMockService(def, portType);
serviceList.add(serviceInfo);
for (Iterator<?> it2 = d.getAllBindings().values().iterator(); it2.hasNext();) {
Binding b = (Binding)it2.next();
if (b.getPortType() == portType) {
this.buildBinding(serviceInfo, b);
break;
}
}
}
if (def.getPortTypes().size() == 0) {
DescriptionInfo description = new DescriptionInfo();
if (recordOriginal) {
description.setProperty(WSDL_DEFINITION, def);
}
description.setName(def.getQName());
description.setBaseURI(def.getDocumentBaseURI());
copyExtensors(description, def.getExtensibilityElements());
copyExtensionAttributes(description, def);
ServiceInfo service = new ServiceInfo();
service.setDescription(description);
if (recordOriginal) {
service.setProperty(WSDL_DEFINITION, def);
}
getSchemas(def, service);
service.setProperty(WSDL_SCHEMA_ELEMENT_LIST, this.schemaList);
serviceList.add(service);
}
}
return serviceList;
}