You are previewing Java Web Services Architecture.
O'Reilly logo
Java Web Services Architecture

Book Description

Written by industry thought leaders, Java Web Services Architecture is a no-nonsense guide to web services technologies including SOAP, WSDL, UDDI and the JAX APIs. This book is the trusted advisor to systems architects and provides an unbiased look at many of the practical considerations for implementing web services including authorization, encryption, transactions and the future of Web Services.

* Covers all the standards, the JAX APIs, transactions, security, and more.
* Contains CD with author code and software from BEA, Sun, The Mind Electric, Altova, CapeClear, Systinet, Republica, Iona, Parasoft, Ipedo, and more.
* Web enhanced with additional material at http://www.webservicesarchitecture.com.

Table of Contents

  1. Copyright
  2. Endorsements for Java Web Services Architecture
  3. Foreword
    1. An Agile Foreword
    2. A Prescriptive Foreword
  4. Preface
    1. Audience
    2. Contents of This Book
    3. Miscellaneous Ramblings
    4. Conventions Used in This Book
      1. Text and Code
      2. Graphics
    5. More Information
      1. Books
      2. Web Sites
      3. Disclaimer
  5. Acknowledgments
    1. James McGovern
    2. Sameer Tyagi
    3. Michael E. Stevens
    4. Sunil Mathew
  6. One. The Foundation
    1. 1. Web Services Overview
      1. What Are Web Services?
      2. History
        1. Physical Evolution: The Evolution in Computer System Deployment
          1. Monolithic
          2. Client-Server
          3. N-Tier Development
          4. World Wide Web
        2. Logical Evolution
          1. Structured Design
          2. Object-Oriented Development
          3. Component-Based Development
          4. Service-Based Development
      3. Web Services Technology
        1. Service Transport
        2. Service Messaging
        3. Service Description
        4. Service Registry
        5. Service Composition
      4. Other Concerns
        1. Quality of Service
        2. Management
        3. Security
        4. Service Development
      5. Java and Web Services
      6. Application Scenarios
        1. Business-to-Business
        2. Enterprise Application Integration
      7. Implementation Scenarios
        1. Simple Service
        2. Composite Service
        3. Middleware Service
        4. Service Bus
      8. Benefits of Web Services
        1. Reusability
        2. Location Transparency
        3. Composition
        4. Scalability and Availability
        5. Maintaining Investment in Legacy Applications
        6. Reduced Vendor Dependence
      9. A Word about Standards
      10. Summary
      11. References
    2. 2. Service-Oriented Architecture
      1. SOA Entities
        1. Service Consumer
        2. Service Provider
        3. Service Registry
        4. Service Contract
        5. Service Proxy
        6. Service Lease
      2. SOA Characteristics
        1. Discoverable and Dynamically Bound
        2. Self-Contained and Modular
          1. Modular Decomposability
          2. Modular Composability
          3. Modular Understandability
          4. Modular Continuity
          5. Modular Protection
          6. Direct Mapping
            1. Conceptual Service Model
          7. Contracts and Information Hiding
        3. Interoperability
        4. Loose Coupling
        5. Network-Addressable Interface
        6. Coarse-Grained Interfaces
          1. Multi-Grained Services
          2. Multi-Grained Methods
        7. Location Transparency
        8. Composability
        9. Self-Healing
      3. Summary
      4. References
    3. 3. Component-Based Service Development
      1. Development Lifecycle
        1. Requirements Analysis
        2. Functional Requirements
        3. Nonfunctional Requirements
        4. Performance
        5. Security
        6. Modifiability
        7. Reusability
          1. Establish a Product Line for Building Services
          2. Improve Modularity
          3. Improve Modifiability
        8. Integrability
        9. Testability
        10. Availability
        11. Reliability
        12. Portability
      2. Design
        1. Architecture
          1. Application Architecture
            1. Layered Architecture
            2. Proxy Layer
            3. Service Façade
            4. Session Façade
            5. Business Logic
            6. Data Access Layer
            7. Resource Layer
          2. Technical Architecture
            1. Technical Services
          3. Process
            1. Product Line Process
        2. Design Issues
          1. Interface Definition
            1. Design by Contract
          2. Transactions
      3. Verification and Validation
        1. Unit Testing
        2. Functional Testing
        3. Regression Testing
        4. QoS Testing
        5. Service Federation Testing
        6. System Tests
        7. Inspections
      4. Maintenance
      5. Summary
      6. References
    4. 4. SOAP
      1. The Case for SOAP
      2. What Does SOAP Define?
      3. SOAP Message Structure
      4. SOAP Message Elements
        1. Envelope
        2. Header
        3. Body
        4. Handling Errors: The Fault Element
      5. SOAP Processing Model
        1. SOAP Bindings
        2. HTTP Binding
        3. SMTP-POP Binding
      6. SOAP Encoding
        1. Simple Data Types
          1. More on the xsi: type
        2. Compound Data Types
      7. SAAJ
      8. Summary
    5. 5. WSDL
      1. Describing a Web Service
      2. Describing Functional Characteristics of Services
        1. WSDL Document Overview
          1. Abstract Descriptions
          2. Concrete Descriptions
          3. WSDL and Dynamic Interactions
        2. Elements of a WSDL Document
        3. XML Schema
          1. Defining the Data Types for the Service: The types Element
          2. Describing the Exchange: The message Element
          3. Describing Service Interactions: The operation Element
          4. Describing Groups of Operations: The portType Element
          5. Implementation Details: The binding Element
            1. SOAP Binding
            2. MIME Binding
            3. HTTP Bindings
        4. Bindings and Style/Use
          1. Describing the Physical Service: The port and service Elements
        5. Referencing Other Descriptions: The import Element
        6. Extending WSDL
        7. WSDL Usage Patterns
          1. Service Consumers
          2. Service Producers
        8. Early or Late Binding
          1. Early Binding
          2. Late Binding
        9. WSDL and Server-Side Java Classes
        10. Generating WSDL from Java
      3. WSDL 1.2
      4. Summary
      5. References
    6. 6. UDDI
      1. Discovering Web Services
        1. What Is a Registry?
        2. The Role of UDDI in Web Services
        3. Role of the UDDI Provider
        4. Service Interfaces
        5. UDDI Informational Structural Model
          1. businessEntity
          2. businessService
          3. bindingTemplate
          4. tModel
      2. Categorizing Services
      3. Identifiers
      4. Business Entity Relationships
      5. UDDI’s SOAP Interfaces
        1. Browse Pattern
        2. Drill-Down Pattern
        3. Invocation Pattern
        4. hostingRedirector
      6. UDDI and SOAP/WSDL Relationships
      7. Publishing WSDL Service Interfaces in UDDI
      8. Internationalization and Multiple Languages
      9. Extending a UDDI Registry
      10. UDDI4J
      11. Private UDDI Registries
        1. Marketplace Registries
        2. Portal Registries
        3. Enterprise Application Integration Registries
        4. Considerations
      12. UDDI Futures
        1. Digital Signatures
        2. Human-Friendly Keys
        3. Subscriptions
      13. Summary
    7. 7. ebXML
      1. Architectural Overview of ebXML
        1. Business Process Specifications
        2. Partner Profiles and Agreements
        3. ebXML Registry-Repository Service
          1. UDDI or ebXML
            1. Information Model
            2. Taxonomies and Classifications
            3. Registry Queries
            4. Security
            5. Protocol Support
            6. WSDL for Registry
        4. ebXML Message Service
      2. Putting It All Together
      3. Summary
  7. Two. The JAX APIs
    1. 8. Java Web Service Developer Pack
      1. Setting Up Java WSDP
      2. Java WSDP Components
        1. Java XML APIs
        2. Java WSDP Runtime
        3. Java WSDP Tools
          1. Ant
          2. wsdeploy
          3. wscompile
          4. Registry Browser
        4. Java WSDP Supporting Specifications
      3. Summary
    2. 9. JAXP
      1. JAXP Architecture
      2. SAX
        1. JAXP and SAX
      3. DOM
        1. JAXP and DOM
      4. When to Use SAX
      5. When to Use DOM
      6. When Not to Use Either
      7. JAXP and XML Schemas
      8. XSLT
        1. JAXP and XSLT
      9. XSLTc
      10. JDOM
      11. JAXP RI
      12. Summary
      13. References
    3. 10. JAX-RPC
      1. JAX-RPC Service Model
      2. Data Types and Serialization
        1. Java-to-XML Marshalling
        2. XML-to-Java Unmarshalling
        3. SOAP Bindings and Encoding
          1. When to Use RPC/Encoded and Document/Literal
      3. JAX-RPC Development
        1. 1. Service Definition
        2. 2. Service Implementation
        3. 3. Service Deployment
        4. 4. Service Description
          1. xrpcc Internals
            1. Service Element
            2. Interface element
            3. Handlerchain element
          2. Typemapping registry element.
          3. Namespace mapping registry.
          4. Java-WSDL Mappings
          5. 5. Service Consumption
          6. Clients Using Stubs
          7. Clients Using DII
            1. WSDL with DII
          8. Clients Using Dynamic Proxies
          9. Clients Using WSDL
          10. What Client Is Right for Me?
      4. Advanced JAX-RPC
        1. Attachments in JAX-RPC
        2. MessageHandlers and HandlerChains
          1. Handler Advantages
          2. Configuring Handlers
          3. Handler Disadvantages
        3. Asynchronous Invocation with Attachments and Handlers
        4. Holder Classes
        5. Using Custom Data Types
          1. JAX-RPC Pluggability Mechanism
        6. Configuring Custom Serializers and Deserializers
          1. JAX-RPC and Security
      5. JAX-RPC Interoperability
      6. JAX-RPC and J2EE
        1. JAX-RPC and JSR 153
          1. What Implementation Is Right for Me?
        2. JAX-RPC and JSR-109
      7. Summary
        1. The RMI Analogy
        2. The CORBA Analogy
    4. 11. JAXM
      1. Messaging and MOM
      2. Messaging and Web Services
      3. Messaging in Java
        1. JMS
          1. Destination
          2. Connection Factory
          3. Connection
          4. Sessions
          5. Message Producers
          6. Message Consumers
          7. JavaMail
      4. JAXM Architecture
        1. Providers
        2. JAXM API
          1. Profiles
      5. Designing with JAXM
        1. Synchronous Messaging
        2. Asynchronous Messaging
      6. Developing with JAXM
        1. Synchronous Messaging
        2. Asynchronous Messaging
          1. AsynClient
          2. PurchaseOrderService
          3. CallbackProcessor
        3. JAXM and EJB 2.1
        4. Interoperability
      7. What Is Right for Me—JAXM or JAX-RPC?
      8. Summary
    5. 12. JAXR
      1. Registries and Repositories
      2. JAXR Architecture
        1. Providers
        2. Capability Profiles
      3. The JAXR Information Model
        1. Classification of Registry Data
        2. Association of Registry Data
      4. The JAXR API
        1. JAXR and Connections
        2. JAXR and Create-Replace-Update-Delete (CRUD) Operations
        3. JAXR and Get-Find Operations
        4. JAXR and Declarative Queries
          1. Publishing Company Information to a UDDI Registry
          2. Publishing Service Information to a UDDI Registry
        5. Querying UDDI Registry with JAXR
          1. Finding Services Information in UDDI
          2. Runtime Service Discovery from UDDI
          3. Deployment-Time Publication to UDDI
      5. JAXR to UDDI Mapping
      6. JAXR and ebXML Registry
        1. Publishing Organizations in ebXML Registries
        2. Publishing Content to ebXML Registry
        3. A Complete ebXML Example
        4. Mapping of ebXML Registry Information Model to JAXR
      7. Summary
    6. 13. JAXB
      1. The Need for Binding and JAXB
      2. When to Use JAXB
      3. JAXB Architecture
      4. Developing with JAXB
        1. Generate Java Classes
        2. Write Application Code
      5. XML-to-Java Mapping
        1. Primitives and Simple Types
        2. Enumerations
          1. typesafe Enumerations
        3. Lists
        4. Complex Types
        5. Mappings in JAXB and JAX-RPC
      6. The JAXB API
        1. JAXBContext
        2. Unmarshaller
        3. Marshaller
          1. Configuring the Marshaller
        4. The Element Interface
      7. Validation with JAXB
      8. Customizing JAXB
        1. Including the JAXB Namespace
        2. The globalBindings Declaration
        3. The schemaBindings Declaration
        4. The javadoc Declaration
        5. The class Declaration
        6. The property Declaration
        7. The javaType Declaration
        8. The typesafeEnum Declaration
      9. When to Use Custom Declarations
      10. Summary
  8. Three. Advanced Topics
    1. 14. Transaction Management
      1. Concepts
        1. Atomicity
        2. Consistency
        3. Isolation
        4. Durability
        5. Transaction Manager
        6. Two-Phase Commit and Global Transactions
        7. Transaction Models
        8. Java Transaction API (JTA)
        9. Java Transaction Service
      2. A Transaction Model for Web Services
      3. New Transaction Specifications
        1. Business Transaction Protocol (BTP)
        2. Application and BTP Elements
        3. Types of BTP Transactions
          1. Atoms
          2. Cohesions
        4. BTP Transactions and Locking
        5. BTP Actors, Roles, and Messages
        6. BTP Two-Phase Protocol
        7. Differences between the BTP and Current Two-Phase Commit Protocols
        8. Complex BTP Element Relationships
        9. BTP and SOAP Binding
        10. WS-Transaction
        11. Activity Service
      4. JSRs for Web Service Transaction Support
      5. Summary
    2. 15. Security
      1. Security Considerations for Web Services
        1. Design Time
        2. Deployment Time
        3. Run-time
      2. Web Services Security Initiatives
        1. Message Layer Security
        2. Design
        3. XML Digital Signatures
        4. Security Assertions Markup Language
        5. Extensible Access Control Markup Language
        6. Key Management Specification
        7. Encryption Algorithm Selection
          1. Blowfish
          2. SkipJack
          3. Twofish
          4. Triple DES
          5. MDS and SHA1
          6. S/MIME
          7. Ralph Merkle’s Puzzle Protocol
          8. Diffie-Hellman
          9. DSA
          10. RSA
          11. Elliptic Curves
        8. Example: Asymmetric Puzzles
      3. Canonical XML
      4. XML Digital Signatures
      5. Apache XML Security
      6. XML Encryption
      7. Security Assertions Markup Language
        1. SAML Architecture
        2. Authentication Assertion
        3. Attribute Assertion
        4. Authorization Assertion
        5. SAML Bindings and Profiles
      8. Web Services Security Assertions
      9. XML Access Control Markup Language
      10. XML Key Management Specification
      11. WS-I Specifications
        1. WS-Security
        2. WS-Policy
        3. WS-Trust
        4. WS-Privacy
        5. WS-SecureConversation
        6. WS-Federation
        7. WS-Authorization
        8. WS-Coordination
      12. SOAP and Firewalls
      13. Security and J2EE
        1. JAAS
      14. Java Cryptography Extensions
        1. Core Classes
        2. Keystore
      15. Implementation Scenarios
      16. Identity Management
        1. Components of Identity Management
        2. The Next Minute
      17. Liberty Alliance
      18. SourceID
      19. Summary
    3. 16. Practical Considerations
      1. Systems Management
        1. Components of a Systems Management Strategy
      2. Interoperability
      3. Pricing Models
        1. Accounting Services
      4. XMLPay Specification
      5. Service Level Agreements
      6. Testing Web Services
        1. Functional Testing
        2. Regression Testing
        3. Load and Stress Testing
        4. Proof-of-Concept Testing
      7. Performance
      8. High Availability
        1. Concepts
        2. Service Design Techniques
        3. Infrastructure Design Techniques
      9. Scalability
      10. Clustering
      11. Fault Tolerance
        1. Request Determination
        2. Request Migration
      12. Grid Computing
      13. Enabling Services
      14. Final Checklist
      15. Summary
    4. 17. Future Standards
      1. Web Service Composition
        1. The Need for Service Composition
          1. Web Service Choreography Interface (WSCI)
          2. Business Process Execution Language for Web Services (BPEL4WS)
        2. Web Service Routing Protocol (WS-Routing)
          1. Protocol Bindings
        3. Web Services Metadata for the Java Platform (JSR-181)
        4. J2ME Web Services Specification (JSR-172)
      2. Summary
    5. A. XML Schema
      1. Document Type Definition
      2. XML Schema
        1. Namespaces
        2. Simple Types
        3. Extending Simple Types
        4. Complex Types
          1. sequence and all
          2. choice
          3. attributes
          4. attributeGroup
          5. Comments in XML Schema
      3. Bringing It All Together
      4. Advanced Topics
        1. Defining New Types
          1. Creating New simpleTypes from Other simpleTypes
          2. Deriving Types by Extension
          3. Deriving Types by Restriction
        2. Unique Values
        3. Assembling Schemas
        4. Making Schemas Extensible
          1. Extensibility Elements: Creating Schemas That Can Evolve
      5. Summary
    6. B. JSTL
      1. Expression Languages
      2. Using JSTL
      3. XML Support Tags in JSTL
        1. Parsing and Searching
          1. x:parse
          2. x:out
          3. x:set
        2. XML Flow Control
          1. x:forEach
          2. x:if
          3. x:choose
          4. x:when
          5. x:otherwise
        3. XML Transformation
          1. x:transform
      4. Putting It Together
    7. C. The Software Architect’s Role
      1. The Architect Manages Stakeholder Expectations
      2. The Architect Designs the System
      3. The Architect Implements the Baseline Architecture
    8. About the Authors
    9. About the CD
      1. Requirements and Licenses
    10. LIMITED WARRANTY AND DISCLAIMER OF LIABILITY