public void find() {
try {
UDDIClient uddiClient = new UDDIClient("META-INF/wsdl2uddi-uddi.xml");
UDDIClerk clerk = uddiClient.getClerk("joe");
BusinessEntity businessEntity = clerk.findBusiness("uddi:uddi.joepublisher.com:business-for-wsdl");
//
if (businessEntity!=null) {
System.out.println("Found business with name " + businessEntity.getName().get(0).getValue());
System.out.println("Number of services: " + businessEntity.getBusinessServices().getBusinessService().size());
for (BusinessService businessService: businessEntity.getBusinessServices().getBusinessService()) {
System.out.println("Service Name = '" + businessService.getName().get(0).getValue() + "'");
System.out.println("Service Key = '" + businessService.getServiceKey() + "'");
System.out.println("Service Description = '" + businessService.getDescription().get(0).getValue() + "'");
System.out.println("BindingTemplates: " + businessService.getBindingTemplates().getBindingTemplate().size());
for (int i=0; i<businessService.getBindingTemplates().getBindingTemplate().size(); i++) {
BindingTemplate bindingTemplate = businessService.getBindingTemplates().getBindingTemplate().get(i);
System.out.println("--BindingTemplate" + " " + i + ":");
System.out.println(" bindingKey = " + bindingTemplate.getBindingKey());
System.out.println(" accessPoint useType = " + bindingTemplate.getAccessPoint().getUseType());
System.out.println(" accessPoint value = " + bindingTemplate.getAccessPoint().getValue());
System.out.println(" description = " + bindingTemplate.getDescription().get(0).getValue());
}
}
}
businessEntity.getBusinessServices();
//TODO JUDDI-610
//FindTModel findBindingTModel = WSDL2UDDI.createFindBindingTModelForPortType(portType, namespace);
}