UDDI Client

The Novell exteNd WSSDK has full support for the UDDI schema and the wsdl2java and xsd2java compilers can handle the entire UDDI schema. This example shows how to access UDDI services through the Novell exteNd WSSDK. The Java code generated by the compilers can be used to access UDDI services. The example is using the WSDL and XSD documents from the UDDI's home page:

You may also wish to look at the never version 2.0 documents:

For full JavaDoc information about the generated UDDI client, please click here.

Generated 1.0 Interfaces

When running wsdl2java on the UDDI 1.0 WSDL, the following inquire interface is generated:

// Generated by Novell exteNd Web Services SDK 5.2
// On Wed Jun 09 11:16:58 EDT 2004
// From inquire_v1.wsdl
                                                                           
package com.sssw.uddi.api.inquiry;
                                                                           
public interface InquireSoap
    extends java.rmi.Remote
{
    com.sssw.uddi.api.BindingDetail find_Binding(com.sssw.uddi.api.FindBinding body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.BusinessDetail get_BusinessDetail(com.sssw.uddi.api.GetBusinessDetail body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.TModelDetail get_TModelDetail(com.sssw.uddi.api.GetTModelDetail body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.BindingDetail get_BindingDetail(com.sssw.uddi.api.GetBindingDetail body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.BusinessDetailExt get_BusinessDetailExt(com.sssw.uddi.api.GetBusinessDetailExt body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.ServiceDetail get_ServiceDetail(com.sssw.uddi.api.GetServiceDetail body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.TModelList find_TModel(com.sssw.uddi.api.FindTModel body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.BusinessList find_Business(com.sssw.uddi.api.FindBusiness body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.ServiceList find_Service(com.sssw.uddi.api.FindService body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
}

The following publish interface is also generated from the publish_v1.wsdl file:

// Generated by Novell exteNd Web Services SDK 5.2
// On Wed Jun 09 11:17:06 EDT 2004
// From publish_v1.wsdl
                                                                           
package com.sssw.uddi.api.publication;
                                                                           
public interface PublishSoap
    extends java.rmi.Remote
{
    com.sssw.uddi.api.TModelDetail save_TModel(com.sssw.uddi.api.SaveTModel body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.ServiceDetail save_Service(com.sssw.uddi.api.SaveService body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.DispositionReport delete_Service(com.sssw.uddi.api.DeleteService body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.DispositionReport validate_Categorization(com.sssw.uddi.api.ValidateCategorization body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.DispositionReport delete_Business(com.sssw.uddi.api.DeleteBusiness body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.DispositionReport delete_Binding(com.sssw.uddi.api.DeleteBinding body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.BindingDetail save_Binding(com.sssw.uddi.api.SaveBinding body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.DispositionReport delete_TModel(com.sssw.uddi.api.DeleteTModel body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.DispositionReport discard_AuthToken(com.sssw.uddi.api.DiscardAuthToken body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.AuthToken get_AuthToken(com.sssw.uddi.api.GetAuthToken body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.RegisteredInfo get_RegisteredInfo(com.sssw.uddi.api.GetRegisteredInfo body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api.BusinessDetail save_Business(com.sssw.uddi.api.SaveBusiness body)
        throws com.sssw.uddi.api.DispositionReport, java.rmi.RemoteException;
}

Generated 2.0 Interfaces

When running wsdl2java on the UDDI 2.0 WSDL, the following inquire interface is generated:

// Generated by Novell exteNd Web Services SDK 5.2
// On Wed Jun 09 11:17:15 EDT 2004
// From inquire_v2.xml
                                                                           
package com.sssw.uddi.api_v2.inquiry;
                                                                           
public interface Inquire
    extends java.rmi.Remote
{
    com.sssw.uddi.api_v2.BindingDetail find_Binding(com.sssw.uddi.api_v2.Find_Binding body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.BusinessDetail get_BusinessDetail(com.sssw.uddi.api_v2.Get_BusinessDetail body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.TModelDetail get_TModelDetail(com.sssw.uddi.api_v2.Get_TModelDetail body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.BindingDetail get_BindingDetail(com.sssw.uddi.api_v2.Get_BindingDetail body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.BusinessDetailExt get_BusinessDetailExt(com.sssw.uddi.api_v2.Get_BusinessDetailExt body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.ServiceDetail get_ServiceDetail(com.sssw.uddi.api_v2.Get_ServiceDetail body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.TModelList find_TModel(com.sssw.uddi.api_v2.Find_TModel body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.BusinessList find_Business(com.sssw.uddi.api_v2.Find_Business body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.RelatedBusinessesList find_RelatedBusinesses(com.sssw.uddi.api_v2.Find_RelatedBusinesses body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.ServiceList find_Service(com.sssw.uddi.api_v2.Find_Service body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
}

The following publish interface is also generated from the publish_v1.wsdl file:

// Generated by Novell exteNd Web Services SDK 5.2
// On Wed Jun 09 11:17:24 EDT 2004
// From publish_v2.xml
                                                                           
package com.sssw.uddi.api_v2.publication;
                                                                           
public interface Publish
    extends java.rmi.Remote
{
    com.sssw.uddi.api_v2.TModelDetail save_TModel(com.sssw.uddi.api_v2.Save_TModel body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.ServiceDetail save_Service(com.sssw.uddi.api_v2.Save_Service body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport delete_Service(com.sssw.uddi.api_v2.Delete_Service body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport delete_Business(com.sssw.uddi.api_v2.Delete_Business body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.BindingDetail save_Binding(com.sssw.uddi.api_v2.Save_Binding body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport delete_Binding(com.sssw.uddi.api_v2.Delete_Binding body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport delete_TModel(com.sssw.uddi.api_v2.Delete_TModel body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport discard_AuthToken(com.sssw.uddi.api_v2.Discard_AuthToken body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.AuthToken get_AuthToken(com.sssw.uddi.api_v2.Get_AuthToken body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.RegisteredInfo get_RegisteredInfo(com.sssw.uddi.api_v2.Get_RegisteredInfo body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.PublisherAssertions set_PublisherAssertions(com.sssw.uddi.api_v2.Set_PublisherAssertions body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.BusinessDetail save_Business(com.sssw.uddi.api_v2.Save_Business body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport delete_PublisherAssertions(com.sssw.uddi.api_v2.Delete_PublisherAssertions body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.AssertionStatusReport get_AssertionStatusReport(com.sssw.uddi.api_v2.Get_AssertionStatusReport body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.PublisherAssertions get_PublisherAssertions(com.sssw.uddi.api_v2.Get_PublisherAssertions body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
                                                                           
    com.sssw.uddi.api_v2.DispositionReport add_PublisherAssertions(com.sssw.uddi.api_v2.Add_PublisherAssertions body)
        throws com.sssw.uddi.api_v2.DispositionReport, java.rmi.RemoteException;
}

UDDI 1.0 Client

The client is used to make a query for business information and prints the information received to the console. In this simple example, we only invoke the find_business method.

package uddi;
                                                                           
import javax.xml.rpc.Stub;
import javax.naming.InitialContext;
                                                                           
import com.sssw.uddi.api.*;
import com.sssw.uddi.api.inquiry.*;
                                                                           
public class Client
{
    public static void main(String[] args) throws Exception
    {
    |   // get the initial context
    |   InitialContext ctx = new InitialContext();
    |                                                                      
    |   // lookup the UDDI service
    |   InquireSoapService uddi = (InquireSoapService)
    |       ctx.lookup("xmlrpc:soap:com.sssw.uddi.api.inquiry.InquireSoapService");
    |                                                                      
    |   // get the inquire stub
    |   InquireSoap inquire = (InquireSoap) uddi.getInquireSoapPort();
    |                                                                      
    |   // set the end point address
    |   ((Stub)inquire)._setProperty("javax.xml.rpc.service.endpoint.address",
    |       args.length > 0 ? args[0] : "http://uddi.microsoft.com/inquire");
    |                                                                      
    |   // alternative is http://test.uddi.microsoft.com/inquire
    |                                                                      
    |   // invoke UDDI
    |   FindBusiness fb = new FindBusiness();
    |   fb.setName("SilverStream");
    |   fb.setGeneric("1.0");
    |   fb.setMaxRows(new java.lang.Integer(10));
    |   BusinessList bl = inquire.find_Business(fb);
    |   BusinessInfo[] info = bl.getBusinessInfos().getBusinessInfo();
    |                                                                      
    |   // print out the result
    |   if (info == null) info = new BusinessInfo[0];
    |   System.out.println("Found " + info.length + " business info(s):\n");
    |   for (int i = 0; i < info.length; i++) {
    |   |   System.out.println(" name           = " + info[i].getName());
    |   |   if (info[i].getDescription() != null) {
    |   |   |   Description[] descriptions = info[i].getDescription();
    |   |   |   for (int j = 0; j < descriptions.length; j++)
    |   |   |       System.out.println(" description[" + j + "] = " + descriptions[j]);
    |   |   }
    |   |   System.out.println(" businessKey    = " + info[i].getBusinessKey());
    |   |   System.out.println();
    |   }
    }
}

Please refer to the README file for details on how to build and run the example.



Copyright © 2003, 2004 Novell, Inc. All rights reserved. Copyright © 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.