Cover image for Programming Web  Services with SOAP

Book description

The web services architecture provides a new way to think about and implement application-to-application integration and interoperability that makes the development platform irrelevant. Two applications, regardless of operating system, programming language, or any other technical implementation detail, communicate using XML messages over open Internet protocols such as HTTP or SMTP. The Simple Open Access Protocol (SOAP) is a specification that details how to encode that information and has become the messaging protocol of choice for Web services. Programming Web Services with SOAP is a detailed guide to using SOAP and other leading web services standards--WSDL (Web Service Description Language), and UDDI (Universal Description, Discovery, and Integration protocol). You'll learn the concepts of the web services architecture and get practical advice on building and deploying web services in the enterprise. This authoritative book decodes the standards, explaining the concepts and implementation in a clear, concise style. You'll also learn about the major toolkits for building and deploying web services. Examples in Java, Perl, C#, and Visual Basic illustrate the principles. Significant applications developed using Java and Perl on the Apache Tomcat web platform address real issues such as security, debugging, and interoperability. Covered topic areas include:

  • The Web Services Architecture

  • SOAP envelopes, headers, and encodings

  • WSDL and UDDI

  • Writing web services with Apache SOAP and Java

  • Writing web services with Perl's SOAP::Lite

  • Peer-to-peer (P2P) web services

  • Enterprise issues such as authentication, security, and identity

  • Up-and-coming standards projects for web services

Programming Web Services with SOAP provides you with all the information on the standards, protocols, and toolkits you'll need to integrate information services with SOAP. You'll find a solid core of information that will help you develop individual Web services or discover new ways to integrate core business processes across an enterprise.

Table of Contents

  1. Programming Web Services with SOAP
  2. A Note Regarding Supplemental Files
  3. Preface
    1. Audience for This Book
    2. Structure of This Book
    3. Conventions
    4. Comments and Questions
    5. Acknowledgments
      1. James
      2. Doug
      3. Pavel
  4. 1. Introducing Web Services
    1. 1.1. What Is a Web Service?
    2. 1.2. Web Service Fundamentals
      1. 1.2.1. What Web Services Look Like
      2. 1.2.2. Intersection of Business and Programming
      3. 1.2.3. Just-In-Time Integration
    3. 1.3. The Web Service Technology Stack
      1. 1.3.1. Beyond the Stack
      2. 1.3.2. Discovery
      3. 1.3.3. Description
      4. 1.3.4. Packaging
      5. 1.3.5. Transport
      6. 1.3.6. Network
    4. 1.4. Application
    5. 1.5. The Peer Services Model
  5. 2. Introducing SOAP
    1. 2.1. SOAP and XML
      1. 2.1.1. XML Messaging
      2. 2.1.2. RPC and EDI
      3. 2.1.3. The Need for a Standard Encoding
    2. 2.2. SOAP Messages
      1. 2.2.1. Envelopes
      2. 2.2.2. RPC Messages
      3. 2.2.3. The mustUnderstand Attribute
      4. 2.2.4. Encoding Styles
      5. 2.2.5. Versioning
    3. 2.3. SOAP Faults
      1. 2.3.1. Standard SOAP Fault Codes
      2. 2.3.2. MustUnderstand Faults
      3. 2.3.3. Custom Faults
    4. 2.4. The SOAP Message Exchange Model
      1. 2.4.1. Message Paths and Actors
      2. 2.4.2. The SOAP Routing Protocol
    5. 2.5. Using SOAP for RPC-Style Web Services
      1. 2.5.1. Invoking Methods
      2. 2.5.2. Returning Responses
      3. 2.5.3. Reporting Errors
    6. 2.6. SOAP's Data Encoding
      1. 2.6.1. Understanding the Terminology
      2. 2.6.2. XML Schemas and xsi:type
    7. 2.7. SOAP Data Types
      1. 2.7.1. Multiple References in XML-Encoded Data
      2. 2.7.2. Structs, Arrays, and Other Compound Types
      3. 2.7.3. Partially Transmitted Arrays and Sparse Arrays
      4. 2.7.4. Null Accessors
    8. 2.8. SOAP Transports
      1. 2.8.1. SOAP over HTTP
      2. 2.8.2. Contentious Issues
  6. 3. Writing SOAP Web Services
    1. 3.1. Web Services Anatomy 101
      1. 3.1.1. SOAP Implementations and Toolkits
      2. 3.1.2. Handling SOAP Messages
      3. 3.1.3. Deploying Web Services
    2. 3.2. Creating Web Services in Perl with SOAP::Lite
      1. 3.2.1. Installing SOAP::Lite
      2. 3.2.2. The Hello Server
      3. 3.2.3. The Hello Client
      4. 3.2.4. A Visual Basic Client
      5. 3.2.5. Changing Transports
    3. 3.3. Creating Web Services in Java with Apache SOAP
      1. 3.3.1. Installing Apache SOAP
      2. 3.3.2. The Hello Server
      3. 3.3.3. Deployment Descriptor
      4. 3.3.4. The Hello Client
      5. 3.3.5. The TCPTunnelGui Tool
    4. 3.4. Creating Web Services In .NET
      1. 3.4.1. Installing .NET
      2. 3.4.2. Introducing .NET
      3. 3.4.3. Saying Hello
      4. 3.4.4. Deploying the Service
      5. 3.4.5. Invoking the Service Using SOAP
    5. 3.5. Interoperability Issues
  7. 4. The Publisher Web Service
    1. 4.1. Overview
      1. 4.1.1. Publisher Service Security
    2. 4.2. The Publisher Operations
    3. 4.3. The Publisher Server
      1. 4.3.1. The Preamble
      2. 4.3.2. Data Tables
      3. 4.3.3. Utility Functions
      4. 4.3.4. Register a New User
      5. 4.3.5. Modify User Information
      6. 4.3.6. User Login
      7. 4.3.7. Posting an Item
      8. 4.3.8. Removing Items
      9. 4.3.9. Browsing
      10. 4.3.10. Search
      11. 4.3.11. Deploying the Publisher Service
    4. 4.4. The Java Shell Client
      1. 4.4.1. The Authentication Class
      2. 4.4.2. The Client Class
        1. 4.4.2.1. Preamble
        2. 4.4.2.2. Authentication
        3. 4.4.2.3. User login
        4. 4.4.2.4. Wrappers to call the remote operations
        5. 4.4.2.5. The main routine
      3. 4.4.3. Deploying the Client
  8. 5. Describing a SOAP Service
    1. 5.1. Describing Web Services
      1. 5.1.1. A Quick Example
    2. 5.2. Anatomy of a Service Description
    3. 5.3. Defining Data Types and Structures with XML Schemas
      1. 5.3.1. Using XML Schemas in WSDL
    4. 5.4. Describing the Web Service Interface
    5. 5.5. Describing the Web Service Implementation
      1. 5.5.1. Binding Web Service Interfaces
      2. 5.5.2. Describing the Location of a Web Service
    6. 5.6. Understanding Messaging Patterns
      1. 5.6.1. Single-Message Exchange
      2. 5.6.2. Multiple-Message Exchange
      3. 5.6.3. Complex Multiple-Message Exchanges
      4. 5.6.4. Intermediaries
  9. 6. Discovering SOAP Services
    1. 6.1. The UDDI Registry
      1. 6.1.1. Business Entity
      2. 6.1.2. Business Services
      3. 6.1.3. Binding Templates
      4. 6.1.4. TModels
      5. 6.1.5. Federated UDDI Registries
      6. 6.1.6. Private UDDI Registries
    2. 6.2. The UDDI Interfaces
      1. 6.2.1. The Publisher Interface
      2. 6.2.2. The Inquiry Interface
    3. 6.3. Using UDDI to Publish Services
      1. 6.3.1. Registration Program
      2. 6.3.2. How to Register
      3. 6.3.3. The SOAP Envelope for the Registration
      4. 6.3.4. Other Issues
    4. 6.4. Using UDDI to Locate Services
    5. 6.5. Generating UDDI from WSDL
      1. 6.5.1. Interface Description
      2. 6.5.2. Implementation Description
      3. 6.5.3. Registering
    6. 6.6. Using UDDI and WSDL Together
    7. 6.7. The Web Service Inspection Language (WS-Inspection)
      1. 6.7.1. WS-Inspection Syntax
  10. 7. Web Services in Action
    1. 7.1. The CodeShare Service Network
      1. 7.1.1. Overview
      2. 7.1.2. Prerequisites
        1. 7.1.2.1. Fixing the bug in Apache SOAP 2.2
        2. 7.1.2.2. Compiling Apache SOAP
    2. 7.2. The Code Share Index
    3. 7.3. Web Services Security
      1. 7.3.1. The Security Assertions Markup Language (SAML)
    4. 7.4. Definitions and Descriptions
      1. 7.4.1. The Owner Interface
        1. 7.4.1.1. WSDL port type definition
        2. 7.4.1.2. Data types
        3. 7.4.1.3. Messages
        4. 7.4.1.4. Port type
        5. 7.4.1.5. Protocol binding
      2. 7.4.2. The Client Interface
        1. 7.4.2.1. CodeShare login operation
      3. 7.4.3. The Login Verification Interface
      4. 7.4.4. The Master Index Interface
    5. 7.5. Implementing the CodeShare Server
      1. 7.5.1. The Master Index Service
        1. 7.5.1.1. Operations
        2. 7.5.1.2. Deployment
      2. 7.5.2. The Owner Service
      3. 7.5.3. The Client Service
        1. 7.5.3.1. Creating SAML assertions
        2. 7.5.3.2. Java keystores
        3. 7.5.3.3. Signing the SAML assertion
        4. 7.5.3.4. The login operation
      4. 7.5.4. The Verification Service
    6. 7.6. Implementing the CodeShare Owner
      1. 7.6.1. The Owner Module
      2. 7.6.2. The Server Daemon
    7. 7.7. Implementing the CodeShare Client
    8. 7.8. Seeing It in Action
    9. 7.9. What's Missing from This Picture?
      1. 7.9.1. Where Is UDDI?
      2. 7.9.2. Presence and Asynchronous Messaging
    10. 7.10. Developing CodeShare
  11. 8. Web Services Security
    1. 8.1. What Is a "Secure" Web Service?
      1. 8.1.1. Authentication
      2. 8.1.2. Privacy
    2. 8.2. Microsoft Passport, Version 1.x and 2.x
      1. 8.2.1. Drawbacks
    3. 8.3. Microsoft Passport, Version 3.x
      1. 8.3.1. Overview of Kerberos
    4. 8.4. Give Me Liberty or Give Me ...
    5. 8.5. A Magic Carpet
    6. 8.6. The Need for Standards
    7. 8.7. XML Digital Signatures and Encryption
  12. 9. The Future of Web Services
    1. 9.1. The Future of Web Development
      1. 9.1.1. Web Services and Existing Technologies
    2. 9.2. The Future of SOAP
    3. 9.3. The Future of WSDL
      1. 9.3.1. Missing Pieces
      2. 9.3.2. An Alternative to WSDL
      3. 9.3.3. Standard Extensions
    4. 9.4. The Future of UDDI
      1. 9.4.1. Problems with UDDI
    5. 9.5. Web Services Battlegrounds
      1. 9.5.1. Development Tools
      2. 9.5.2. Killer Services
      3. 9.5.3. Lucrative Marketplaces
      4. 9.5.4. The Enterprise
    6. 9.6. Technologies
      1. 9.6.1. Agents
      2. 9.6.2. Quality of Service
      3. 9.6.3. Privacy
      4. 9.6.4. Security
      5. 9.6.5. Trust Management
      6. 9.6.6. Online Contracts
      7. 9.6.7. Reliable Messaging
      8. 9.6.8. Transactions
      9. 9.6.9. Licensing and Accounting Services
    7. 9.7. Web Services Rollout
  13. A. Web Service Standardization
    1. A.1. Packaging Protocols
    2. A.2. Description Protocols
    3. A.3. Discovery Protocols
    4. A.4. Security Protocols
    5. A.5. Transport Protocols
    6. A.6. Routing and Workflow
    7. A.7. Programming Languages/Platforms
  14. B. XML Schema Basics
    1. B.1. Simple and Complex Types
    2. B.2. Some Examples
      1. B.2.1. Simple Types
      2. B.2.2. Complex Types
    3. B.3. XML Spy
  15. C. Code Listings
    1. C.1. Hello World in Perl
    2. C.2. Hello World Client in Visual Basic
    3. C.3. Hello World over Jabber
    4. C.4. Hello World in Java
    5. C.5. Hello, World in C# on .NET
    6. C.6. Publisher Service
    7. C.7. SAML Generation
    8. C.8. Codeshare
  16. About the Authors
  17. Colophon
  18. Copyright