This topic explains how to configure and apply the Attachment Handler tool in SOAtest and Virtualize. This tool manages MIME attachments.

Sections include:

Understanding Attachment Handler

The Attachment Handler tool manages all of the MIME attachments that are received as part of a SOAP response or an incoming message. Since so many MIME attachments can be sent, it is useful to be able to keep track of each attachment.

To use the Attachment Handler tool, you must chain it to a SOAP Client (SOAtest) or Message Responder (Virtualize) tool that receives MIME attachments as part of the response or incoming message. The MIME attachments that are returned will be managed by the Attachment Handler.

Configuring Attachment Handler

To configure the Attachment Handler tool:

  1. Add the Attachment Handler tool as an output to the SOAP Client or Message Responder. In the Add Output wizard, select Response> Attachment from the left pane, Attachment Handler from the right pane, and click the Finish button.

  2. Double-click the Response Attachment> Attachment Handler node. The following Attachment Handler operations display in the right GUI panel.
    • Attachment sorting options: Specifies how attachments are sorted.
    • Attachments from previous response: Displays available MIME attachments by Index, Content-ID, and Base 64 Decode.
    • Output Headers: Select to output MIME Attachment Headers. If this option is selected, both the MIME Response Header and Body can be output. By default, only the MIME Response Body is output.
    • Selected Attachment: Displays the MIME attachments returned in the XML response in text form.
    • Expected number of attachments: Specifies the expected number of attachments.
    • Fail test on mismatches: Select to make the test fail if the number of expected attachments specified does not match the actual number of attachments received by the Attachment Handler Tool.




Attaching Outputs to the Attachment Handler

You can also add outputs such as Diff tools or XML Data Banks to the Attachment Handler tool. To do so, complete the following:

  1. Right-click the desired Attachment Handler node and select Add Output from the shortcut menu.
  2. From the Add Output wizard, complete one of the following:
    • Select All Attachments from the left pane and the desired output tool from the right pane and click Finish. The tool selected will be applied to all Response MIME Attachments specified in the Attachment Handler tool.

    • Select Attachment # from the left pane and the desired output tool from the right pane and click Finish. The tool selected will be applied to the specific Attachment corresponding to the chosen Index number in the Available Attachments list.

  • No labels