You are previewing Microsoft® .NET XML Web Services Step by Step.
O'Reilly logo
Microsoft® .NET XML Web Services Step by Step

Book Description

XML Web services are the next logical step in the evolution of the Internet. Teach yourself how to write and deploy XML Web services for Microsoft® .NET?one step at a time—with this modular, accessible tutorial. It delivers expert, task-based instruction plus a real-world XML service example to help you apply what you already know about Microsoft Visual C#™, Microsoft Visual Basic® .NET, and object-oriented programming so that you can learn XML Web services development at your own pace.

Table of Contents

  1. Microsoft® .NET XML Web Services Step by Step
  2. A Note Regarding Supplemental Files
  3. Dedication
  4. Introduction
    1. Why We Wrote This Book
    2. Who Should Read This Book
    3. Organization of This Book
      1. Part 1—Understanding XML Web Services
      2. Part 2—XML Web Services and Clients
      3. Part 3—Advanced XML Web Services
      4. Part 4—Appendixes
    4. Installing and Using the Practice Files
      1. Downloading and Installing the Libraries and Sample Code
      2. System Requirements
    5. Conventions and Features in This Book
    6. Support
  5. I. Understanding XML Web Services
    1. 1. Introduction to XML Web Services
      1. What Are XML Web Services?
      2. XML Web Service Examples
        1. Information Services
        2. Centralization Services
        3. Data Integration, Aggregation, and Analysis
        4. Extending and Integrating Applications
        5. Peer-Based and Push-Based Systems
      3. The Benefits of XML Web Services
        1. Standards Based
        2. Vendor Neutral
        3. Simplicity
        4. Language and Platform Independence
        5. Functional Abstraction
        6. Discoverable
        7. Reduced Development Time
      4. Challenges Facing XML Web Services
        1. Immature Technology
        2. Consumer Adoption
        3. Unproven Business Model
        4. Managing Complexity
        5. Maintaining Consistency
        6. Operational Issues and Support Infrastructure
      5. XML Web Services Standards and Protocols
        1. Directory and Discovery
          1. UDDI
          2. DISCO
        2. Description
          1. WSDL
        3. Messaging
          1. SOAP
        4. The Extensible Markup Language
        5. Transport
      6. XML Web Service Architecture
        1. Directory, Discovery, and Description
        2. Proxy Objects
      7. Creating XML Web Services with ASP.NET
        1. Summary
    2. 2. Developing XML Web Services Using Visual Studio .NET
      1. Preparing the Development Environment
        1. IIS Server Requirements
        2. Installing Internet Information Services
        3. Configuring IIS Server for XML Web Service Development
        4. Installing Visual Studio .NET
      2. ASP.NET Fundamentals for XML Web Services
        1. ASMX Files
        2. The @ WebService Directive
        3. Code-Behind Files
      3. Creating XML Web Service Projects in Visual Studio .NET
        1. Creating the HelloWorld XML Web Service
        2. Testing the HelloWorld XML Web Service
        3. The XML Web Services Project Files
        4. Uploading Files to IIS Server from Visual Studio .NET
      4. Chapter 2 Quick Reference
    3. 3. Building the Credit Card Validation Service
      1. The Credit Card Validation Service
        1. The Credit Card Validation Process
        2. CreditCardValidator Library Functionality
      2. The VISAValidator Service
        1. Creating the VISAValidator Service
        2. Testing the VISAValidator XML Web Service
      3. Understanding the VISAValidator Code
        1. The System.Web.Services Namespace
        2. The WebService Base Class
        3. The WebService Attribute
        4. The WebMethod Attribute
      4. Chapter 3 Quick Reference
  6. II. XML Web Services and Clients
    1. 4. Building a SOAP Client
      1. Proxy Classes and Web References
        1. Creating a Web Reference
        2. Renaming the Web Reference
        3. Viewing the Web Reference Files and Properties
        4. Using a Proxy Class
      2. XML Web Service Clients
        1. Creating the Windows Forms Client
        2. Creating the Web Forms Client
        3. Creating the Console Client
      3. Chapter 4 Quick Reference
    2. 5. Building an HTTP Client
      1. HTTP-GET and HTTP-POST Protocols
        1. Comparing HTTP-GET and HTTP-POST
        2. Comparing HTTP and SOAP
      2. Consuming XML Web Services Using HTTP
        1. HTTP Proxy Classes
        2. Creating a Web Forms Client
      3. Chapter 5 Quick Reference
    3. 6. Data Types in XML Web Services
      1. Representing Data Using SOAP
      2. Representing Data Using HTTP
      3. Simple Types
      4. Complex Types
        1. Creating an XML Web Service That Uses a Complex Type
        2. Consuming an XML Web Service That Uses a Complex Type
      5. Reference Arguments
        1. Creating an XML Web Service That Uses Reference Arguments
        2. Consuming an XML Web Service That Uses Reference Arguments
      6. Chapter 6 Quick Reference
    4. 7. Exception Handling
      1. How ASP.NET Handles Exceptions
      2. Using Custom Fault Codes
        1. Throwing Exceptions in XML Web Services
        2. Handling Exceptions in XML Web Service Clients
        3. Testing the WindowsFormsClient Application
      3. Chapter 7 Quick Reference
    5. 8. Debugging XML Web Services with Visual Studio .NET
      1. Breakpoints and Exceptions
      2. Using Breakpoints
        1. Creating the XML Web Service Debugging Project
        2. Creating the XML Web Service Client
        3. Setting a Breakpoint
        4. Stepping with the Debugger
      3. Configuring Breakpoints
        1. Using the Hit Count
          1. Trigger the Breakpoint
          2. Reset the Hit Count
        2. Breaking on Conditions
          1. Trigger the Breakpoint
          2. Change the Breakpoint Condition
          3. Trigger the Breakpoint
        3. Disabling and Removing Breakpoints
      4. Breaking on Exceptions
      5. Chapter 8 Quick Reference
    6. 9. Publishing and Discovering XML Web Services
      1. Publishing and Discovering XML Web Services Using UDDI
        1. Publishing XML Web Services Using UDDI
        2. Discovering XML Web Services Using UDDI
      2. Publishing and Discovering XML Web Services Using DISCO files
        1. DISCO Files
        2. Automatic Discovery and .vsdisco Files
      3. XML Web Service Deployment
        1. Manual Deployment
        2. Visual Studio .NET Copy Project
        3. Visual Studio .NET Web Setup Project
          1. Test the Validator Service
      4. Chapter 9 Quick Reference
  7. III. Advanced XML Web Services
    1. 10. State Management
      1. Client State
        1. Using Client Sessions
        2. Consuming an XML Web Service That Uses Client State
      2. Application State
        1. Using the Application Property
        2. Building the Request History Client
        3. Testing the Application State Support
      3. Chapter 10 Quick Reference
    2. 11. The DataSet and XML Web Services
      1. Overview of the DataSet
      2. Using a DataSet
        1. Creating the Windows Forms Validation Client
        2. Consuming an XML Web Service That Uses a DataSet
      3. Chapter 11 Quick Reference
    3. 12. Caching and Application Events
      1. Caching
        1. The CacheDuration Property
        2. The Cache Object
        3. Creating an XML Web Service That Uses Caching
        4. Creating the Windows Forms Validation Client
        5. Consuming an XML Web Service That Uses Caching
        6. Testing the XML Web Service
      2. The Global.asax file
        1. Creating an XML Web Service That Uses Application Events
      3. Chapter 12 Quick Reference
    4. 13. Securing XML Web Services
      1. Authentication
        1. Implementing Basic and Digest Authentication
      2. Implementing Integrated Windows Authentication
      3. Authorization
        1. URL Authorization
        2. File Authorization
        3. Chapter 13 Quick Reference
    5. 14. Custom SOAP Headers
      1. Using Custom SOAP Headers in XML Web Services
        1. Developing an XML Web Service That Uses Custom SOAP Headers
          1. Add the SOAP Header Class
        2. Developing an XML Web Service Client That Uses Custom SOAP Headers
      2. Chapter 14 Quick Reference
    6. 15. Consuming XML Web Services Asynchronously
      1. Asynchronous XML Web Services
        1. Slowing Down the Test XML Web Service
      2. Asynchronous XML Web Service Clients
        1. Proxy Class Methods
          1. The ValidateCard Method
          2. The BeginValidateCard Method
          3. The EndValidateCard Method
        2. Using Callbacks to Signal Asynchronous Method Completion
        3. Waiting for Asynchronous Method Completion
        4. Blocking on Asynchronous Method Completion
        5. Polling to Determine Asynchronous Method Completion
      3. Chapter 15 Quick Reference
    7. 16. Manually Creating Proxies
      1. Using the Wsdl.exe Tool
        1. Creating a Proxy DLL
        2. Creating a Client Using a Proxy DLL
      2. Chapter 16 Quick Reference
  8. IV. Appendixes
    1. A. The Credit Card Validation Library
      1. CreditCardValidation.dll
      2. How Card Numbers Are Validated
        1. Prefixes and Lengths
        2. The LUHN Formula
      3. The CreditCardValidation Code
        1. The Exception Classes
          1. CCInvalidPrefixException
          2. CCInvalidLengthException
          3. CCIllegalCharacterException
        2. The Validator Class
          1. The formatCreditCardNumber Method
          2. The checkLUHN method
          3. The ValidateAMEX, ValidateMasterCard, and ValidateVISA Methods
      4. Summary
    2. B. XML Web Service Resources
      1. Extensible Markup Language (XML)
      2. Hypertext Transfer Protocol (HTTP)
      3. Microsoft .NET
      4. Microsoft .NET Passport
      5. Secure Sockets Layer (SSL)
      6. Simple Object Access Protocol (SOAP)
      7. Transport Layer Security (TLS)
      8. Universal Description, Discovery, and Integration (UDDI)
      9. Web Services Description Language (WSDL)
      10. General
  9. C. About the Author
  10. About the Authors
  11. Copyright