Many services use attachments to send and receive data that is not well represented with XML messages (for example, multimedia binary data).
SOAtest and Virtualize
can be used to send and receive attachments along with messages. Received attachments can then be processed and validated for correctness.
SOAP Client and Virtualize Message Responder
tools can be configured to send MIME, DIME, and MTOM attachments along with the message. Attachment encapsulation format can be configured under the tool’s Misc (SOAtest) or Options (Virtualize) tab.
With MIME/DIME, the tool’s Attachment tab allows you to send either Binary or XML attachments without scripting as described in the
With MTOM, you do NOT need to add anything to the Attachment tab (see below for details).
The Attachment Handler tool can be used in conjunction with a
SOAP Client or Message Responder
to extract and validate attachments from a response message. For more information on configuring the Attachment Handler tool, see Attachment Handler.
Virtualize will ignore all incoming message MIME parts except the root part (which contains a SOAP envelope). Therefore, it is not possible to configure message correlations or other actions on these parts. However, responses can include any MIME/DIME/MTOM content as configured in the Message Responder
can work with services leveraging the MTOM (Message Transmission Optimization Mechanism) and XOP (XML-binary Optimized Packaging) technologies. You can elect the binary content to include—as well as validate, send and receive—optimized messages.
MTOM optimized messages can be sent using the SOAP Client or Message Responder in Form Input view.
The XOP optimization is performed by replacing the xsd:base64Binary element contents with a reference that looks similar to the following:
< xop:Include href="cid:1.urn:uuid:[email protected]" xmlns:xop=" " />
The same href cid value is used in a --MIME_boundary section, which would include the corresponding non-encoded content.
To enable the sending of optimized messages, complete the following:
When you are using MTOM, you do NOT need to add anything to the SOAP Client’s or Message Responder's Attachment tab.
Note that incoming MIME attachments can be extracted by chaining an Attachment Handler to the Message Responder's Incoming Attachment output. This is described in Adding Attachment Handlers to the Message Responder.