Tutorial

This tutorial walks you through how to use the SAAJ API. First, it covers the basics of creating and sending a simple SOAP message. Then you will learn more details about adding content to messages, including how to create SOAP faults and attributes. Finally, you will learn how to send a message and retrieve the content of the response. After going through this tutorial, you will know how to perform the following tasks:

  • Creating and sending a simple message

  • Adding content to the header

  • Adding content to the SOAPPart object

  • Adding a document to the SOAP body

  • Manipulating message content using SAAJ or DOM APIs

  • Adding attachments

  • Adding attributes

  • Using SOAP faults

In the section Code Examples (page 371), you will see the code fragments from earlier ...

Get The J2EE™ Tutorial Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.