*/
private void setServiceReferences(
ServiceEntry entry, 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.
Service service = entry.getService();
if (addImports) {
entry.setIsReferenced(true);
}
else {
// NOTE: I thought I could have simply done:
// if (def.getService(service.getQName()) != null)
// but that method traces through all imported services.
Map services = def.getServices();
if (services.containsValue(service)) {
entry.setIsReferenced(true);
}
}
// Set all the service's bindings
Iterator ports = service.getPorts().values().iterator();
while (ports.hasNext()) {
Port port = (Port) ports.next();
Binding binding = port.getBinding();
BindingEntry bEntry = getBindingEntry(binding.getQName());
if (bEntry != null) {