.NET Web Services Solutions1

Compaq Confidential

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

Contents

Introduction

What is a Web Service?

Microsoft .NET

Microsoft Web Services

.NET Technologies Used to Develop an XML Web Service

Deployment of XML Web Services

Consuming a .NET Web Service

Private Web Services

Public .NET Web Services

Performance Considerations

Security Considerations

Discoverable Web Service (UDDI)

Management of Web Services

DISA and a Web Services

The DISA Architecture

DISA Key Principles

Conclusion

APPENDIX A - Microsoft’s CLR

APPENDIX B - Example

Overview of a B2B Web Service Demonstration

Sample Web Service Processing Flow

Files and Code Samples of Sample Process Flow

APPENDIX C - System Software

APPENDIX D – References

APPENDIX E - Glossary

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 Solutions1

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.

©2018Compaq 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 Solutions1

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:

  • .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 Languageis 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

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
  • To use a messaging infrastructure to support request processing, and response dispatch

The location of a Web Service, as well as the service description, is accomplished using UDDI (Universal Description, Discovery, and Integration). The goal is to create and operate a global registry for business-to-business commerce over the Internet. The service description is composed of WSDL (Web Services Description Language). WSDL is an XML-based language used to describe programs accessible via the Internet (or other networks), and the message formats and protocols used to communicate with them. WSDL is important because it enables Web Services to describe their capabilities in a standard way, enabling easier interoperability among Web Services and development tools.

A Web Service can be consumed via three different methods: HTTP POST, HTTP GET, or SOAP. SOAP (Simple Object Access Protocol) is an Internet-friendly way of using XML to send messages and access dynamic Web Services across distributed networks.

Typically, Enterprises will deploy two types of Web Services: secure and public. A secure Web Service is one published for use by an enterprise’s trusted trading partner or customer. A public Web Service is published and available for everyone to consume with few privacy or security requirements.

Private Web Services

Enterprises will have the need to publish Web Services that are going to be consumed by trading partners or customers. Since these types of Web Services will be consumed by these organizations to conduct business, they will become mission critical to all parties involved. With mission-critical requirements for the Web Services, availability and scalability become critical attributes of the components within the architecture. Figure 1 shows a typical scenario for hosting the Web services.

Figure 1: Private Web Service consumed by a trusted trading partner.

In this scenario, the Web Service is published and consumed by the trading partners on the DMZ. An example of this transaction would be the need for the trading partner to submit SAP orders into the organization. The port used to access the Web Service is determined by an agreement between both parties involved – the trading partner and the enterprise. The requests come in the form of XML documents from the trading partner. The first step is a farm of Web/application servers running Microsoft BizTalk Server 2000. Using a farm of servers, rather than a single server, is done for availability and scalability. In this scenario, BizTalk Server 2000 serves multiple purposes – XML document validation and authentication, aggregation of various XML schemas to one common scheme, and guaranteed message delivery. Next is the use of the published Web Service. In this scenario, the Web Service is used to publish data consumed from another Web Service or as an adapter for a back-end ERP system. Using the Web Service as an adapter eliminates the need for highly customized software and communications components.

Another use of a Web Service in this scenario is to have an application in the DMZ consume data from a Web Service located in the corporate network. This type of transaction uses Simple Object Access Protocol (SOAP), eliminating the need to have multiple ports open on the back-end firewall. In all instances, the Web Services are hosted on farms of Web servers using load balancing to provide scalability and availability.

Public .NET Web Services

In addition to secure Web Services, enterprises may have occasion to publish data that is to be consumed by everyone. This type of Web Service does not require authorization, authentication or privacy. Examples of these types of Web Services would be ones that provide the company’s stock price or a current listing of products. Figure 2 shows this type of deployment.