Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 42 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
42
Dung lượng
722,93 KB
Nội dung
Contents Overview 1 Overview of UDDI 2 Publishing a Web Service 17 Finding a Web Service 20 Publishing a Web Service on an Intranet 22 Configuring a Web Service 24 Lab 6:Publishingand Finding WebServices in a UDDI Registry 27 Review 38 Module6:PublishingandDeployingWebServices Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, places or events is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property. 2001 Microsoft Corporation. All rights reserved. Microsoft, MS-DOS, Windows, Windows NT, Active Directory, Authenticode, Biztalk, Intellisense, Jscript, MSDN, PowerPoint, Visual Basic, Visual C++, Visual C#, Visual Studio, Win32, and Windows Media are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners. Module6:PublishingandDeployingWebServices iii Instructor Notes This module teaches students how to publish WebServicesand locate WebServices using the Microsoft ® Universal Description, Discovery, and Integration (UDDI) software development kit (SDK). A local development UDDI registry is used in the demonstrations and lab for this module, but the mechanics of publishingand finding WebServices is no different on the public UDDI registry nodes. After completing this module, students will be able to: ! Explain the role of UDDI in Web Services. ! Publish a Web Service in a UDDI registry using the Microsoft UDDI software development kit (SDK). ! Search a UDDI registry to locate WebServices by using the UDDI SDK. ! Explain the various options for publishing a Web Service on an intranet. ! Explain some of the options for modifying the default configuration of a Web Service. Materials and Preparation This section provides the materials and preparation tasks that you need to teach this module. Required Materials To teach this module, you need the Microsoft PowerPoint ® file 2524A_06.ppt. Preparation Tasks To prepare for this module: ! Read all of the materials for this module. ! Practice all of the demonstrations. ! Review the walkthrough demo code in <install folder>\Democode\Mod06. ! Complete the lab. Presentation: 90 Minutes Lab: 60 Minutes iv Module6:PublishingandDeployingWebServicesModule Strategy Use the following strategy to present this module: ! Overview of UDDI This topic provides and overview of the role of UDDI registries in the process of Web Service discovery. The UDDI data structures and application programming interfaces (APIs) are explained. Ensure that you cover each of the elements in the UDDI data structure and describe how they are used. Many students might have difficulty understanding the tModel element. Explain that the tModel element is deliberately generically defined because it can be used in multiple ways in UDDI. Explain that using tModel to represent WebServices Description Language (WSDL) documents is just one of its uses. Provide only a brief overview of publisher assertions. Explain the publisher and inquiry APIs. Emphasize that each of these APIs is a Web Service operation that can be invoked using Simple Object Access Protocol (SOAP). Explain how the UDDI SDK encapsulates these operations. ! Publishing a Web Service Explain how to publish tModels and business entities. Emphasize that tModels are not explicitly associated with business entities. Therefore, before publishing a business service, you must publish the necessary business entities and tModels. Explain how to publish a binding template and also explain the importance of binding templates in locating the endpoints for Web Services. ! Finding a Web Service Explain how to locate binding information for a Web Service using the UDDI SDK. Emphasize that at the moment there no standards for how WebServices should be published and how the information that is published about a Web Service should be used to locate the Web Service. Explain to the students that they will not be able to locate endpoints for all WebServices programmatically. ! Publishing a Web Service on an Intranet Explain the issues involved in deploying a Web Service on an Intranet from the perspective of publishingand finding Web Services. This topic explains some of the options that are available for publishing a Web Service on an intranet in the absence of a commercial private UDDI registry. ! Configuring a Web Service This topic focuses on the issues specific to the assemblies that make up a Web Service. The topic covers modifying the default discovery behavior, configuring assembly settings, security considerations, and localization of assemblies. Use this topic to introduce students to topics such as localizations and building anddeploying satellite assemblies, which are beyond the scope of this course, and yet applicable to Web Services. Module6:PublishingandDeployingWebServices 1 Overview ! Overview of UDDI ! Publishing a Web Service ! Finding a Web Service ! Publishing a Web Service on an Intranet ! Configuring a Web Service ***************************** ILLEGAL FOR NON - TRAINER USE ****************************** Module 4, “Consuming Web Services,” in Course 2524A, Developing XML WebServices Using Microsoft Visual C# .NET Beta 2 explains locating WebServices discovery documents at known endpoints (network locations). You can locate WebServices at unknown endpoints by using a public registry of Web Services. Universal Description, Discovery, and Integration (UDDI) registries facilitate service discovery on the Web. After completing this module, you will be able to: ! Explain the role of UDDI in Web Services. ! Publish a Web Service in a UDDI registry using the Microsoft ® UDDI software development kit (SDK). ! Search a UDDI registry to locate WebServices by using the UDDI SDK. ! Explain the various options for publishing a Web Service on an intranet. ! Explain some of the options for modifying the default configuration of a Web Service. Topic Objective To provide an overview of the module topics and objectives. Lead-in In Module 4, “Consuming Web Services,” in Course 2524A, Developing XML WebServices Using Microsoft Visual C# .NET Beta 2, you learned about locating WebServices discovery documents at known endpoints. 2 Module6:PublishingandDeployingWebServices " "" " Overview of UDDI ! What Is UDDI? ! UDDI Data Structures ! Demonstration: Using UDDI Explorer ! UDDI Programmer's API ***************************** ILLEGAL FOR NON - TRAINER USE ****************************** The role of a Web Service broker is essential in WebServices architecture to make it possible for potential consumers to easily find a Web Service. UDDI registries fulfill the role of a Web Service broker. In this section, you will learn about UDDI and its specifications. Topic Objective To introduce the topics in this section. Lead-in The role of a Web Service broker is essential in WebServices architecture to make it possible for potential consumers to easily find a Web Service. Module6:PublishingandDeployingWebServices 3 What Is UDDI? ! A Collection of Specifications # Specifications for distributed Web-based information registries of WebServices - UDDI Programmer’s Specification - UDDI Data Structure Specification ! UDDI Registry Implementations # Implementations of the specifications ***************************** ILLEGAL FOR NON - TRAINER USE ****************************** Before learning how to programmatically publish and discover Web Services, it is important to understand the functions of UDDI from a programmer’s perspective. A Collection of Specifications Universal Description, Discovery, and Integration (UDDI) is a collection of specifications for distributed Web-based information registries of Web Services. These specifications are broken down into a number of categories. The UDDI Programmer’s application programming interface (API) Specification and the UDDI Data Structure Specification are of specific interest to a Web Service developer. The current versions of these specifications can be found at http://www.uddi.org. All of the information about the UDDI Programmer’s API and UDDI Data Structure specifications is based on version 2.0 of the specifications. The UDDI Programmer’s API Specification The UDDI Programmer’s API defines functions that provide a simple request/response model for accessing UDDI registries. There are two types of API defined in the API reference: ! A publisher API that allows you to publish data in a registry. ! An inquiry API that allows you to read information from a registry. The Programmers’ API specification defines approximately 40 Simple Object Access Protocol (SOAP) messages that are used to query for information and publish functions in any UDDI-compliant service registry. Topic Objective To describe UDDI and its specifications. Lead-in Before learning how to programmatically publish and discover Web Services, it is important to understand the functions of UDDI from a programmer’s perspective. Note 4 Module6:PublishingandDeployingWebServices The UDDI Data Structure Specification The UDDI Data Structure Specification outlines the details of each of the Extensible Markup Language (XML) structures associated with the messages defined in the Programmer’s API Specification. UDDI Registry Implementations UDDI is also a set of implementations of the specifications that allow businesses to register information about the WebServices that they offer so that other businesses can find them. These implementations are publicly accessible. Also, UDDI registries are themselves available as Web Services. At the time of this writing, there are two public implementations of these specifications. They can be located at http://uddi.microsoft.com and http://www-3.ibm.com/services/uddi. Multiple root UDDI nodes (network nodes or computers that host UDDI registries) provide a logically unified, but physically distributed and replicated information store for WebServices metadata (service descriptions, etc.). UDDI can provide answers to queries such as: ! What WebServices does a specific business provide? ! What are all the known endpoints for a specific Web Service? ! What is the current binding information (supported protocols, etc.) for a specific Web Service endpoint? Other possible queries, such as price comparison of WebServices or geographic proximity, are not part of the UDDI specification. Currently, such additional queries and associated metadata are considered value-added services that vendors are free to implement and offer. Module6:PublishingandDeployingWebServices 5 UDDI Data Structures businessService: Descriptive information about a particular service. publisherAssertion: Information about a relationship between two parties, asserted by both of them. tModel: Descriptions of specifications for services or taxonomies. Basis for technical fingerprints. bindingTemplate: Technical Information about a service entry point. businessEntity: Information about the party who publishes information about a family of services. ***************************** ILLEGAL FOR NON - TRAINER USE ****************************** The UDDI Data Structure Specification defines the XML schema that is used to describe types in UDDI. The specification defines five data types: ! businessEntity ! businessService ! bindingTemplate ! tModel ! publisherAssertion The preceding data structures are defined using the XML Schema Definition Language (XSD). Let us examine each of the data structures. The businessEntity Element The businessEntity element describes a business or an entity that has registered a Web Service within UDDI. The businessEntity is the top-level element that contains descriptive information about a business or an entity. This element supports standard information such as name, description, and contacts, as well as metadata information such as identifiers and categories. The latter information is used for standard taxonomies of business identifiers (tax identifiers, D-U-N-S numbers, etc.) and categories (industry codes, geography codes, etc.). Service descriptions and technical information are related to a businessEntity by using containment. D-U-N-S numbers are 9 digit numbers that are used as unique company identifiers, by most companies around the world. They are issued by a company named Dun & Bradstreet. Topic Objective To explain the main data structures defined by the UDDI specifications, and how they relate to each other. Lead-in The UDDI Data Structure Specification defines the XML schema that is used to describe types in UDDI. Delivery Tip Explain the code for registering the businessEntity element using the file <install folder>\Democode\Mod06\ businessEntity.txt. Note 6 Module6:PublishingandDeployingWebServices The following XML code shows a document that can be used to register a businessEntity: <businessEntity ! businessKey="434554F4-6E17-1342-EA4136E642531DA0"! operator=""> <name>Contoso Micropayments</name> <description xml:lang="en"> The Contoso Micropayment Service </description> <contacts> <contact> <description xml:lang="en"> Website Administrator </description> <personName>Jeff Smith</personName> <phone>800-555-1212</phone> <email>jeff.smith@contoso.com</email> <address> <addressLine>1 Microsoft Way</addressLine> <addressLine>Redmond, WA</addressLine> </address> </contact> </contacts> </businessEntity> [...]... localizations and building anddeploying satellite assemblies, see Course 2350A, Securing andDeploying Assemblies Module 6:PublishingandDeployingWebServices 27 Lab 6:Publishingand Finding WebServices in a UDDI Registry Topic Objective Contoso Micropayment Web Service To introduce the lab UDDI Registry Lead-in Woodgrove Bank Web Service Firewall In this lab, you will publish and locate Web Services. .. relevant to Web Services, see Module 7, “Securing Web Services, ” in Course 2524A, Developing XML WebServices Using Microsoft Visual C# NET Beta 2 However, a full coverage of the details on assembly security and deployment is beyond the scope of this course For more information on these topics, see Course 2350A, Securing andDeploying Assemblies 26 Module6:PublishingandDeployingWebServices Configuring... industry standards ! Hard coded endpoints Another alternative is to hard code the Web Service endpoints in your Web Service consumers This solution has the advantage of being very simple and quick to implement The disadvantage is that the resulting solutions will not be able to handle changes in the location of a Web Service 24 Module6:PublishingandDeployingWebServices Configuring a Web Service... this information and uses it whenever it needs to interact with a Web Service If the Web Service becomes unavailable, the consumer can search the UDDI registry for other business entities that implement the same Web Service interface The binding information for a compatible Web Service can then be retrieved Module 6:PublishingandDeployingWebServices 15 The Publisher APIs The Inquiry and Publisher... to locate your Web Service In this scenario, you must write your own discovery document if you want your Web Service to be dynamically discoverable Module 6:PublishingandDeployingWebServices 25 If you deploy a Web Service without using Visual Studio NET, you must write your own discovery document For details on the structure of discovery documents, see Module 4, “Consuming Web Services, ” in Course... Finding WebServices solution for Lab 6, Publishingand Finding Web Services, ” which is available in the file \Labfiles\Lab06\ Solution\FindWebServices \bin\Debug\FindWeb Services. exe Also, you can explain all the code pieces in the student notes by showing the code in the event handlers for the Find button, by opening the file \Labfiles\Lab06\Sol ution\FindWebServices\Fi... found: Bind to the Web Service After you find the binding information, it is easy to set the URL property of the Web Service proxy and invoke Web Service methods The following code shows how to do this: NorthwindEFTService eft = new NorthwindEFTService(); eft.Url = strURL; XmlNode balances = eft.GetCurrentBalances("1XF99-S"); 22 Module6:PublishingandDeployingWebServicesPublishing a Web Service on... tModelInstanceDetail, and tModelInstanceCollection elements The SDK contains a simple UDDI server implementation that is useful for testing code without using a public UDDI server, such as uddi.microsoft.com Module 6:PublishingandDeployingWebServices 17 Publishing a Web Service Topic Objective To explain how to use the UDDI SDK wrapper classes to publish a Web Service ! Getting an Authentication Token Lead-in ! Publishing. .. saveBinding.Send(); 20 Module6:PublishingandDeployingWebServices Finding a Web Service Topic Objective To explain how to use the Microsoft UDDI SDK wrapper classes to find a Web Service Lead-in One of the most important activities for a Web Service consumer is to locate the endpoint of a Web Service that implements a specific interface ! Locate a Business ! Retrieve Binding Information ! Bind to the Web Service... you implemented the Contoso Web Service As a Web Service provider, you might want to publish this Web Service As a Web Service consumer, you might want to find the WSDL document and the endpoint for this Web Service In this lab, you will implement a simple application to register both the Contoso and Woodgrove WebServicesand implement a simple application to find these WebServices Estimated time to . this course, and yet applicable to Web Services. Module 6: Publishing and Deploying Web Services 1 Overview ! Overview of UDDI ! Publishing a Web Service. Finding Web Services in a UDDI Registry 27 Review 38 Module 6: Publishing and Deploying Web Services Information in this document, including URL and other