Using the UDDI Inquiry API

Obsolete technology

UDDI is an obsolete technology and might not be supported in future releases of PowerBuilder.

The UDDIProxy PowerBuilder extension class enables you to search UDDI registries for a Web service that you want to access. For a description of this extension class and its methods, see PowerBuilder Extension Reference.

Example code

The following is example code using all the methods in the UDDIProxy class. It searches an IBM UDDI registry by service name (Weather) and business name (IBM), using the same search options (case sensitivity and a maximum of 5 rows returned):

uddiproxy proxy
int ret
proxy = create uddiproxy
ret = proxy.setinquiryurl   ("http:/")
ret = proxy.setoption (false, true, 0, 5)
int count, count2
string businessName[], businessDescription[]
string businessKey []
string servicename[], servicedescription[]
string servicekey [], wsdl [ ]
ret = proxy.findService("Weather",count,serviceName, &
  serviceDescription, serviceKey, businessName, wsdl)
int i, j
FOR i = 1 TO count
   messagebox(servicename[i], &
proxy.findbusiness("IBM", count, businessName, &
  businessDescription, businessKey)
FOR i = 1 TO count
   messagebox(businessName[i], &
     businessDescription[i] + businessKey[i])
  proxy.getbusinessdetail (businessKey [i], count2, &
     servicename, servicedescription, servicekey, wsdl)
  FOR j = 1 TO count2
   messagebox(servicename[j], &
destroy proxy

Troubleshooting UDDI API calls

You can turn on logging to track down any failures on method calls to the UDDIProxy object. The PowerBuilder Java service class path must include the configuration file to turn on logging. The following is an example of a log configuration file for a UDDI search:

#log all level
#log4j.rootCategory=DEBUG, lf5
#only log com.sybase.powerbuilder.uddi,     dest2, lf5
    %-5p: %-5r: %-5c: %l: %m%n
    %-5p: %l: %m%n