if (entry instanceof BindingEntry) {
BindingEntry bEntry = (BindingEntry) entry;
Binding binding = bEntry.getBinding();
PortType portType = binding.getPortType();
PortTypeEntry ptEntry =
symbolTable.getPortTypeEntry(portType.getQName());
if (bEntry.getBindingType() == BindingEntry.TYPE_SOAP) {
// If a binding is of type TYPE_SOAP, then mark its portType used
// (ie., add it to the usedPortTypes list. If the portType was
// previously marked as unused, unmark it (in other words, remove it
// from the unusedPortTypes list).
usedPortTypes.add(ptEntry);
if (unusedPortTypes.contains(ptEntry)) {
unusedPortTypes.remove(ptEntry);
}
} else {
bEntry.setIsReferenced(false);
// If a binding is not of type TYPE_SOAP, then mark its portType as
// unused ONLY if it hasn't already been marked as used.
if (!usedPortTypes.contains(ptEntry)) {
unusedPortTypes.add(ptEntry);
}
}
}
}
}
// Go through all the portTypes that are marked as unused and set their isReferenced flags
// to false.
for (int i = 0; i < unusedPortTypes.size(); ++i) {
PortTypeEntry ptEntry = (PortTypeEntry) unusedPortTypes.get(i);
ptEntry.setIsReferenced(false);
}
} // ignoreNonSOAPBindings