Web Service description and Discovery using UDDI (Part II) [from Microsoft]

Source: Internet
Author: User
Tags continue soap connect web services email account visual studio geoweb wsdl
web| Microsoft uses UDDI Web Services Description and Discovery (Part II)
Scott Seely
Microsoft Corporation
October 17, 2001
Brief Introduction
In the previous column, Karsten Januszewski has taken us to the Microsoft®uddi group. Karsten outlines the concept, purpose, and use of UDDI. In this article, we will describe how to register the Cold Rooster collection service using the Microsoft UDDI registry. Since we've never registered with UDDI before, let's start from the beginning. registering with a UDDI
Since Cold Rooster has never been registered at the Microsoft UDDI site, the first task is to create an account at that site. A registered account requires a Passport login. After you log in, you can set up a UDDI e-mail contact address to connect it to your Passport account or to another address. My choice of address is crooster@microsoft.com, because I am not the only one in my group who is using UDDI. The original Cold Rooster consulting company needed to use email when we had created this email account, which seems to be a wise choice.
The registration screen also prompts for additional contact information, such as the registrant's name, contact number, and mailing address. To complete the registration, you will need to accept the "usage rules" agreement. See Terms of Use (English).
After you fill out the contact information in the registry and accept the "usage rules", the UDDI site will send you an e-mail confirming your contact address. You can manage your UDDI account by clicking the link in the message. Administrative work involves adding company data to the registry, publishing TModel, and editing registration details. Figure 1 shows the Administration page.

Figure 1:uddi Admin page add a company in UDDI
After you have established an account with the Microsoft UDDI site, the next step is to add Cold Rooster Consulting to your UDDI registry. We can register the company through a Web page, or we can use the. NET SDK or the COM SDK to call the UDDI API to register the company. I chose to use the UI because I wanted to register successfully once. If you want to change the interface content frequently in the future, you should automate the process to reduce the incidence of errors. By adding companies to the registry, you can enable users to find us based on the types of companies and WEB services provided. To add a Cold Rooster consulting company to the UDDI registry, click the "Add a new business" link in the Administration page (Figure 1). The first page will require the company name and description. For Cold Rooster, I enter:
Name: Cold Rooster Consulting Co., Ltd.
Description: The virtual company used by the MSDN architectural Samples Group

After you add a company to the UDDI registry, you can now add additional information:
    • Contacts: Someone who can help customers solve a variety of business problems. We added different members of the MSDN architectural Samples team to the contact list.
    • Services: the TModel (WSDL file) to be provided by the company. We added three kinds of TModel to the UDDI entry, "account", "Login" and "Report".
    • Identifiers: the only data on behalf of our company. For example, the company's registration number. Because Cold Rooster does not have the above data, it is not filled in.
    • Business Classifications: identifies the location of the company and the business of the company. Cold Rooster Consulting is located in Washington State, USA.
    • Discovery URL: provides a location where you can find details about your company.

First complete the simple project, and finally save the service. Add contact information in UDDI
It's very simple. Just like filling in other address forms, just fill in the general information of the different contact person. Potential users can contact your company by description and by using comments to request permission to use a WEB service, obtain support, or consult other business-related matters. Figure 2 shows the appearance of my contact information table.

Figure 2: Detailed contact information page classify the company
Most companies can be categorized according to their business scope. When you categorize entities, there are several ways in which UDDI classifications can be categorized, including:
  • North American Industry Classification System (NAICS-1997) (N. American Industry Classification System)
  • Universal Standard products and Services codes (UNSPSC-7.03) (Generic standard product and service code)
  • ISO 3166 geographic taxonomy (ISO 3166 geographic classification)
  • Standard Industrial Classification (SIC-1987) (Standard industry classification)
  • GeoWeb Geographic Classification (geoweb Geographic classification)
  • UDDI Types Taxonomy (UDDI type classification)
  • In addition to the UDDI type, Cold Rooster is registered in all categories. Companies are not registered in a UDDI type classification because they are dedicated to classifying TModel and service information.
  • to understand what needs to be registered, you must know the business scope and geography of Cold Rooster. Cold Rooster Consulting company is located in Redmond, Washington, USA. It provides engineering-based ancillary computer consulting services. Moreover, it specializes in windows-based and Internet development. Knowing these, we need to classify the company correctly according to six kinds of classification schemes respectively. Table 1 shows the classification of the company in accordance with each classification scheme. Classification Scheme NAICS
    • 541511:custom Computer Programming Services
    • 541512:computer Systems Design Services
    UNSPSC
    • 81.11.16.07.00:programming for C or C + +
    • 81.11.16.03.00:programming for HTML /li>
    • 81.11.16.01.00:programming for microsoft®visual basic®
    • 81.11.16.12.00:programming or Proprietary Languages (also includes C #)
    • 81.11.21.06.00:application service Providers (providing WEB services)
    • 81.11.21.03.00:world Wide Web (WWW) site design services
    ISO 3166
    • us-wa (Washington, USA, World)
    SIC
    • 7371:computer Programming Services
    • 7372:information Retrieval Services
    GeoWeb Geographic Classification
    • 518816 (Redmond, Washington, USA, North America, World)

Table 1:uddi Classification Example
Company Classification finished. The next step is to add three TModel. Add TModel
If you haven't read the last week's article, note that TModel is a type model. For WEB services, TModel is often synonymous with WSDL files. They use the same method to define the type used by the Web service and the message and operation definitions. Given a tModel, you can know what WEB service operations are implemented by the entity that implements the TModel, and how to access those operations. The WSDL file is registered as TModel because these TModel may eventually have multiple implementations.
The server-side collection Web service includes three Web services: logins, accounts, and reports. The login Web service allows an authorized person to log in and get a token. With this tag, an authorized person can access other methods in the accounts and reports Web services. To add a WSDL file, you need to deploy it on a server that can be accessed through the public Internet. You also need to use UDDI classification here.
To add TModel, on the Administration page (Figure 1), click Add a new TModel. Then you need to add some basic information about the TModel: name, description, and location of the WSDL document. When finished, classify the TModel as a WSDL document and publish the information to the UDDI registry. It's a breeze. Figure 3 shows the details to be filled in by the "login" TModel.

Figure 3: More information for the "login" TModel
On the next screen, you can add service classifications and company identities. The data here is the same as the data entered in the company information. As a service classification, we use only UDDI classifications. You can specify this information by clicking a series of links:
    • Types used for TModel
    • Specification for WEB Services
    • Specification for WEB Services described in WSDL
    • I used these steps for LOGON.WSDL, ACCOUNT.WSDL, and report.wsdl when registering for the Cold Rooster collection service. This information is available in the registry after UDDI registration is complete.
Defining Services
After the TModel is registered, you still need to add a service to declare the presence of these services. To add a service, go back to the admin page, and this time you will see that your company is listed in "Add A new Business" (Figure 1). Select your company and scroll to Services. Click "Add a Service" here. Fill in the details of the service on the first page. For the "Log on" Web service, I fill in the following:
    • Name: Login
    • Description: Verifying the authorized person and providing access token

Once completed, the service is categorized again as "WEB service specification described in WSDL". The service is then bound to the registered login TModel. In the "Define a new binding" field shown below, I fill in the following:
    • Access point:https://coldrooster.com/ssf/logon.asp
    • URL type:http
    • Description:cold Rooster Consulting company Login to WEB service endpoint

To complete this step, you must associate the service with the Favorites Web service: Login TModel. Under "Specification Signatures", select "ADD specification signature". To view the model by name, enter favorite Web service. This will invoke all three TModel saved by the collection service. Select "Favorites Web Service: Login" and press "Continue". A Web page is displayed, and you need to edit the details about the endpoint above. I fill in the following contents:
    • Edit specification Signature; Description: The Cold Rooster implementation of the Favorites Web service: Login TModel
    • Instance details; Parameters:http://msdn.microsoft.com/library/?url=/library/en-us/dncold/html/ssfapiref.asp?frame=true
    • Instance details; Description:api Referencing documents
    • Overview document; Document location:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncold/html/ssf1sec.asp
    • Overview document; Description: Server-side Collection security information

Once completed, click "Continue" again. Next, you can view all the information you entered about the logon service before you return to the main company Data View and publish all the information to the UDDI registry. Repeat this process for accounts and reports Web services. Find Data
According to the GeoWeb classification, today (October 8, 2001) only one company is listed in Redmond: Cold Rooster consulting firm. Use the ISO 3166 category to search again. Nine companies were found this time. Other classifications will produce other statistical results. For other classification scenarios, the results usually take several pages to occupy.
Data is now available, so people interested in Web services that store URL URLs can theoretically find and use Cold Rooster solutions. For users who use Microsoft®visual studio®.net, it is simpler to use UDDI to find Web services and add them to their projects.
The first time you encounter the ADD Web Reference dialog box (Project | ADD Web Reference "), a dialog box is displayed that allows you to find a Web reference (also known as a WSDL file) from a Microsoft UDDI server. The endpoint for Visual Studio is http://uddi.microsoft.com/visualstudio/. When you tell the endpoint to find all the companies that start with "cold," it only finds the three Web services I registered: Accounts, logins, and reports. You can view the results of this query here (in English). To add a Web reference to the login Web service, simply click Logon to extend the node, and then click Favorites Web service:logon to view the WSDL. Here, click "Add Reference" to log on to the Favorites Web service.
If you have not received your collection service authorization by now, please go to Favorites service Admin Console for one. You will receive a password within 15-30 minutes. To connect to the login Web service using Visual Basic, code writing is simple:
Sub Main () Dim Svc as New Com.coldrooster.www.Logon () System.Console.WriteLine (SVC). Logon ("License Holder", "password") System.Console.WriteLine ("Press Enter to Exit") System.Console.ReadLine () Svc. Dispose () End Sub

The code displays a GUID token for users to access other methods available in the Favorites Web service. The code to write other methods is just as simple. Summary
By using UDDI registry companies, custom TModel, and Web services, you can help developers around the world find your Web services. The UDDI registry allows you to publish more than just WEB service endpoints and company data. Users who use UDDI can also use this interface to find Web service documents and samples. Microsoft UDDI Registry is used for free. We encourage users to register your WEB services and companies with this registry. Please take some time to familiarize yourself with the http://uddi.microsoft.com (English). You may be trying to find information about a Cold Rooster consulting company and browse to see all available information. Last but not least, it's a great time to use Visual Studio. NET to connect to the collection service and do the actual operation.
Next time, it will be hosted by guest columnist Allen Wagner. Allen will discuss techniques for handling large SOAP messages.


At Your Service
Scott Seely is a member of the MSDN architectural Samples group. In addition to his work there, he published two books through Prentice Hall: the Soap:cross Platform Web service Development Using XML (SOAP: The development of Cross-platform WEB Services using XML) and "Windows Shell Programming" (Windows shell Programming). He also writes and maintains a small, C + +-based SOAP library (located in http://www.scottseely.com/soap.htm). The library is released according to the LGPL protocol.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.