background image

Finding Services and Service Bindings

<< Web Services Description Language | Managing Registry Data >>
<< Web Services Description Language | Managing Registry Data >>
Q
UERYING A
R
EGISTRY
185
(ExternalLink) links.iterator().next();
System.out.println("\tURL of WSDL document: '" +
link.getExternalURI() + "'");
}
// Find organizations that use this concept
Collection<Concept> specConcepts1 =
new ArrayList<Concept>();
specConcepts1.add(concept);
br = bqm.findOrganizations(null, null, null,
specConcepts1, null, null);
// Display information about organizations
...
}
}
If you find an organization that offers a service you wish to use, you can invoke
the service using JAX-WS.
Finding Services and Service Bindings
After a client has located an organization, it can find that organization's services
and the service bindings associated with those services.
Iterator orgIter = orgs.iterator();
while (orgIter.hasNext()) {
Organization org = (Organization) orgIter.next();
Collection services = org.getServices();
Iterator svcIter = services.iterator();
while (svcIter.hasNext()) {
Service svc = (Service) svcIter.next();
Collection serviceBindings =
svc.getServiceBindings();
Iterator sbIter = serviceBindings.iterator();
while (sbIter.hasNext()) {
ServiceBinding sb =
(ServiceBinding) sbIter.next();
}
}
}