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, choose Response > Attachment from the left pane, Attachment Handler from the right pane, and click Finish.

  2. Double-click the Response Attachment > Attachment Handler node. The following Attachment Handler operations are shown in the right GUI panel.
    • Attachment sorting options: Specifies how attachments are sorted.
    • Attachments from previous response: Shows available MIME attachments by Index, Content-ID, and Base 64 Decode.
    • Output Headers: Enable to output MIME Attachment Headers. If this option is enabled, both the MIME Response Header and Body can be output. By default, only the MIME Response Body is output.
    • Selected Attachment: Shows 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: Enable 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 choose Add Output.
  2. From the Add Output wizard, complete one of the following:
    • Choose 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.

    • Choose 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