2. Using the Tutorial Examples 3. Getting Started with Web Applications 5. JavaServer Pages Technology 7. JavaServer Pages Standard Tag Library 10. JavaServer Faces Technology 11. Using JavaServer Faces Technology in JSP Pages 12. Developing with JavaServer Faces Technology 13. Creating Custom UI Components 14. Configuring JavaServer Faces Applications 15. Internationalizing and Localizing Web Applications 16. Building Web Services with JAX-WS 17. Binding between XML Schema and Java Classes The Structure of an XML Document Creating and Sending a Simple Message Accessing Elements of a Message Getting aSOAPConnection Object Getting the Content of a Message Adding Content to theSOAPPart Object Adding a Document to the SOAP Body Manipulating Message Content Using SAAJ or DOM APIs Creating anAttachmentPart Object and Adding Content Accessing anAttachmentPart Object Creating and Populating aSOAPFault Object Building and Running the Header Example Examining theDOMSrcExample Class Building and Running the DOM and DOMSource Examples Building and Running the Attachments Example Building and Running the SOAP Fault Example Further Information about SAAJ 21. Getting Started with Enterprise Beans 23. A Message-Driven Bean Example 24. Introduction to the Java Persistence API 25. Persistence in the Web Tier 26. Persistence in the EJB Tier 27. The Java Persistence Query Language 28. Introduction to Security in the Java EE Platform 29. Securing Java EE Applications 31. The Java Message Service API 32. Java EE Examples Using the JMS API 36. The Coffee Break Application | Chapter 19SOAP with Attachments API for JavaSOAP with Attachments API for Java (SAAJ) is used mainly for theSOAP messaging that goes on behind the scenes in JAX-WS handlers and JAXRimplementations. Secondarily, it is an API that developers can use when they chooseto write SOAP messaging applications directly rather than use JAX-WS. The SAAJ API allowsyou to do XML messaging from the Java platform: By simply makingmethod calls using the SAAJ API, you can read and write SOAP-based XMLmessages, and you can optionally send and receive such messages over the Internet(some implementations may not support sending and receiving). This chapter will help you learnhow to use the SAAJ API. The SAAJ API conforms to the Simple Object Access Protocol (SOAP) 1.1 and1.2 specifications and the SOAP with Attachments specification. The SAAJ 1.3 specification definesthejavax.xml.soap package, which contains the API for creating and populating aSOAP message. This package has all the API necessary for sending request-response messages. (Request-responsemessages are explained inSOAPConnection Objects.) Note -Thejavax.xml.messaging package, defined in the Java API for XML Messaging (JAXM) 1.1specification, is not part of the Java EE platform and is not discussedin this chapter. The JAXM API is available as a separate download fromhttp://www.oracle.com/technetwork/java/index-jsp-137004.html. This chapter starts with an overview of messages and connections, giving some ofthe conceptual background behind the SAAJ API to help you understand why certainthings are done the way they are. Next, the tutorial shows you howto use the basic SAAJ API, giving examples and explanations of thecommonly used features. The code examples in the last part of the tutorialshow you how to build an application. The case study inChapter 36, The Coffee Break Application includesSAAJ code for both sending and consuming a SOAP message. Copyright © 2010, Oracle and/or its affiliates. All rights reserved.Legal Notices |