The UDDI Registry Replies
The response from the UDDI registry is the XML structure BusinessList, which contains a list of businesses matching the search criteria. Listing 4 shows a sample BusinessList structure. The BusinessList parses and processes the XML structure returned by UDDI.
The root tag <BusinessList> contains information about the UDDI operator, namespace, and version of the UDDI API. It also contains multiple BusinessInfo elements. Each <BusinessInfo> element represents one business and contains a name, a description, and a BusinessKey. Name is simply name of the business, description is some text describing the business, and BusinessKey uniquely identifies the business. Each BusinessInfo structure contains multiple <ServiceInfo> elements, each of which represent one service that a business provides.
The constructor in the BusinessList class takes the complete BusinessList XML string and populates its internal structures using KXML. Once populated, all the information about a BusinessList class is available through public Get methods. Users of this class can also get information about individual BusinessInfo elements and their children, the ServiceInfo elements.
That completes the implementation of the find_business method. If you want to perform drill-down searching, this sample implementation of the find_business method can be used as an architectural model to implement a complete UDDI client in Java.
UDDI has provided comprehensive means to search for specific Web services at a UDDI registry. Once users have discovered them, they'll want to explore further details of those services. My article "Using UDDI as a Search Engine" covers how to use different methods in UDDI APIs that lead to the discovery of WSDL file URLs, which disclose more information about registered services (see "Designing a WSDL Client").
Bilal Siddiqui is an Electronics Engineer, an XML consultant, and the co-founder of WaxSys, a company focused on simplifying e-Business. He is a technology evangelist and frequently published technical author. You can contact Bilal at bsiddiqui@waxsys.com.