The Usage of UDDI APIs
It is possible to use UDDI Web Service APIs to do different operations such as search for services, add services, add businesses and many more. Governance Registry contains UDDI WS-APIs and is able to perform the operations mentioned previously.
Use the following steps to test UDDI API services.
- Start the Governance Registry server as mentioned in Support for UDDI.
- Now you can view the WSDLs of UDDI API services and it is possible to create external clients which can perform UDDI operations on Governance Registry. The WSDL of
inquiry
service can be accessed using the following link: http://localhost:9763/juddiv3/services/inquiry?wsdl - For example, if the server has UDDI enabled, when a user adds a service from the Governance Registry side, that resource would also get added to the UDDI registry. Therefore you can view any service that is added on the Governance Registry side using
inquiry
service. This is performed as follows:- Add a WSDL to the Governance Registry. (E.g. - http://www.webservicex.net/globalweather.asmx?wsdl). This creates the corresponding service.
- Use a tool like soapUI to send a request to the
inquiry
service. First you have to create a project in soapUI using the followinginquiry
service WSDL: - When the new project is created, it displays all the available operations of the service on the left menu of soapUI. You are able to rename the requests of operations listed out in the menu.
You can use
find_business
to find any business added in the UDDI registry. For the following SOAP request, all the businesses in the UDDI registry would return. You can edit the SOAP request as required in order to get expected results.<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:uddi-org:api_v3"> <soapenv:Header/> <soapenv:Body> <urn:find_business> <urn:findQualifiers> <!--1 or more repetitions:--> <urn:findQualifier>approximateMatch</urn:findQualifier> </urn:findQualifiers> <!--Zero or more repetitions:--> <urn:name>%</urn:name> </urn:find_business> </soapenv:Body> </soapenv:Envelope>
The service that has been added from the Registry side can be seen in the list of services as given below.
Users can use the
find_service
method to find any service added in the UDDI registry. The following SOAP request can be used to search for the WeatherForecast service. Users are able to edit the SOAP request as they preferred to get expected results.<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:uddi-org:api_v3"> <soapenv:Header/> <soapenv:Body> <urn:find_service> <urn:findQualifiers> <!--1 or more repetitions:--> <urn:findQualifier>approximateMatch</urn:findQualifier> </urn:findQualifiers> <!--Zero or more repetitions:--> <urn:name>GlobalWeather</urn:name> </urn:find_service> </soapenv:Body> </soapenv:Envelope>
- Add a WSDL to the Governance Registry. (E.g. - http://www.webservicex.net/globalweather.asmx?wsdl). This creates the corresponding service.
- Similar to
inquiry
service, other services can also be tested on Governance Registry using the soapUI. - Refer the section JAXR sample in order to know how to use the JAXR API against UDDI.