http://www.developer.com/net/net/article.php/3107951/Enterprise-UDDI-Services.htm
Windows Server 2003 ships with Enterprise UDDI Services, a dynamic and flexible infrastructure for discovering and integrating Web services within your application. Enterprise UDDI Services is a standards-based solution that can be used to run your own UDDI (Universal Description, Discovery, and Integration) directory for intranet or extranet use, making it easier to discover Web services and other programmatic resources. By providing a centralized repository of Web services, Enterprise UDDI Services makes it possible for the developers to easily and quickly find and reuse the Web services available within the organization, allowing them to build and deploy extensible and reliable applications. In this article, we will understand the features of this new capability and demonstrate how it can be used to register and discover Web services. Along the way, we will also see how Enterprise UDDI Services can be accessed from a Web user interface as well as programmatically through the UDDI API. Enterprise UDDI Services helps companies organize and catalog Web services and other programmatic resources. By applying categorization schemes such as geography, Quality of Service (QoS), or organization in UDDI Services, companies can establish a structured and standardized way to describe and discover services. Enterprise UDDI Services in Windows Server 2003 is fully compliant with UDDI 2.0 specification. UDDI Services store both the technical information to build an application compatible with a Web services interface, as well as the information required to successfully connect to the Web service at run time. The most common scenarios for Enterprise UDDI Services inside an organization are as follows: When you install Windows Server 2003, it does not install Enterprise UDDI Services by default. To install Enterprise UDDI Services, Select Start->Control Panel->Add Remove Programs. From the Add Remove Programs dialog box, when you click Add/Remove Windows Components, you will be provided with the following dialog box. In the above dialog box, select UDDI Services from the list of options to install the Enterprise UDDI Services component in your server. UDDI Services is a managed code service in Windows Server 2003, meaning that it is completely written using .NET managed code. Enterprise UDDI Services was built using the Microsoft .NET Framework 1.1 and was designed to be hosted in IIS 6.0. The following diagram shows the architecture of Enterprise UDDI Services. As you can see from the above diagrams, you can leverage UDDI Services either through a Web-based user interface or programmatically through a SOAP interface. The important components of the UDDI Services are: Now that we have had an overview of the different components of Enterprise UDDI Services, let us consider an example in which we will publish a Web service with UDDI through the Web interface and then programmatically query the UDDI Services and get information about the registered Web service. In this section, we will walk through the steps involved in publishing a Web service with the UDDI interface. Before we move on to look at that, let us outline the development steps one has to follow before publishing a Web service with UDDI. In this section, we will use the UDDI Web interface for publishing the Web service in the Enterprise UDDI Services. For the purposes of this example, we will publish a Web service named http://localhost/MyProjects/SimpleWebService/HelloService.asmx in the Enterprise UDDI Services using the Web-based user interface. Let us start by navigating to the Enterprise UDDI Services default Web site by typing in http://localhost/uddi in the Internet Explorer address bar. If you have enabled SSL when installing UDDI Services, this URL will obviously be https://localhost/uddi. That's all there is to publishing a Web service with the Enterprise UDDI Services. As mentioned before, apart from using the Web-based interface provided by the Enterprise UDDI Services to register/query Web services, you can also use the programmatic API for performing the same set of operations. In this section, we will take a look at an example application that uses the UDDI SDK for querying the Enterprise UDDI Services to search for a specific Web service. Before we take a look at the code required to implement this, let us understand the role of UDDI Services in the development steps that one will follow for consuming a Web service. Let us start by creating a new Visual C# Windows Application named UddiQueryExample. Once the project is created, we will add a label control, a command button, and a textbox to the form and name them lblSearch, btnSearch, and txtName, respectively. Because we are going to be using the UDDI SDK for querying the Enterprise UDDI Services, you also need to download and install the UDDI SDK. Once installed, you can then reference it from within the project by using the Add Reference option from Visual Studio.NET. After that, add the following lines of code to import the required UDDI namespaces. Then, modify the Click event of the btnSearch control to look like the following. Let us walk through the above lines of code. We start by creating an instance of the UddiConnection object and specifying the Inquire Web service of the Enterprise UDDI Services to the constructor of the UddiConnection object. Then, we create an instance of the FindService object, passing in the keyword of the Web service to search. Then, we invoke the Send method of the FindService object, passing in the previously created UddiConnection object as an argument. The Send method returns the list of available services in the form of a ServiceList object. The ServiceList object exposes a property named ServiceInfos that basically returns an array of ServiceInfo objects. Once we have a reference to this array, we then manually loop through all the individual elements in the array and display them in the message box. If there is an exception while executing the try block, the control is then transferred to the catch block where we catch both the UDDI specific exceptions as well as general exceptions. If you execute the code by pressing F5, and then enter "Simple Service" in the search textbox, the code will invoke the Enterprise UDDI Services Inquire Web service and display information about the Web service named "Simple Service" that we created in the previous section. To download and install the UDDI SDK, please go to the following MSDN link (http://msdn.microsoft.com/library/default.asp?url=/downloads/list/websrvuddi.asp). There are several common business scenarios that will benefit from the Enterprise UDDI Services. These scenarios fall into two categories: Many times, software will need to interact with a UDDI registry to find out information about Web services exposed by existing or potential business partners. For example, given a choice between two potential partners that offer equivalent goods or services, a business might choose the one that already has compatible software. Sometimes, the business need is to locate a service that you can use, regardless of the business that provides it. For a certain class of base services, such as ticker price, time check, or basic math calculations, any good implementation of a well-known service will suffice. For these types of service requests, software may simply want to find an available implementation of a service that implements a particular widely used specification, and invoke it. By using Enterprise UDDI Services, you can enable these kinds of scenarios. For the developers, Microsoft offers UDDI client support through several tools including Visual Studio .NET, the Office XP Web Services Toolkit, and the UDDI software development kit (SDK). Microsoft Visual Studio .NET provides native support for UDDI Services through "Add Web Reference," enabling developers to easily discover Web services and other programmatic resources in UDDI for use in building dynamic applications. As you can see, Enterprise UDDI Services allows organizations to manage their Web services by making them available in a centralized location that can be easily searched. And for the developers, now they have an easy way to search for Web services, and reuse them by leveraging the rich client-side support offered by various Microsoft tools. This can improve developer and IT productivity, resulting in lower total cost of ownership (TCO) and more reliable and manageable applications. Thiru Thangarathinam has six years of experience in architecting, designing, developing, and implementing applications using Object Oriented Application development methodologies. He also possesses a thorough understanding of the software life cycle (design, development, and testing). He holds several certifications, including MCAD for .NET, MCSD, and MCP. Thiru is an expert with ASP.NET, .NET Framework, Visual C# .NET, Visual Basic .NET, ADO.NET, XML Web Services, and .NET Remoting and holds. Thiru has authored numerous books and articles. He can be reached at thiruthangarathinam@yahoo.com.
# # #
Enterprise UDDI Services
November 12, 2003
Introduction
Installing UDDI Services

Click here for a larger image.
Enterprise UDDI Services Architecture

Click here for a larger image.
Web Services Publishing with UDDI

Click here for a larger image.

Click here for a larger image.

Click here for a larger image.

Click here for a larger image.

Click here for a larger image.

Click here for a larger image.
Web Services Discovery with UDDI
using Microsoft.Uddi;
using Microsoft.Uddi.Services;
using Microsoft.Uddi.TModels;
private void btnSearch_Click(object sender, System.EventArgs e)
{
try
{
// Create a connection to the UDDI node that is to be accessed.
UddiConnection conn = new
UddiConnection("http://localhost/uddi/inquire.asmx");
// Create an object to find a business.
FindService fs = new FindService(txtName.Text);
// Send the prepared FindBusiness request over the connection.
ServiceList servList = fs.Send(conn);
// Display the service name and unique identifying key.
foreach (ServiceInfo servInfo in servList.ServiceInfos)
{
MessageBox.Show("Service: " + servInfo.Names[0].Text + "
" + servInfo.ServiceKey);
}
}
catch (Microsoft.Uddi.UddiException ex)
{
MessageBox.Show("UDDI Exception: " + ex.Message);
}
catch (Exception gen)
{
MessageBox.Show("General Exception: " + gen.Message);
}
}
Enterprise UDDI Services Usage Scenarios
Conclusion
About the Author