Java Web Services

Book Description

For many Java developers, web services appeared to come out of nowhere. Its advantages are clear: web services are platform-independent (like Java itself), language-agnostic (a clear advantage over Java RMI), can easily be tunneled through firewalls (an obvious benefit to anyone who has dealt with modern enterprise networks), object-oriented (we all know about that), and tends to be loosely coupled (allowing more flexible application development). But these advantages have been obscured by a cloud of hype and a proliferation of jargon that are difficult to penetrate. What are SOAP, UDDI, WSDL, and JAXM? To say nothing of JAXR, tModels, category bags, WSFL, and other friends? And assuming that you understand what they are, how do you do anything with them? Do they live up to their promises? Are they really the future of network computing, or a dead end? Java Web Services gives the experienced Java developer a way into the Web Services world. It helps you to understand what's going on, what the technologies mean and how they relate, and shows Java developers how to put them to use to solve real problems. You'll learn what's real and what isn't; what the technologies are really supposed to do, and how they do it. Java Web Services shows you how to use SOAP to perform remote method calls and message passing; how to use WSDL to describe the interface to a web service or understand the interface of someone else's service; and how to use UDDI to advertise (publish) and look up services in each local or global registry. Java Web Services also discusses security issues, interoperability issues, integration with other Java enterprise technologies like EJB; the work being done on the JAXM and JAX-RPC packages, and integration with Microsoft's .NET services. The web services picture is still taking shape; there are many platforms and APIs to consider, and many conflicting claims from different marketing groups. And although web services are inherently language-independent, the fit between the fundamental principles on which Java and web services are based means that Java will almost certainly be the predominant language for web services development. If you're a Java developer and want to climb on the web services bandwagon, or if you only want to "kick the tires" and find out what web services has to offer, you will find this book indispensable.

Table of Contents

  1. Java Web Services
    1. Preface
      1. Who Should Read This Book?
      2. Organization
      3. Software and Versions
      4. Conventions
      5. Comments and Questions
      6. Acknowledgments
    2. 1. Welcome to Web Services
      1. What Are Web Services?
        1. The Major Web Services Technologies
        2. Service-Oriented Architecture in a Web Services Ecosystem
        3. Practical Applications for Web Services
      2. Web Services Adoption Factors
        1. Industry Drivers
        2. Lessons Learned from Recent History
        3. Why Web Services, and Why Now?
          1. Low barrier to entry means grass-roots adoption
      3. Web Services in a J2EE Environment
      4. What This Book Discusses
    3. 2. Inside the Composite Computing Model
      1. Service-Oriented Architecture
        1. Participant Roles
          1. Provider
          2. Registry (broker)
          3. Requestor
        2. Participant Interactions
          1. Publishing
          2. Service location (finding)
          3. Binding
        3. Business Perspectives on the SOA
          1. Service provider
          2. Service registry (broker)
          3. Service requestor
        4. Developers’ Perspectives on the SOA
          1. Service provider
          2. Service requestor
      2. The P2P Model
    4. 3. SOAP: The Cornerstone of Interoperability
      1. Simple
      2. Object
      3. Access
      4. Protocol
        1. Message-Based Document Exchange and RPC
      5. Anatomy of a SOAP Message
        1. How XML Becomes SOAP
        2. The SOAP Envelope
        3. The SOAP Header
        4. The SOAP Protocol Binding
      6. Sending and Receiving SOAP Messages
        1. The SOAP Sender
        2. The Simple Servlet Receiver
        3. The Servlet Receiver Becomes SOAP-Aware
        4. Adding a Header Block
      7. The Apache SOAP Routing Service
        1. The Apache TunnelGui Application
        2. The SOAP-Aware Servlet Becomes a Message Router
      8. SOAP with Attachments
        1. Parts Is Parts
        2. Constructing SOAP with Attachments
        3. Receiving the SOAP with Attachments Message
    5. 4. SOAP-RPC, SOAP-Faults, and Misunderstandings
      1. SOAP-RPC
        1. The SOAP-Encoding Attribute
        2. SOAP-RPC Method Signatures
        3. The SOAP-RPC Sender—Remote Service
        4. Another SOAP-RPC Sender: Local Service
        5. The SOAP-RPC Service
          1. The Deployment Descriptor
      2. Error Handling with SOAP Faults
        1. Soap Faults and the mustUnderstand Attribute
      3. SOAP Intermediaries and Actors
        1. Note on URIs, URNs, and URLs
    6. 5. Web Services Description Language
      1. Introduction to WSDL
        1. How a Service Description Begets Code
      2. Anatomy of a WSDL Document
        1. <definitions> Element
        2. <import> Element
        3. <types> Element
        4. <message> Element
        5. <portType> Element
        6. <binding> Element
          1. The SOAP binding extension
          2. Demonstrating a binding through example
        7. <service> Element
          1. The end of the example!
      3. Best Practices, Makes Perfect
      4. Where Is All the Java?
    7. 6. UDDI: Universal Description, Discovery, and Integration
      1. UDDI Overview
        1. How UDDI Is Used
        2. Technical Architecture
      2. UDDI Specifications and Java-Based APIs
        1. UDDI Specifications
        2. Java-Based APIs
      3. Programming UDDI
        1. UDDI Data Structures
        2. Browsing Basic Information
        3. Finding a Business
        4. Using Systinet’s UDDI Java API
        5. Using JAXR
        6. Getting More Detail
          1. Categorization
          2. Identifiers
          3. tModel
        7. Publishing to a UDDI Registry
        8. Security and Authentication
        9. Errors and <dispositionReport> Documents
        10. What About the Rest of the Publishing API?
      4. Using WSDL Definitions with UDDI
        1. An Abstraction API
    8. 7. JAX-RPC and JAXM
      1. Java API for XML Messaging (JAXM)
        1. Where’s the Messaging?
        2. Simple Servlet Deployment
        3. The SOAP Package
        4. The JAXM Sender—Request/Reply Client
        5. Understanding the Simple JAXM Sender
          1. Creating the message
          2. Adding content to the message
          3. Making the call
        6. Understanding the JAXM Receiver
        7. Using JAXM for SOAP with Attachments
        8. Understanding the SwA Sender
          1. Attaching an XML fragment to the SOAP envelope
          2. Adding a header dynamically
          3. Adding MIME attachments
        9. JAXM Profiles
          1. ProviderConnectionFactory
          2. Obtaining the profile via ProviderMetaData
          3. Using the custom MessageFactory to create profile-specific messages
          4. Sending the message
      2. JAX-RPC
        1. Stubs and Tie Classes
        2. WSDL to Java, Java to WSDL
          1. Remote references
          2. Pass-by-copy and Holder classes
          3. Generated service interface
          4. Value types
      3. SOAPElement API
      4. JAX-RPC Client Invocation Models
        1. Statically Generated Stubs
        2. Dynamic Invocation Using the Service Interface
        3. Dynamic Invocation Interface (DII)
          1. Building the method signature
          2. Setting the properties
          3. Making the call and retrieving the results
        4. Service Context Propagation and SOAP Message Handlers
    9. 8. J2EE and Web Services
      1. The SOAP-J2EE Way
        1. SOAP Parsing
        2. Behavior Handling
        3. Figuring Out What to Invoke
        4. RPC-Style Invocations
        5. Message-Style Invocations
        6. A Simple Example
          1. The JMS replier
        7. Content-Based Routing, Data Transformation,and the J2EE Connector Architecture
        8. JSR109: Industry in Flux
      2. The Java Web Service (JWS) Standard
    10. 9. Web Services Interoperability
      1. The Concept of Interoperability
      2. The Good, Bad, and Ugly of Interoperability
        1. SOAP
          1. Encoding
          2. xsi:type
          3. Proprietary datatypes
          4. Serialization
          5. SOAPAction
          6. Multireference (id/href)
          7. Processing order
          8. Header extensions
          9. Content type
          10. mustUnderstand
          11. SOAP actor
        2. WSDL
          1. Dynamic languages
          2. Documentation
          3. Tool and library variances
          4. Versioning
          5. Endpoints
        3. UDDI
        4. XML Schema
        5. Intermediaries
        6. Transactions
        7. Integration
        8. .NET and J2EE
        9. Unique IDs
      3. Potential Interoperability Issues
        1. Layering Decisions
        2. Standards Development and Proliferation
          1. W3C
          2. ebXML
          3. OASIS
          4. Conformance and interoperability standards
      4. SOAPBuilders Interoperability
        1. Round 2
        2. Round 3
        3. Understanding the Echo Test
          1. Running the EchoTestClient
          2. Getting it to work
          3. Default serialization of data
          4. Custom serialization
          5. The server
        4. Fun with Testing
          1. Using other test clients through a browser interface
      5. Other Interoperability Resources
        1. Microsoft SOAP Toolkit 3.0 Interoperability Test Site
        2. SOAP Version 1.2 Test Collection
        3. Xmethods
        4. SalCentral
      6. Resources
    11. 10. Web Services Security
      1. Incorporating Security Within XML
        1. Public Key Infrastructure (PKI)
        2. Nonrepudiation
      2. XML Digital Signatures
        1. The <Reference> Element
        2. Canonicalization
        3. The Signature Method
      3. XML Encryption
        1. Java Toolkits
          1. Single-sign-on
        2. Key Management
          1. Key retrieval
          2. Location service
          3. Validate Service
      4. SOAP Security Extensions
        1. Digital Credentials Extensions to SOAP
        2. Digital Signature Extensions to SOAP
      5. Further Reading
    12. A. Credits
    13. Index
    14. Colophon

Product Information

  • Title: Java Web Services
  • Author(s): Tyler Jewell, David A Chappell
  • Release date: March 2002
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 0596002696