private void setPortTypeReferences(
PortTypeEntry entry, BindingEntry bEntry,
Definition def, Document doc) {
// If we don't want to emit stuff from imported files, only set the
// isReferenced flag if this entry exists in the immediate WSDL file.
PortType portType = entry.getPortType();
if (addImports) {
entry.setIsReferenced(true);
}
else {
// NOTE: I thought I could have simply done:
// if (def.getPortType(portType.getQName()) != null)
// but that method traces through all imported portTypes.
Map portTypes = def.getPortTypes();
if (portTypes.containsValue(portType)) {
entry.setIsReferenced(true);
}
}
// Set all the portType's messages
Iterator operations = portType.getOperations().iterator();
// For each operation, query its input, output, and fault messages
while (operations.hasNext()) {
Operation operation = (Operation) operations.next();