javauddi

Apache jUDDI: Finding Templates


I'm using jUDDI v3.0.4 client to inquiry a UDDI server (juddi-portal-bundle-3.0.4). My interest is to find a service (which I succeeded) and query for its Binding Templates, in fact to get the Access Point WSDL to be able to query the WebService later.

I only can get the Access point if I know the BindingTemplate key, which I get via Pluto portal released with the UDDI Server.

When I try to query for the BindingTemplates of a service, with a FindBinding object, I get "javax.xml.ws.soap.SOAPFaultException: At least one categoryBag, find_tModel or tModelBag must be supplied". But I cannot fill in any of those in the FindBinding object.

Am I missing something?, is that not the correct way of getting a service template and its WSDL later?

Thanks.

Oscar.


Solution

  • I found out the solution. The key is to look for the binding templates through the business service object, this carries to the BindingTemplate object.

    So,

    1. query for service keys via findService(FindService fs) API offered by UDDIInquiryPortType.
    2. for the ServiceList returned, obtain the ServiceInfo objects which contain the service keys.
    3. given the service keys you are looking for (the findService may be scoped via a Name object), obtain the service detail via the getServiceDetail(GetServiceDetail sd) API offered by UDDIInquiryPortType, where the GetServiceDetail object is filled in with the service keys.
    4. the list of ServiceDetail objects returned by previous query will guide you to the BindingTemplates which contain the web service definition (WSDL).

    Hope it helps.