MIME multipart message overview

Multipurpose Internet Mail Extensions (MIME) is an Internet standard that is used to support the transfer of single or multiple text and non-text attachments. Non-text attachments can include graphics, audio, and video files. You can send multiple attachments in a single ebMS message by using the MIME implementation in B2B Advanced Communications.

If a message in MIME format contains multiple related parts, the Content-Type parameter is set to Multipart/Related. B2B Advanced Communications can receive or send a multipart MIME message from or to a trading partner. The message received from or sent to a trading partner can be a request or a response to a request that was sent.

To ensure non-repudiation of the messages that are received from trading partners, the AS4 receiver does one of the following tasks based on the audit payload threshold configuration:
  • Stores the message in storage and gives references of the stored request in the visibility event for audit logging, before processing the message.
  • Sends the message inline with the visibility event for audit logging.

MIME processing for inbound messages

When a message (request or response) is received from a trading partner, the AS4 receiver in B2B Advanced Communications executes the following tasks:
  1. Checks the message for MIME headers. If the required MIME headers (MIME-Version, Content-Type, Content-Transfer-Encoding, and Content-ID) are defined in the message, then the AS4 receiver proceeds with MIME parsing of the message.
  2. Checks the start parameter and picks the SOAP envelope from the start parameter to determine which part in the multipart message contains the payload.
  3. Based on the payload threshold configuration (of the AS4 receiver or the HTTP or HTTPS destination), stores the SOAP envelope (payload) in storage or passes it inline with the business document object (BDO) to the business application for processing. Concurrently, the AS4 receiver stores the message attachments to storage.
  4. Sends references of the individual parts to the business application as part of the BDO with appropriate MIME metadata (Content-Type and Content-ID).

If the SOAP envelope is not available in the start parameter, it is assumed that the first part in the multipart message contains the SOAP envelope.

MIME processing for outbound messages

The business application sends a BDO that contains a payload and multiple attachments that are to be sent as a multipart MIME messages. The payload and the attachments can be inline or in storage The system packages the payload and attachments as a multipart MIME message and sends it to the configured URL using the HTTP destination. When a MIME multipart message (request or response) is sent to a trading partner, the AS4 component in B2B Advanced Communications executes the following tasks:
  1. Receives the BDO along with the payload and attachments from the business application and initiates ebMS processing.
  2. Completes the following tasks to MIME pack the message after ebMS processing is completed:
    1. Reads payload from storage or from memory (if the payload is inline) and adds MIME headers to the message.
    2. Reads the BDO attachments and adds them as individual MIME parts to the MIME message.
    3. Adds MIME-related HTTP headers (MIME-Version, start, MIME_boundary, and Content-Type) to the HTTP message that is delivered.