.NET Web Services Solutions 2

Compaq Confidential

February 2002
168Z-0202A-WWEN
Prepared by:
Internet & E-Commerce Solutions
Compaq Computer Corporation

Contents

Introduction 3

What is a Web Service? 3

Microsoft .NET 3

Microsoft Web Services 4

.NET Technologies Used to Develop an XML Web Service 4

Deployment of XML Web Services 6

Consuming a .NET Web Service 7

Private Web Services 8

Public .NET Web Services 9

Performance Considerations 10

Security Considerations 10

Discoverable Web Service (UDDI) 14

Management of Web Services 16

DISA and a Web Services 20

The DISA Architecture 20

DISA Key Principles 21

Conclusion 22

APPENDIX A - Microsoft’s CLR 23

APPENDIX B - Example 25

Overview of a B2B Web Service Demonstration 25

Sample Web Service Processing Flow 29

Files and Code Samples of Sample Process Flow 31

APPENDIX C - System Software 35

APPENDIX D – References 37

APPENDIX E - Glossary 43


Microsoft .NET Web Services Solutions

Abstract: This document identifies the technologies associated with Microsoft XML Web Services and documents best practices for developing, deploying, consuming, securing, and managing a Web service. This document also discuses the performance, scaling, and availability concerns of Web Services. .NET is Microsoft’s implementation of an Internet application development platform using a suite of technologies, tools, products, and standard protocols. The .NET Platform is used to develop XML Web Services (or .NET Web Services), which are Microsoft’s implementation of Web services. An XML Web Services prototype example, with associated source code, is provided in an appendix of the document.

The target audience of this document is any individual who needs a better understanding on how to develop, deploy, consume, secure, or manage a Web service. The reader should already understand Microsoft’s .NET and Web Services concepts.

168Z-0202A-WWEN

Microsoft .NET Web Services Solutions 2

Notice

This publication does not constitute an endorsement of the product or products that were tested. The configuration or configurations tested or described may or may not be the only available solution. This test is not a determination of product quality or correctness, nor does it ensure compliance with any federal, state or local requirements.

Compaq, the Compaq logo, ActiveAnswers, Compaq Insight Manager, SmartStart, SoftPaq, and ProLiant are trademarks of Compaq Information Technologies Group, L.P. in the U.S. and/or other countries.

The .Net logo, Microsoft, Windows, Windows NT, BizTalk, SharePoint, Visio, Visual Basic, Visual C#, Visual Studio, Win32, and Visual C++ are trademarks of Microsoft Corporation in the U.S. and/or other countries.

All other product names mentioned herein may be trademarks of their respective companies.

Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information is provided “as is” without warranty of any kind and is subject to change without notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.

©2002 Compaq Information Technologies Group, L.P.

Microsoft .NET Web Services Solutions
Solutions Guide prepared by Internet & E-Commerce Solutions

First Edition (February 2002)
168Z-0202A-WWEN

168Z-0202A-WWEN

Microsoft .NET Web Services Solutions 2

Introduction

Today most businesses on the Internet revolve around websites, which typically do a good job of providing information to a user. These websites can support transactions and commerce using the Internet. Typically, these websites fall into two general categories: a static or brochure type of site, or a dynamic or commerce site.

Other types of businesses on the Internet include non-website-centric businesses like Business-to-Business (B2B) and market exchanges. These types of businesses are still evolving and are a fertile ground for the technology referred to in this document.

For these businesses to evolve on the Internet, they must use methods to interact with one another as well as with users, other applications and systems.

Web services represent the evolution of the website. Taking the modular aspects of modern software applications and allowing them to communicate through standard Internet protocols, such as XML[1] and SOAP[2], Web services offer a direct means by which business processes can interact. Applications hosted internally, as well as on remote systems, can be stitched together, allowing businesses to program the Web—quickly and economically creating specialized solutions that meet unique business needs.

Compaq enhances Microsoft .XML Web Services by providing an implementation and deployment blueprint as well as a set of recommended best practices based on years of experience deploying the Compaq Distributed Internet Server Array (DISA) architecture. Microsoft XML Web Services can be readily deployed in a highly available and scalable fashion using the DISA architecture. This document addresses how to decrease both the implementation time and risk associated with the deployment of Microsoft XML Web Services.

What is a Web Service?

A Web service is a piece of business functionality exposed via Internet protocols. Web services are Internet-based modular applications that perform a specific business task and conform to a specific technical format. The modular technical format allows for these self-contained business services (from the same or different companies) to mix and match easily to create a complete business process.

Microsoft .NET

.NET is Microsoft’s implementation of an Internet-application-development platform using a suite of technologies, tools, products, and standard protocols. The .NET Platform is used to develop XML Web Services, which are Microsoft’s implementation of Web services.

There are many definitions for what .NET is (and is not). It is not within the scope of this document to define .NET, but to discuss Microsoft XML Web Services in the context of .NET technologies. Below are just a few of the definitions currently available for Microsoft .NET:

·  “Microsoft .NET is an XML Web services platform that will enable developers to create programs that transcend device boundaries and fully harness the connectivity of the Internet.” (Source: Microsoft: Welcome to the MSDN Library)

·  “Microsoft’s .NET is a company-wide effort to move Microsoft’s developers, products, customers, and services from the client-server computing model to Microsoft’s vision of the Web services model” (Source: The Burton Group: Network Strategy Report)

·  “.NET is an all-inclusive Web-based software architecture for internal and external use. Microsoft browsers, applications and new versions of Windows will be .NET enabled.”
(Source: TechWeb Encyclopedia)

·  “When you look at the fundamentals about what's happening with .NET, this is the ability to really create a very rapid deployment at a much lower cost of Internet applications,’ Michael Capellas, CEO of Compaq Computer Corp., told reporters during a break in the meeting. ‘It's freeing our applications developers not to have to worry about all the basic-level services. It lowers the cost and creates a much better user experience on the front end,’ he added. ‘It actually finally allows us to really come with a much, much more rapid development process around Internet applications.’ Calling .NET ‘a major move,’ he emphasized that Compaq is ‘going full-bore behind" the strategy.’ ” (Source: BridgeNews Bulletins, Thursday, May 24, 2001)

Microsoft Web Services

Microsoft XML Web Services are Microsoft’s implementation of XML-based Web services and are developed using .NET platform technologies. This section of the document assists the reader with some of the infrastructure issues associated with deploying .NET Web Services.

.NET Technologies Used to Develop an XML Web Service

·  .NET Enterprise Servers:

–  Application Server 2000

–  BizTalk Server 2000

–  Commerce Server 2000

–  Content Management Server 2001

–  Exchange Server 2000

–  Host Integration Server 2000

–  Internet Security and Acceleration Server 2000

–  Mobile Information Server 2001

–  SharePoint Portal Server 2001

–  SQL Server 2000

·  Windows 2000 Servers: (Windows Family Home Page)

·  .NET Framework: (.NET Framework). A Windows run-time environment that provides an enhanced set of system-level functionality designed to assist in the development and management of Microsoft XML Web Services:

·  Common Language Runtime (CLR) Managed Code: Provides a richer set of OS Services than is available to the Win32 OS itself. (Additional information on Microsoft’s CLR can be found in the Appendix)

–  Memory Management (Automatic Garbage collection of Methods and Objects no longer in use)

–  Version Management (DLLs, EXEs)

–  Object Oriented Programming (OOPs) support across languages (same feature sets across multiple languages)

–  Hierarchical Namespace organization

–  Code Security (built in granular security controls)

–  Interoperability with COM (uses a Runtime Callable Wrapper (RCW) to run a COM object from a .NET Client and a COM Callable Wrapper (CCW) to run a .NET object from a COM Client.)

–  ASP.NET (.NET version of Active Server Pages): It includes a tool (.NET Web Forms), which is an easy to use UI for ASP.

·  Visual Studio.NET: (Microsoft Visual Studio: Microsoft Visual Studio.NET - Next Generation)

–  Visual Basic

–  C++

–  C#

–  Other Languages see: http://msdn.microsoft.com/vstudio/partners/languages/default.asp

·  .NET Windows Forms: (Introducing Windows Forms) A new forms package that provides an interface UI design environment for the features of the .NET Framework.

In addition, there are other standard technologies used by .NET (Reference: Welcome to the MSDN Library):

·  ADO.NET - ActiveX Data Objects, Microsoft's high-level interface for data objects.

·  XML - Extensible Markup Language, a specification developed by the W3C. XML is a pared-down version of SGML, designed especially for Web documents.

·  HTTP - HyperText Transfer Protocol, the underlying protocol used by the World Wide Web.

·  SMTP - Simple Mail Transfer Protocol, a protocol for sending e-mail messages between servers.

·  TCP/IP - Transmission Control Protocol over Internet Protocol. TCP is one of the main protocols in TCP/IP networks. Whereas the IP protocol deals only with packets, TCP enables two hosts to establish a connection and exchange streams of data.

·  SOAP – Simple Object Access Protocol (SOAP) is a lightweight protocol for exchange of information in a decentralized, distributed environment. SOAP relies on the use of a transport protocol, and while it is not tied to a particular transport protocol, currently HTTP is the onlyone that has been defined by the W3C.

·  UDDI - Universal Description, Discovery and Integration creates a platform-independent, open framework for describing services, discovering businesses, and integrating business services.

·  WSDL – Web Services Description Language is an XML format for describing network services as a set of endpoints operating on messages containing either document-oriented or procedure-oriented information. The operations and messages are described abstractly, and then bound to a concrete network protocol and message format to define an endpoint. Related concrete endpoints are combined into abstract endpoints (services). WSDL is extensible to allow description of endpoints and their messages regardless of what message formats or network protocols are used to communicate. Visual Studio.NET has the ability to auto-generate proxies of Web services based on WSDL. This feature automatically allows developers to have an SDK to work with at the object level without having to do string manipulation to build SOAP Requests.

Note:Additional information can be found in the Glossary in APPENDIX E - Glossary.

Deployment of XML Web Services

While a Microsoft XML Web Service (Web Service) can be defined as any URL-addressable resource that provides Web-exposed business functionality, there are standards and technologies that have been developed to facilitate the implementation of Web Services.

Creating and Publishing a Web Service

By publishing a Web Service, an application can be created that exposes functionality to clients via the Web. Creating a Web Service is similar to creating any component that provides programmatic access to its application logic.

To create a Web Service, you need:

·  Functionality that constitutes the service you wish to expose

·  A service description that defines how to use the service

·  A messaging infrastructure to support request processing and response dispatch

Publishing a Web Service is the process of creating application code that handles requests and responses as method calls. These method calls take parameters and return values. There are three basic steps involved in Web service creation and publishing:

·  Create your Web Service

·  Test the Web Service using remote debugging

·  Publish your Web Service to the server from which it will be accessible and verify that it is accessible from a client. Publishing a Web service involves:

–  Deploying your solution to the Web server on which it will reside

–  Creating the necessary discovery mechanisms so that users can find out about your service and make use of it.

Web Services are made available to users via a discovery mechanism that usually takes the form of a dynamic discovery document. The discovery document contains a reference to the WSDL (Web Service Description Language) description location. End users browse the root of the Web server to locate discovery documents, and from these files, they determine what services are available to them. This discovery document is deployed with the project and placed in the directory in which the solution is installed on the server. For example, suppose you have a Web application project created in Microsoft VisualStudio.NET named StockServicesSolution that contains a Web service named StockServices. By default, the solution contains a discovery file called StockServices.disco. When you deploy this solution to the server, the following structure is created:

\inetpub

\wwwroot

\StockServices

StockServices.disco

StockServices.asmx

Other files for your Web Service

End users can access this discovery file by accessing its URL. In this case, the URL would be http://webserver/StockServices/StockServices.disco.

The .NET Framework provides the infrastructure on which to develop Web Services. This infrastructure includes built in SOAP support, a Web Services Description Language (WSDL) Tool, a Web Services Discovery Tool, XML Schema Definition Tool, Code Access and Role Based Security, and built in Web Service support to handle XML, POST, GET and SOAP.

Consuming a .NET Web Service

To access a Web Service, you need:

·  To locate a Web Service that provides needed business functionality

·  To locate the service description that defines how to use the service