Java and SOAP

Book description

Java and SOAP provides Java developers with an in-depth look at SOAP (the Simple Object Access Protocol). Of course, it covers the basics: what SOAP is, why it's soared to a spot on the Buzzwords' Top Ten list, and what its features and capabilities are. And it shows you how to work with some of the more common Java APIs in the SOAP world: Apache SOAP and GLUE.In addition to covering the basics such as the structure of a SOAP message, SOAP encoding, and building simple services using RPC and messaging, Java and SOAP covers many topics that are essential to real-world development. Although SOAP has native support for an impressive number of object types, the nature of modern programming means that whatever SOAP gives you is not enough. When do you need to add support for your own object types, and how do you do it? How do you handle errors, and how do you add your own information to Fault messages? How do you handle attachments?In an ideal world, you could live entirely within Java, and ignore the SOAP messages being send back and forth: you'd be able to write Java code and let the SOAP APIs work behind the scenes. However, we're not yet in that ideal world, and won't be for some time. Therefore, Java and SOAP pays particular attention to how SOAP messages are encoded. It doesn't just explain the document types, but shows how the documents are used in practice as they are generated by the different APIs. If you ever have to debug interoperability problems, you'll find that this information is indispensable.We've always found that the best software is written by people who understand what's happening under the hood. SOAP is no different. Let's say you need to write a custom serializer to create a SOAP representation of a structure. How do you know that your encoding is efficient? There's one definitive answer: look at the SOAP documents it produces!Java and SOAP also discusses interoperability between the major SOAP platforms, including Microsoft's .NET, SOAP messaging, SOAP attachments, message routing, and a preview of the forthcoming AXIS APIs and server. If you're a Java developer who would like to start working with SOAP, this is the book you need to get going.

Publisher resources

View/Submit Errata

Table of contents

  1. Dedication
  2. A Note Regarding Supplemental Files
  3. Preface
    1. Intended Audience
    2. A Moment in Time
    3. How This Book Is Organized
    4. Conventions Used in This Book
    5. How to Contact Us
    6. Retrieving Examples Online
    7. Acknowledgments
  4. 1. Introduction
    1. 1.1. RPC and Message-Oriented Distributed Systems
    2. 1.2. Self-Describing Data
    3. 1.3. XML
    4. 1.4. API Specs Versus Wire-Level Specs
    5. 1.5. Overview of SOAP
      1. 1.5.1. Using SOAP with Java
    6. 1.6. SOAP Implementations
      1. 1.6.1. Apache SOAP
      2. 1.6.2. GLUE
      3. 1.6.3. Others
    7. 1.7. The Approach
      1. 1.7.1. No Security
    8. 1.8. Getting Started
  5. 2. The SOAP Message
    1. 2.1. The HTTP Binding
    2. 2.2. HTTP Request
    3. 2.3. HTTP Response
      1. 2.3.1. Summarizing the HTTP Binding
    4. 2.4. The SOAP Envelope
      1. 2.4.1. Namespaces
    5. 2.5. The Envelope Element
    6. 2.6. The Header Element
    7. 2.7. The actor Attribute
    8. 2.8. The mustUnderstand Attribute
    9. 2.9. The encodingStyle Attribute
    10. 2.10. Envelope Versioning
    11. 2.11. The Body Element
    12. 2.12. SOAP Faults
      1. 2.12.1. The faultcode Element
      2. 2.12.2. The faultstring Element
      3. 2.12.3. The faultactor Element
      4. 2.12.4. The detail Element
      5. 2.12.5. Another Fault Example
  6. 3. SOAP Data Encoding
    1. 3.1. Schemas and Namespaces
      1. 3.1.1. Terminology
    2. 3.2. Serialization Rules
      1. 3.2.1. References
    3. 3.3. Indicating Type
      1. 3.3.1. Simple Types
        1. 3.3.1.1. Strings
        2. 3.3.1.2. Enumerations
      2. 3.3.2. Binary Encoding
      3. 3.3.3. Polymorphic Accessors
      4. 3.3.4. Compound Types
        1. 3.3.4.1. Structs
        2. 3.3.4.2. Arrays
        3. 3.3.4.3. Partial arrays
        4. 3.3.4.4. Sparse arrays
      5. 3.3.5. Generic Compound Types
    4. 3.4. Default Values
    5. 3.5. The SOAP Root Attribute
  7. 4. RPC-Style Services
    1. 4.1. SOAP RPC Elements
      1. 4.1.1. Target Object URI
      2. 4.1.2. Method Name
      3. 4.1.3. Method Parameters
      4. 4.1.4. Method Response
      5. 4.1.5. Fault Response
      6. 4.1.6. Optional Header Data
      7. 4.1.7. Service Activation
    2. 4.2. A Simple Service
    3. 4.3. Deploying the Service
      1. 4.3.1. Deploying with Apache SOAP
        1. 4.3.1.1. The Apache SOAP Admin tool
      2. 4.3.2. Deploying with GLUE
        1. 4.3.2.1. The GLUE console
    4. 4.4. Writing Service Clients
      1. 4.4.1. Calling the Service with Apache SOAP
      2. 4.4.2. Calling the Service with GLUE
    5. 4.5. Deploying with Request-Level Scope
    6. 4.6. Deploying with Session-Level Scope
    7. 4.7. Passing Parameters
      1. 4.7.1. Using in, out, and in/out Parameters
  8. 5. Working with Complex Data Types
    1. 5.1. Passing Arrays as Parameters
    2. 5.2. Returning Arrays
    3. 5.3. Passing Custom Types as Parameters
    4. 5.4. Returning Custom Types
  9. 6. Custom Serialization
    1. 6.1. Custom Type Encoding
      1. 6.1.1. Serializing Sparse Arrays
      2. 6.1.2. Serializing Collections
  10. 7. Faults and Exceptions
    1. 7.1. Throwing Server-Side Exceptions in Apache SOAP
    2. 7.2. Creating a Fault Listener in Apache SOAP
    3. 7.3. Throwing and Catching Exceptions in GLUE
  11. 8. Alternative Techniques
    1. 8.1. SOAP Messaging
      1. 8.1.1. Writing a Message Service
    2. 8.2. Literal Encoding
      1. 8.2.1. SOAP with Attachments
  12. 9. SOAP Interoperability and WSDL
    1. 9.1. Web Services Definition Language
      1. 9.1.1. Overview of WSDL
    2. 9.2. Calling a GLUE Service from an ApacheSOAP Client
    3. 9.3. A Proxy Service Using Apache SOAP
    4. 9.4. Calling an Apache SOAP Service from a GLUE Client
    5. 9.5. Accessing .NET Services
    6. 9.6. Writing an Apache Axis Client
  13. 10. SOAP Headers
    1. 10.1. Apache SOAP Providers and Routers
    2. 10.2. Replacing the Provider and Router Classes
    3. 10.3. An Apache SOAP Service That Handles SOAP Headers
  14. 11. JAX-RPC and JAXM
    1. 11.1. JAX-RPC
    2. 11.2. Working Without Ant
    3. 11.3. Creating a JAX-RPC Service
    4. 11.4. Creating a JAX-RPC Client
    5. 11.5. Generating Stubs from WSDL
    6. 11.6. Dynamic Invocation Interface
    7. 11.7. JAXM, in Less Than a Nutshell
    8. 11.8. What Next?
  15. Index
  16. About the Author
  17. Colophon
  18. Copyright

Product information

  • Title: Java and SOAP
  • Author(s): Robert Englander
  • Release date: May 2002
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596001759