Click here to Skip to main content
Click here to Skip to main content

Publish a WSDL to a UDDI Server

, 16 Mar 2009 CPOL
Rate this:
Please Sign up or sign in to vote.
This article describes the basic steps to interact with a UDDI server.

Sample Image


Universal Description, Discovery, and Integration (UDDI) is a platform-independent, XML-based registry for businesses worldwide to list themselves on the Internet. UDDI is an important part in Web Services architecture. Clients can find information about a Web Service by using a UDDI server. In this article, we will present the basic steps to interact with a UDDI server.

Using the code


To interact with a UDDI server, we can use the library Microsoft.Uddi.dll. This DLL can be found in the Microsoft Platform SDK for Windows Server 2003 R2. You can download this entire platform (about 1 GB) from the Microsoft site or use the one in this demo.


The URL used to search is http://domain/uddipublic/inquire.asmx. We will use a FindService object for this operation, and login is not required.

Microsoft.Uddi.Inquire.Url = url;
Microsoft.Uddi.Inquire.AuthenticationMode = 

FindService fs = new FindService();
if (businessKey != String.Empty)

    Microsoft.Uddi.Inquire.Url = url;
    Microsoft.Uddi.Inquire.AuthenticationMode = 
    fs.BusinessKey = businessKey;

fs.FindQualifiers = _qualifiers;
if (_tTModelKeys.Count > 0)
    fs.TModelKeys = _tTModelKeys;

String temp = service == String.Empty ? "%" : service;
    ServiceList svlist =  fs.Send();
    if (svlist == null)
        return null;
    List<SVInfo> list = new List<SVInfo>();
    foreach (ServiceInfo si in svlist.ServiceInfos)
        SVInfo s; = si.Name;
        s.key = si.ServiceKey;
        s.businesskey = si.BusinessKey;

        GetBusinessDetail gbd = new GetBusinessDetail();
        BusinessDetail be = gbd.Send();
        s.businessname = be.BusinessEntities[0].Names[0].Text;

        GetServiceDetail gsd = new GetServiceDetail();
        ServiceDetail sd = gsd.Send();
        s.accesspoint = sd.BusinessServices[0].BindingTemplates[0].AccessPoint.Text;
    return list;
catch (Exception)
    return null;


You may review the UDDI data model picture above. There is so much information about a service, but you do not have to fill in all of these. In this demo, we assume that a BusinessEntity to publish has only one BusinessService. The access point is the link to the WSDL of the Web Service. For this operation (and delete also), you have to login with an Administrator role.

cnn = new UddiConnection();
cnn.PublishUrl = url;
cnn.Username = username;
cnn.Password = password;
cnn.AuthenticationMode = mode;  
// Create a business entry.
SaveBusiness sb = new SaveBusiness();
BusinessEntity be = new BusinessEntity(txbBusinessName.Text);

//Create a business service.
BusinessService bs = new BusinessService(txbServiceName.Text);

//Create a binding template.
BindingTemplate bt = new BindingTemplate();
bt.AccessPoint.Text = txbAccessPoint.Text;
bt.AccessPoint.UrlType = Microsoft.Uddi.UrlType.Http;

// Send the business entry data to the UDDI server.
    BusinessDetail bd = sb.Send(uddiCnn);
catch (UddiException ue)
    strError = ue.Message;
catch (Exception ex)
    strError = ex.Message;
    if (strError != String.Empty)
        MessageBox.Show("Publish service successful");


Similarly, we have the delete operation using the DeleteService object. This object is defined by a serviceKey which can be got from a search operation.

DeleteService delSv = new DeleteService(serviceKey);
DispositionReport dispRep = delSv.Send(ud);

Update (Access point)

In this demo, update is separated into two operations: delete the old service and publish the new one; other information can be obtained from the old one.

selectedItem = listView1.SelectedItems[0];
SVInfo serviceInfo = (SVInfo)selectedItem.Tag;
// Get new accesspoint
AccessPointForm epf = new AccessPointForm(serviceInfo.accesspoint);
epf.passAccessPoint = new AccessPointForm.PassAccessPoint(setAccesspoint);
if (epf.ShowDialog() == DialogResult.OK)
    if (newAccesspoint != serviceInfo.accesspoint)
        //~Get new accesspoint
        ud.InquireUrl = txtURL.Text;
        GetBusinessDetail gbd = new GetBusinessDetail(serviceInfo.businesskey);
        BusinessDetail bd = gbd.Send(ud);
        BusinessEntity be = bd.BusinessEntities[0];

        SaveBusiness sb = new SaveBusiness();

        BusinessService bs = new BusinessService(;

        BindingTemplate bt = new BindingTemplate();
        bt.AccessPoint.Text = newAccesspoint;
        bt.AccessPoint.UrlType = Microsoft.Uddi.UrlType.Http;

        listView1.SelectedItems[0].SubItems[3].Text = newAccesspoint;


  1. Wikipedia. Universal Description Discovery and Integration. Wikipedia. [Online]
  2. Newcomer, Eric. Understanding Web Services - XML, WSDL, SOAP and UDDI. Addison-Wesley Professional; 1 edition (May 23, 2002), 2002. 978-0201750812.
  3. elLoco. UDDI SOA Howto. [Online]


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

No Biography provided

Comments and Discussions

GeneralUnable to execute this project Pinmemberprati.g@gmail.com12-Apr-10 18:07 
Generalhelp needed PinmemberAdace Gavril Marius22-May-09 3:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150327.1 | Last Updated 16 Mar 2009
Article Copyright 2009 by Chanh Pham Minh, Binh Nguyen Quoc
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid