J2EE™ Web Services

Book description

J2EE™ Web Services is written in the tradition of great books people have come to expect from author Richard Monson-Haefel. More than a complete and concise Web services reference, this essential guide is the way for J2EE developers to quickly master Web services architecture and development.”

         —Floyd Marinescu
             Author, EJB Design Patterns
             Director, TheServerSide.com

“Written in a straightforward and approachable style, Monson-Haefel’s latest book is a mustread for any Java developer who is serious about understanding and applying the J2EE APIs in support of Web services. By concentrating on the core technologies endorsed by the WS-I, it clearly explains why Web services will succeed in realizing the interoperability promise where previous attempts have failed.”

         —James McCabe
             Software IT Architect IBM

“This is the best—and most complete—description of J2EE Web services that I’ve seen. If you’re a Java developer, you need this book.”

         —David Chappell
             Chappell & Associates

“For Java Web service developers, this book is going to be there on their desk next to their PC for easy reference. The book has it all, clear guides as to what WSDL, SAAJ, UDDI are, and how they are used in a variety of examples. Monson-Haefel has created another classic with this volume.”

         —Dr. Bruce Scharlau
             Department of Computing Science
             University of Aberdeen, Scotland

“Richard Monson-Haefel provides the most comprehensive analysis of J2EE Web services that I’ve seen so far to date. This book covers the core Web services technologies (XML, SOAP, WSDL, and UDDI), as well as the Java APIs for Web services (JAX-RPC, SAAJ, JAXR, JAXP, and Web Services for J2EE, version 1.1). Richard also goes into detail on issues such as fault handling, type mapping, and JAX-RPC handlers. Developers will find this book to be a very valuable reference.”

         —Anne Thomas Manes
             Research Director, Burton Group
             Author, Web Services: A Manager’s Guide

J2EE™ Web Services is an excellent reference and tutorial for both beginning and seasoned Web services architects and developers. This book is the first to fully cover the WS-I 1.0 Web services standards and their integration with J2EE 1.4 components. Spend time with this book, and you’ll soon master J2EE Web Services and be able to successfully use this technology to solve key business integration problems in your enterprise.”

         —Tom Marrs
             Senior J2EE/XML/Web Services Architect
             Distributed Computing Solutions, Inc.

Web services are revolutionizing the way enterprises conduct business, as they allow disparate applications to communicate and exchange business data. Now, Java 2, Enterprise Edition (J2EE™) delivers a complete Web services platform. But how do you make sense of the sea of acronyms in this emerging area? Richard Monson-Haefel comes to the rescue with this essential guide for Java developers who need to understand J2EE APIs for Web services and the Web services standards.

J2EE™ Web Services is a comprehensive guide to developing and deploying Web services using J2EE technology. Concentrating on standards sanctioned by the Web Services Interoperability Organization (WS-I) for maximum interoperability, the author delves into Web-service standards and the J2EE 1.4 Web-service APIs and components with clear and engaging discussions.

Key topics covered include:

  • XML (eXtensible Markup Language) and XML Schema

  • SOAP (Simple Object Access Protocol)

  • WSDL (Web Services Description Language)

  • UDDI (Universal Description, Discovery, and Integration)

  • JAX-RPC (Java API for XML-based RPC)

  • SAAJ (SOAP with Attachments API for Java)

  • JAXR (Java API for XML Registries)

  • JAXP (Java API for XML Processing)

The appendices complement this wealth of information with coverage of XML regular expressions, Base 64 encoding, DTDs (document type definitions), SOAP Messages with Attachments (SwA), RCP/Encoded SOAP messaging, and references to other resources. In short, this accessible reference will give Java developers the tools they need to use J2EE technologies and APIs to integrate both enterprise applications and Web-based applications.



Table of contents

  1. Copyright
    1. Dedication
  2. Praise for J2EE™ Web Services
  3. Preface
    1. Are Web Services Important?
    2. What Do I Need to Know to Read This Book?
    3. What Does This Book Cover?
    4. How Is This Book Organized?
    5. What Doesn't This Book Cover?
      1. Non-Web Service Aspects of the J2EE Platform
      2. Vendor-Specific Configuration and Administration
      3. Other Web Service “Standards”
  4. Acknowledgments
  5. 1. An Overview of J2EE 1.4 Web Services
    1. 1.1. The J2EE Platform
    2. 1.2. The Technologies of Web Services
      1. 1.2.1. WS-I Basic Profile 1.0
      2. 1.2.2. XML
      3. 1.2.3. SOAP
      4. 1.2.4. WSDL
      5. 1.2.5. UDDI
    3. 1.3. The J2EE Web Service APIs
      1. 1.3.1. JAX-RPC
      2. 1.3.2. SAAJ
      3. 1.3.3. JAXR
      4. 1.3.4. JAXP
    4. 1.4. Wrapping Up
  6. I. XML
    1. 2. XML Basics
      1. 2.1. XML Primer
        1. 2.1.1. XML Document Instance
        2. 2.1.2. Anatomy of an XML Document
          1. 2.1.2.1. XML Declaration
          2. 2.1.2.2. Elements
          3. 2.1.2.3. Attributes
          4. 2.1.2.4. Comments
          5. 2.1.2.5. CDATA Section
        3. 2.1.3. Processing XML Documents
      2. 2.2. XML Namespaces
        1. 2.2.1. An Example of Using Namespaces
        2. 2.2.2. Default Namespaces, Prefixes, and Qualified Names
      3. 2.3. Wrapping Up
    2. 3. The W3C XML Schema Language
      1. 3.1. XML Schema Basics
        1. 3.1.1. Why XML Schema Is Preferred to DTDs in Web Services
        2. 3.1.2. The XML Schema Document
        3. 3.1.3. Simple Types
        4. 3.1.4. Complex Types
          1. 3.1.4.1. Sequences of Elements
          2. 3.1.4.2. Attributes
          3. 3.1.4.3. Occurrence Constraints
          4. 3.1.4.4. The all Element
        5. 3.1.5. Declaring Global Elements in a Schema
        6. 3.1.6. Qualified and Unqualified Elements
        7. 3.1.7. Assigning and Locating Schemas
      2. 3.2. Advanced XML Schema
        1. 3.2.1. Inheritance of Complex Types
          1. 3.2.1.1. Extension
          2. 3.2.1.2. Restriction
          3. 3.2.1.3. Polymorphism and Abstract Base Types
          4. 3.2.1.4. Abstract and Final Complex Types
        2. 3.2.2. Inheritance of Simple Types
          1. 3.2.2.1. The pattern Facet
          2. 3.2.2.2. The enumeration Facet
        3. 3.2.3. List and Union Types
          1. 3.2.3.1. List Types
          2. 3.2.3.2. Union Types
        4. 3.2.4. Anonymous Types
        5. 3.2.5. Importing and Including Schemas
          1. 3.2.5.1. Importing
          2. 3.2.5.2. Including
      3. 3.3. Wrapping Up
  7. II. SOAP and WSDL
    1. 4. SOAP
      1. 4.1. The Basic Structure of SOAP
      2. 4.2. SOAP Namespaces
      3. 4.3. SOAP Headers
        1. 4.3.1. The actor Attribute
        2. 4.3.2. The mustUnderstand Attribute
        3. 4.3.3. The WS-I Conformance Header Block
        4. 4.3.4. Final Words about Headers
      4. 4.4. The SOAP Body
      5. 4.5. SOAP Messaging Modes
        1. 4.5.1. Document/Literal
        2. 4.5.2. RPC/Literal
        3. 4.5.3. Messaging Modes versus Messaging Exchange Patterns
        4. 4.5.4. Other Messaging Modes
      6. 4.6. SOAP Faults
        1. 4.6.1. The faultcode Element
          1. 4.6.1.1. The Client Fault
          2. 4.6.1.2. The Server Fault
          3. 4.6.1.3. The VersionMismatch Fault
          4. 4.6.1.4. The MustUnderstand Fault
          5. 4.6.1.5. Non-standard SOAP Fault Codes
        2. 4.6.2. The faultstring Element
        3. 4.6.3. The faultactor Element
        4. 4.6.4. The detail Element
          1. 4.6.4.1. Processing Header Faults: Omitting the detail Element
        5. 4.6.5. Final Words about Faults
      7. 4.7. SOAP over HTTP
        1. 4.7.1. Transmitting SOAP with HTTP POST Messages
        2. 4.7.2. HTTP Response Codes
          1. 4.7.2.1. Success Codes
          2. 4.7.2.2. Error Codes
        3. 4.7.3. Final Words about HTTP
      8. 4.8. Wrapping Up
    2. 5. WSDL
      1. 5.1. The Basic Structure of WSDL
      2. 5.2. WSDL Declarations: The definitions, types, and import Elements
        1. 5.2.1. The XML Declaration
        2. 5.2.2. The definitions Element
        3. 5.2.3. The types Element
        4. 5.2.4. The import Element
      3. 5.3. The WSDL Abstract Interface: The message, portType, and operation Elements
        1. 5.3.1. The message Element
          1. 5.3.1.1. The message Element for RPC-Style Web Services
          2. 5.3.1.2. The message Element for Document-Style Web Services
          3. 5.3.1.3. Declaring Fault Messages
        2. 5.3.2. The portType Element
        3. 5.3.3. The operation Element
          1. 5.3.3.1. Parameter Order within an Operation
          2. 5.3.3.2. Operation Overloading
      4. 5.4. WSDL Messaging Exchange Patterns
        1. 5.4.1. Request/Response Messaging
        2. 5.4.2. One-Way Messaging
        3. 5.4.3. Notification and Solicit/Response Messaging
      5. 5.5. WSDL Implementation: The binding Element
        1. 5.5.1. SOAP Binding
          1. 5.5.1.1. The soapbind:binding Element
          2. 5.5.1.2. The soapbind:operation Element
          3. 5.5.1.3. The soapbind:body Element
          4. 5.5.1.4. The soapbind:fault Element
          5. 5.5.1.5. The soapbind:header Element
          6. 5.5.1.6. The soapbind:headerfault Element
      6. 5.6. WSDL Implementation: The service and port Elements
        1. 5.6.1. The soapbind:address Element
      7. 5.7. WS-I Conformance Claims
      8. 5.8. Wrapping Up
  8. III. UDDI
    1. 6. The UDDI Data Structures
      1. 6.1. The businessEntity Structure
        1. 6.1.1. The businessEntity Element and the businessKey Attribute
        2. 6.1.2. The discoveryURL Element
        3. 6.1.3. The name Element
        4. 6.1.4. The description Element
        5. 6.1.5. The contacts Element
        6. 6.1.6. The businessServices Element
        7. 6.1.7. The identifierBag Element
          1. 6.1.7.1. The D-U-N-S Identification System
          2. 6.1.7.2. The Thomas Register Identification System
        8. 6.1.8. The categoryBag Element
          1. 6.1.8.1. The NAICS Category System
          2. 6.1.8.2. The UNSPSC Category System
          3. 6.1.8.3. The ISO 3166 Geographic Locator System
          4. 6.1.8.4. Other Categorizations
            1. 6.1.8.4.1. tModel-Based Categorizations
            2. 6.1.8.4.2. General Keyword Categorizations
      2. 6.2. The businessService and bindingTemplate Structures
        1. 6.2.1. The businessService Structure
          1. 6.2.1.1. The categoryBag Element
          2. 6.2.1.2. The bindingTemplates Element
        2. 6.2.2. The bindingTemplate Structure
          1. 6.2.2.1. The accessPoint Element
          2. 6.2.2.2. The hostingRedirector Element
          3. 6.2.2.3. The tModelInstanceDetails and tModelInstanceInfo Elements
      3. 6.3. The tModel Structure
        1. 6.3.1. tModels for WSDL Documents
        2. 6.3.2. tModels as Taxonomy Identifiers
        3. 6.3.3. The uddi-org:types tModel
        4. 6.3.4. Checked and Unchecked tModels
        5. 6.3.5. The tModel XML Schema
          1. 6.3.5.1. The name and description Elements
          2. 6.3.5.2. The overviewDoc Element
          3. 6.3.5.3. The identifierBag and categoryBag Elements
      4. 6.4. The publisherAssertion Structure
      5. 6.5. UUID Keys
      6. 6.6. WS-I Conformance Claims
      7. 6.7. Wrapping Up
    2. 7. The UDDI Inquiry API
      1. 7.1. General Information about UDDI SOAP Messaging
        1. IBM
        2. Microsoft
        3. SAP
        4. NTT
      2. 7.2. The Inquiry Operations
        1. 7.2.1. Find Operations
          1. 7.2.1.1. Using Search Elements
            1. 7.2.1.1.1. The identifierBag and categoryBag Search Elements
            2. 7.2.1.1.2. The name Search Element
            3. 7.2.1.1.3. The tModelBag Search Element
            4. 7.2.1.1.4. The findQualifiers Search Element
          2. 7.2.1.2. Operation Definitions and Payloads
            1. 7.2.1.2.1. xxxInfos Response Structures
            2. 7.2.1.2.2. The find_business Operation
              1. Type Definitions
              2. WSDL message and portType Definitions
            3. 7.2.1.2.3. The find_relatedBusinesses Operation
              1. Type Definitions
              2. WSDL message and portType Definitions
            4. 7.2.1.2.4. The find_service Operation
              1. Type Definitions
              2. WSDL message and portType Definitions
            5. 7.2.1.2.5. The find_binding Operation
              1. Type Definitions
              2. WSDL message and portType Definitions
            6. 7.2.1.2.6. The find_tModel Operation
              1. Type Definitions
              2. WSDL message and portType Definitions
        2. 7.2.2. Get Operations
          1. 7.2.2.1. The get_businessDetail Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          2. 7.2.2.2. The get_businessDetailExt Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          3. 7.2.2.3. The get_serviceDetail Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          4. 7.2.2.4. The get_bindingDetail Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          5. 7.2.2.5. The get_tModelDetail Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
      3. 7.3. Wrapping Up
    3. 8. The UDDI Publishing API
      1. 8.1. Operation Definitions and Payloads
        1. 8.1.1. Authorization Operations
          1. 8.1.1.1. The get_authToken Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          2. 8.1.1.2. The discard_authToken Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
        2. 8.1.2. Save Operations
          1. 8.1.2.1. The save_business Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          2. 8.1.2.2. The save_service Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          3. 8.1.2.3. The save_binding Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          4. 8.1.2.4. The save_tModel Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          5. 8.1.2.5. The add_publisherAssertions Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          6. 8.1.2.6. The set_publisherAssertions Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
        3. 8.1.3. Delete Operations
          1. 8.1.3.1. The delete_business Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          2. 8.1.3.2. The delete_service Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          3. 8.1.3.3. The delete_binding Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          4. 8.1.3.4. The delete_tModel Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          5. 8.1.3.5. The delete_publisherAssertions Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
        4. 8.1.4. Get Operations
          1. 8.1.4.1. The get_assertionStatusReport Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          2. 8.1.4.2. The get_publisherAssertions Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
          3. 8.1.4.3. The get_registeredInfo Operation
            1. Type Definitions
            2. WSDL message and portType Definitions
      2. 8.2. Fault Messages
      3. 8.3. Wrapping Up
  9. IV. JAX-RPC
    1. 9. JAX-RPC Overview
      1. 9.1. The Server-Side Programming Models
        1. 9.1.1. JAX-RPC Service Endpoint
        2. 9.1.2. Enterprise JavaBeans Endpoints
      2. 9.2. The Client-Side Programming Models
        1. 9.2.1. Generated Stubs
        2. 9.2.2. Dynamic Proxies
        3. 9.2.3. DII
      3. 9.3. Other JAX-RPC Topics Covered
      4. 9.4. SAAJ
      5. 9.5. Wrapping Up
    2. 10. JAX-RPC Service Endpoints
      1. 10.1. A Simple JSE Example
      2. 10.2. The JSE Runtime Environment
        1. 10.2.1. Servlets: The Foundation of JSE
        2. 10.2.2. JNDI Environment Naming Context
        3. 10.2.3. The ServletEndpointContext and ServiceLifecycle Interfaces
          1. 10.2.3.1. Using the Life-Cycle Methods init() and destroy()
          2. 10.2.3.2. Using the ServletEndpointContext Interface
            1. 10.2.3.2.1. The getUserPrincipal() and isUserInRole() Methods
            2. 10.2.3.2.2. The getHttpSession() Method
            3. 10.2.3.2.3. The getServletContext() Method
            4. 10.2.3.2.4. The getMessageContext() Method
      3. 10.3. Multi-threading and JSEs
      4. 10.4. Wrapping Up
    3. 11. JAX-RPC EJB Endpoints
      1. 11.1. An Enterprise JavaBeans Primer
        1. 11.1.1. Transactions in a Nutshell
        2. 11.1.2. Understanding EJB
          1. 11.1.2.1. What Is EJB?
          2. 11.1.2.2. Why Use EJB?
          3. 11.1.2.3. RPC Components: Stateless, Stateful, and Entity Beans
          4. 11.1.2.4. Asynchronous Components: The Message-Driven Bean
          5. 11.1.2.5. The EJB Container System
        3. 11.1.3. Where to Go from Here
      2. 11.2. Enterprise JavaBeans Web Services
        1. 11.2.1. A Simple Example
          1. 11.2.1.1. The Endpoint Interface
          2. 11.2.1.2. The Bean Class
          3. 11.2.1.3. Deployment Descriptors and Packaging
        2. 11.2.2. The EJB Runtime Environment
          1. 11.2.2.1. The JNDI Environment Naming Context
          2. 11.2.2.2. The SessionBean Interface
          3. 11.2.2.3. The SessionContext
      3. 11.3. Wrapping Up
    4. 12. JAX-RPC Client APIs
      1. 12.1. Generated Stubs
        1. 12.1.1. The Endpoint Interface
        2. 12.1.2. The Generated Stub
        3. 12.1.3. Service Interfaces
        4. 12.1.4. Using a Generated Stub in J2EE
      2. 12.2. Dynamic Proxies
        1. 12.2.1. Using a Dynamic Proxy
        2. 12.2.2. Under the Covers
      3. 12.3. DII
        1. 12.3.1. Using DII with a WSDL Document
        2. 12.3.2. Using DII without a WSDL Document
        3. 12.3.3. Using One-Way Messaging with DII
        4. 12.3.4. JAX-RPC Standard Properties and Constants
      4. 12.4. Wrapping Up
    5. 13. SAAJ
      1. 13.1. A Simple SAAJ Example
      2. 13.2. Creating a SOAP Message
        1. 13.2.1. The MessageFactory Class
          1. 13.2.1.1. The newInstance() Method
          2. 13.2.1.2. The createMessage() Method
          3. 13.2.1.3. The createMessage Method with Parameters
        2. 13.2.2. SaajOutputter Classes
        3. 13.2.3. The SOAPMessage Class
          1. 13.2.3.1. The writeTo() Method
          2. 13.2.3.2. The getSOAPBody() and getSOAPHeader() Methods
          3. 13.2.3.3. The getProperty() and setProperty() Methods
      3. 13.3. Working with SOAP Documents
        1. 13.3.1. The SOAPPart and SOAPEnvelope Types
        2. 13.3.2. The SOAPFactory Class and Name Types
        3. 13.3.3. The SOAPElement Type
        4. 13.3.4. The Node Type
        5. 13.3.5. The SOAPHeader Type
        6. 13.3.6. The SOAPHeaderElement Type
        7. 13.3.7. The SOAPBody Type
        8. 13.3.8. The SOAPBodyElement Type
        9. 13.3.9. The Text Type
        10. 13.3.10. The SOAPConstants Class
        11. 13.3.11. The SOAPException Class
        12. 13.3.12. The SOAPFactory and SOAPElement Types
      4. 13.4. Working with SOAP Faults
        1. 13.4.1. The SOAPFault Type
        2. 13.4.2. The Detail Type
        3. 13.4.3. The SOAPFaultElement Type
        4. 13.4.4. The DetailEntry Type
      5. 13.5. Sending SOAP Messages with SAAJ
      6. 13.6. SAAJ 1.2 and DOM 2
      7. 13.7. Wrapping Up
    6. 14. Message Handlers
      1. 14.1. A Simple Example
        1. 14.1.1. Defining a Message-Handler Class
        2. 14.1.2. Defining a WSDL Document
        3. 14.1.3. Generating the Service and Endpoint Interfaces
        4. 14.1.4. Configuring Message Handlers
        5. 14.1.5. Using Message Handlers in a J2EE Component
      2. 14.2. Handler Chains and Order of Processing
        1. 14.2.1. Return Values and Order of Processing
        2. 14.2.2. Exceptions and Order of Processing
          1. 14.2.2.1. The SOAPFaultException Type
          2. 14.2.2.2. The JAXRPCException Type
      3. 14.3. The Handler Runtime Environment
        1. 14.3.1. Statelessness and Multi-threading
        2. 14.3.2. JNDI Environment Naming Context
        3. 14.3.3. A Message Handler's Life Cycle
        4. 14.3.4. The MessageContext Type
      4. 14.4. Wrapping Up
    7. 15. Mapping Java to WSDL and XML
      1. 15.1. Mapping WSDL to Java
        1. 15.1.1. WSDL-to-Endpoint Interfaces
        2. 15.1.2. Declaring Multiple Parts
        3. 15.1.3. Defining Multiple Operations
        4. 15.1.4. One-Way Messaging
      2. 15.2. Mapping XML Schema to Java
        1. 15.2.1. XML Schema Built-in Simple Types
        2. 15.2.2. XML Schema Complex Types
        3. 15.2.3. Arrays
        4. 15.2.4. Enumerations
        5. 15.2.5. SOAPElement: Supporting Non-standard Types in Document/Literal Encoding
        6. 15.2.6. SOAPElement: The xsd:any Element
        7. 15.2.7. Nillable Elements
      3. 15.3. Holders
        1. 15.3.1. Pass-by-Copy: IN Parameters
        2. 15.3.2. Pass-by-Reference: INOUT and OUT Parameters
        3. 15.3.3. Holders: Supporting INOUT and OUT Parameters in JAX-RPC
        4. 15.3.4. Mapping Holder Types from WSDL
          1. 15.3.4.1. Examples
          2. 15.3.4.2. Rules for Mapping parts to Method Parameters
          3. 15.3.4.3. Standard Holder Types
          4. 15.3.4.4. Generated Holder Types
      4. 15.4. Faults and Java Exceptions
        1. 15.4.1. WSDL Faults and Application Exceptions
      5. 15.5. Wrapping Up
  10. V. JAXR
    1. 16. Getting Started with JAXR
      1. 16.1. Using a UDDI Test Registry
      2. 16.2. Connecting to a UDDI Registry
        1. 16.2.1. Obtaining a ConnectionFactory
        2. 16.2.2. Configuring the ConnectionFactory
          1. IBM
          2. Microsoft
          3. SAP
          4. NTT
        3. 16.2.3. Connecting to the UDDI Registry
        4. 16.2.4. Authenticating to a UDDI Registry
        5. 16.2.5. Obtaining a JAXR Connection in J2EE
      3. 16.3. Using the RegistryService and BusinessLifeCycleManager
        1. 16.3.1. The RegistryService Interface
        2. 16.3.2. Using the BusinessLifeCycleManager
          1. 16.3.2.1. The LifeCycleManager Interface
          2. 16.3.2.2. The BusinessLifeCycleManager Interface
      4. 16.4. The BulkResponse Type
        1. 16.4.1. The BulkResponse Interface
        2. 16.4.2. Handling the BulkResponse in Examples
      5. 16.5. Exceptions
      6. 16.6. Wrapping Up
    2. 17. The JAXR Business Objects
      1. 17.1. The RegistryObject Interface
        1. 17.1.1. The UUID Key
          1. 17.1.1.1. Understanding UUIDs
          2. 17.1.1.2. The Key Interface
      2. 17.2. The Organization Information Object
        1. 17.2.1. businessEntity
        2. 17.2.2. ExternalLinks
          1. 17.2.2.1. The ExternalLink Information Object
        3. 17.2.3. Name and Description
          1. 17.2.3.1. The InternationalString Interface
          2. 17.2.3.2. The LocalizedString Interface
          3. 17.2.3.3. Working with InternationalString Objects
        4. 17.2.4. User
          1. 17.2.4.1. Creating a New User Object
          2. 17.2.4.2. Setting a Person's Name
          3. 17.2.4.3. Adding Descriptions
          4. 17.2.4.4. Adding E-Mail Addresses
          5. 17.2.4.5. Adding Phone Numbers
          6. 17.2.4.6. Adding a Postal Address
        5. 17.2.5. Classification
          1. 17.2.5.1. The Standard UDDI Classifications
            1. 17.2.5.1.1. The BusinessQueryManager Object
            2. 17.2.5.1.2. Adding Standard UDDI Classifications to an Organization
              1. NAICS
              2. UNSPSC
              3. ISO 3166
          2. 17.2.5.2. The Classification Interface
          3. 17.2.5.3. The ClassificationScheme Interface
          4. 17.2.5.4. Reading Classification and ClassificationScheme Objects
        6. 17.2.6. ExternalIdentifiers
          1. 17.2.6.1. Managing External Identifiers
          2. 17.2.6.2. The ExternalIdentifier Interface
        7. 17.2.7. Services
      3. 17.3. Wrapping Up
    3. 18. The JAXR Technical Objects
      1. 18.1. The Service and ServiceBinding Information Objects
        1. 18.1.1. Creating a New Service Object
        2. 18.1.2. Creating a New ServiceBinding Object
        3. 18.1.3. The Service Interface
        4. 18.1.4. The ServiceBinding Interface
      2. 18.2. The Concept Information Object
        1. 18.2.1. Creating a New Concept
          1. 18.2.1.1. Create a Concept Instance
          2. 18.2.1.2. Set the Concept Name
          3. 18.2.1.3. Set the Overview Document
          4. 18.2.1.4. Assign the wsdlSpec Classification
          5. 18.2.1.5. Assign the WS-I Conformance Claim
          6. 18.2.1.6. Save the Concept Object
        2. 18.2.2. The Concept Interface
          1. 18.2.2.1. Concept Methods and Taxonomy Browsing
          2. 18.2.2.2. RegistryObject Methods and WSDL Concepts
      3. 18.3. The SpecificationLink Information Object
        1. 18.3.1. Using SpecificationLink Objects
          1. 18.3.1.1. Create a Service and a ServiceBinding
          2. 18.3.1.2. Create a SpecificationLink
        2. 18.3.2. The SpecificationLink Interface
      4. 18.4. The Association Information Object
        1. 18.4.1. Creating an Association
          1. 18.4.1.1. Find the Concept Object Representing the Association Type
          2. 18.4.1.2. Create an Association Instance
          3. 18.4.1.3. Save the Association
      5. 18.5. Predefined Enumerations
        1. 18.5.1. The AssociationType Enumeration
        2. 18.5.2. The URLType Enumeration
        3. 18.5.3. The ExtensibleObject and Slot Interfaces
      6. 18.6. Wrapping Up
    4. 19. The JAXR Inquiry and Publishing APIs
      1. 19.1. Mapping JAXR to the UDDI Inquiry API
        1. 19.1.1. Using Search Criteria
          1. 19.1.1.1. The namePattern Criteria
          2. 19.1.1.2. The classifications Criteria
          3. 19.1.1.3. The externalIdentifiers Criteria
          4. 19.1.1.4. The specifications Criteria
          5. 19.1.1.5. The externalLinks Criteria
          6. 19.1.1.6. The findQualifiers Criteria
        2. 19.1.2. The findXXX() Methods
          1. 19.1.2.1. The findAssociations() Method
          2. 19.1.2.2. The findCallerAssociations() Method
          3. 19.1.2.3. The findOrganizations() Method
          4. 19.1.2.4. The findServices() Method
          5. 19.1.2.5. The findServiceBindings() Method
          6. 19.1.2.6. The findClassificationSchemes() Method
          7. 19.1.2.7. The findClassificationSchemeByName() Method
          8. 19.1.2.8. The findConcepts() Method
          9. 19.1.2.9. The findConceptByPath() Method
      2. 19.2. Mapping JAXR to the UDDI Publishing API
      3. 19.3. Wrapping Up
  11. VI. JAXP
    1. 20. SAX2
      1. 20.1. Parsing with SAX: XMLReaderFactory and XMLReader
      2. 20.2. The ContentHandler and DefaultHandler Interfaces
        1. 20.2.1. The startDocument() and endDocument() Methods
        2. 20.2.2. The startElement() and endElement() Methods
        3. 20.2.3. The startPrefixMapping() and endPrefixMapping() Methods
        4. 20.2.4. The characters() Method
        5. 20.2.5. Other ContentHandler Methods
        6. 20.2.6. Other SAX2 Listener Interfaces
      3. 20.3. Validating with W3C XML Schema
      4. 20.4. Wrapping Up
    2. 21. DOM 2
      1. 21.1. Parsing with DOM: DocumentBuilderFactory and DocumentBuilder
      2. 21.2. Nodes
        1. 21.2.1. Type-Dependent Properties
        2. 21.2.2. XML Name Methods
        3. 21.2.3. Attribute Methods
        4. 21.2.4. The Owner Document
        5. 21.2.5. Navigating a Node Tree
        6. 21.2.6. Methods for Child Management
        7. 21.2.7. Other Methods
      3. 21.3. Building a DOM Document
      4. 21.4. Copying Nodes
      5. 21.5. Wrapping Up
  12. VII. Deployment
    1. 22. J2EE Deployment
      1. 22.1. Overview of the J2EE Deployment Process
      2. 22.2. J2EE Web Services Deployment
        1. 22.2.1. Starting with a J2EE Endpoint
        2. 22.2.2. Starting with WSDL
        3. 22.2.3. JAX-RPC Mapping Files
        4. 22.2.4. Deployment Descriptors for J2EE Components
      3. 22.3. Deploying JSEs
        1. 22.3.1. Packaging JSEs in a WAR File
        2. 22.3.2. The web.xml File
          1. 22.3.2.1. Configuring the ServletContext
          2. 22.3.2.2. Configuring the JNDI ENC
          3. 22.3.2.3. Configuring Other Aspects of a JSE
      4. 22.4. Deploying EJB Endpoints
        1. 22.4.1. Declarative Transaction Attributes
        2. 22.4.2. Declarative Security Attributes
      5. 22.5. Service References
        1. 22.5.1. The service-ref-name Element
        2. 22.5.2. The service-interface Element
        3. 22.5.3. The wsdl-file and service-qname Elements
        4. 22.5.4. The jaxrpc-mapping-file Element
        5. 22.5.5. The port-component-ref Element
        6. 22.5.6. The Display Elements
        7. 22.5.7. The handler Element
          1. 22.5.7.1. The handler-name Element
          2. 22.5.7.2. The handler-class Element
          3. 22.5.7.3. The init-param Elements
          4. 22.5.7.4. The soap-header Elements
          5. 22.5.7.5. The soap-role Elements
          6. 22.5.7.6. The port-name Element
          7. 22.5.7.7. Proper Processing by Handlers
          8. 22.5.7.8. The Handler Display Elements
      6. 22.6. Wrapping Up
    2. 23. Web Service Descriptors
      1. 23.1. The wsdl-file and wsdl-port Elements
      2. 23.2. The port-component-name Element
      3. 23.3. The service-endpoint-interface Element
      4. 23.4. The service-impl-bean Element
      5. 23.5. The jaxrpc-mapping-file Element
      6. 23.6. The handler Element
        1. 23.6.1. The handler-name Element
        2. 23.6.2. The handler-class Element
        3. 23.6.3. The init-param Elements
        4. 23.6.4. The soap-header Elements
        5. 23.6.5. The soap-role Elements
        6. 23.6.6. Proper Processing by Handlers
        7. 23.6.7. The Display Elements
      7. 23.7. Wrapping Up
    3. 24. JAX-RPC Mapping Files
      1. 24.1. Conditions for a Lightweight JAX-RPC Mapping File
      2. 24.2. A Lightweight Example
      3. 24.3. A Heavyweight Example
      4. 24.4. Anatomy of a Mapping File
        1. 24.4.1. The java-wsdl-mapping Element
        2. 24.4.2. The package-mapping Element
        3. 24.4.3. The java-xml-type-mapping Element
        4. 24.4.4. The exception-mapping Element
        5. 24.4.5. The service-interface-mapping Element
        6. 24.4.6. The service-endpoint-interface-mapping Element
      5. 24.5. Wrapping Up
  13. Appendices
    1. A. XML DTDs
    2. B. XML Schema Regular Expressions
      1. B.1. Character Sets
      2. B.2. Quantifiers
      3. B.3. Other Meta-characters
      4. B.4. Real-World Examples
        1. B.4.1. ISBN (International Standard Book Number)
        2. B.4.2. United States Zip Code
        3. B.4.3. United States Phone Number
        4. B.4.4. United Kingdom Postal Code
    3. C. Base64 Encoding
    4. D. SOAP RPC/Encoded
      1. D.1. The soap:encodingStyle Attribute
      2. D.2. The Operation Structs
      3. D.3. Simple Types
      4. D.4. Complex Types
      5. D.5. Array Types
        1. D.5.1. Array Size
        2. D.5.2. Other Features of Arrays
      6. D.6. References
      7. D.7. Wrapping Up
    5. E. SOAP Messages with Attachments
      1. E.1. Understanding MIME
      2. E.2. Using MIME with SOAP
      3. E.3. Wrapping Up
    6. F. SAAJ Attachments
      1. F.1. The Java Activation Framework
        1. F.1.1. DataHandler
        2. F.1.2. DataContentHandler
        3. F.1.3. DataSource
      2. F.2. SAAJ and JAF: AttachmentPart
        1. F.2.1. Data Objects
        2. F.2.2. The createAttachmentPart() Method
        3. F.2.3. The setContent() and setDataHandler() Methods
        4. F.2.4. The getContent() Method
        5. F.2.5. The MIME Header Methods
      3. F.3. The SOAPPart
        1. F.3.1. XSLT
        2. F.3.2. TrAX
        3. F.3.3. Using a StreamSource
        4. F.3.4. DOMSource
        5. F.3.5. SAXSource
      4. F.4. The SOAPEnvelope
        1. F.4.1. The getHeader(), getBody(), addHeader(), and addBody() Methods
        2. F.4.2. The createName() Method
      5. F.5. Wrapping Up
    7. G. JAX-RPC and SwA
      1. G.1. JAF Revisited: DataContentHandler and DataSource Types
      2. G.2. A Simple Example
      3. G.3. Mapping MIME Types to Java
        1. G.3.1. The multipart/* MIME Type
        2. G.3.2. The text/xml and application/xml MIME Types
        3. G.3.3. MIME Attachments as Return Types, and INOUT and OUT Parameters
      4. G.4. Using DataHandler and DataSource Types
      5. G.5. Wrapping Up
    8. H. Using JAX-RPC DII without a WSDL Document
  14. Bibliography
    1. Web Services Specifications
    2. XML
    3. SOAP
    4. WSDL
    5. UDDI
    6. J2EE 1.4 Specifications
    7. Web Services
    8. Miscellaneous Specifications
    9. Books
  15. Credits

Product information

  • Title: J2EE™ Web Services
  • Author(s):
  • Release date: October 2003
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 9780321146182