Messages with Attachments
M
ESSAGES
121
Figure 52
SOAPMessage
Object with Two
AttachmentPart
Objects
The SAAJ API provides the
AttachmentPart
class to represent an attachment
part of a SOAP message. A
SOAPMessage
object automatically has a
SOAPPart
object and its required subelements, but because
AttachmentPart
objects are
optional, you must create and add them yourself. The tutorial section walks you
through creating and populating messages with and without attachment parts.