The classes in this package implement a fully functional UDDI 3.0 client. The main class is {@link dk.itst.uddi.client.UDDIClient}, which provides access to the UDDI APIs.
The UDDI datatypes are auto-generated, and are generally created in this way: AccessPoint p = AccessPoint.Factory.newInstance()
. However, in most cases, there
should be no need to create these objects manually. The client API has been designed to avoid direct manipulation of the basic UDDI types.
Instead, use the builder objects, for example when finding objects via the Inquiry API. An example of this is shown below.
ConnectionInfo ci = new ConnectionInfo(); ci.setInquiry("http://uddi.localdomain:8080/uddi/services/inquiry"); try { UDDIClient client = new UDDIClient(ci); FindTModelResult result = client.getInquiry().findTModel() .addIdentifier("EndpointKey", "5793635524529", "uuid:e733684d-9f40-40ff-8807-1d80abc7c665") .setName("%") .addQualifier(FindQuery.APPROXIMATE_MATCH) .execute(); TModelInfo[] infos = result.getTModelInfos(); for (int i = 0; i < infos.length; i++) { System.out.println("\n\nThe TModel Name: " + infos[i].getName()); System.out.println("The TModel Key : " + infos[i].getTModelKey()); } FindServiceQuery q = client.getInquiry().findService() .addQualifier(FindQuery.EXACT_MATCH) .addName("ITST http endpoint"); q.setLimit(5); FindServiceResult services = q.execute(); String serviceKey = null; for (int i = 0; i < services.getCount(); i++) { // Print name for each service System.out.println("Name of Service : " + services.getServiceInfos()[i].getNameArray()[0]); serviceKey = services.getServiceInfos()[i].getServiceKey(); System.out.println("Service key : " + serviceKey); } BusinessService service = client.getInquiry().getService(serviceKey); BindingTemplates bt = service.getBindingTemplates(); for (int i = 0; i < bt.sizeOfBindingTemplateArray(); i++) { BindingTemplate bindingTemplateFound = bt.getBindingTemplateArray(i); System.out.println("BindingKey Found: " + bindingTemplateFound.getBindingKey()); AccessPoint ap = bindingTemplateFound.getAccessPoint(); System.out.println("ap is of type: " + ap.getUseType()); System.out.println("ap's endpoint is: " + ap.getStringValue()); } } catch (MalformedURLException e) { e.printStackTrace(); }@see The UDDI 3.0 Spec.