Messages With Attachments
SOAP messages can have message parts that contain attachments. For a message part to contain an attachment, specify the Special Type in the Type field of the Part Details section of the Message resource when creating a WSDL file configuration. For more information about creating WSDL files, see WSDL Palette.
Depending on the SOAP version being used, messages with attachments can conform to one of the following styles:
-
Messages with Attachments (SwA) - available with SOAP version 1.1 and 1.2.
-
Message Transmission Optimization Mechanism (MTOM) - available with SOAP version 1.1 and 1.2.
Messages with Attachments (SwA)
SOAP clients that send messages with attachments in the SwA style must conform to the SOAP Messages with Attachments specification (http://www.w3.org/TR/SOAP-attachments).
The output schema element for a message part that contains an attachment; holds the content ID of the attachment instead of holding the actual attachment data. The actual data for attachments is always contained within the mimeEnvelopeElement of the output schema for this resource. This element contains a repeating element named mimePart that holds the list of attachments in the SOAP message. The attachment list can be correlated to the message parts containing the attachments by using the content-id mimeHeader element.
Message Transmission Optimization Mechanism (MTOM)
Message Transmission Optimization Mechanism (MTOM) provides another way of sending binary content or attachment processing by serializing SOAP messages with attachments. Optimization is only available for element content that is in a canonical lexical representation of xs:base64Binary
data type. MTOM conforms to the specification http://www.w3.org/TR/soap12-mtom.
For an outbound SOAP Message with MTOM attachments sent by SOAP Request Reply or SOAP Send Reply activities, any element of type xs:base64Binary
(or an extension of xs:base64Binary
) in the SOAP response message is treated as an MTOM attachment and appears as a separate MIME part on the wire.
For an inbound SOAP Message with MTOM attachments received by the SOAP Event Source or SOAP Request Reply activities, the SOAP message have an XOP include reference to the attachment. Any XOP include reference in the SOAP message gets replaced by the corresponding attachment’s content encoded in Base64. Any MIME attachment that is not referenced from the SOAP Message using XOP include reference gets ignored by the MTOM Processing layer.
Note that the attachment is a part of the SOAP Infoset.
For more information about MTOM, see TIBCO ActiveMatrix BusinessWorks™ Process Design.