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 AS4 Microservice.
If a message in MIME format contains multiple related parts, the Content-Type
parameter
is set to Multipart/Related
. AS4 Microservice 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.
- 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
- Checks the message for MIME headers. If the required MIME headers
(
MIME-Version
,Content-Type
,Content-Transfer-Encoding
, andContent-ID
) are defined in the message, then the AS4 receiver proceeds with MIME parsing of the message. - Checks the
start
parameter and picks the SOAP envelope from thestart
parameter to determine which part in the multipart message contains the payload. - 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.
- Sends references of the individual parts to the business application
as part of the BDO with appropriate MIME metadata (
Content-Type
andContent-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
- Receives the BDO along with the payload and attachments from the business application and initiates ebMS processing.
- Completes the following tasks to MIME pack the message after ebMS
processing is completed:
- Reads payload from storage or from memory (if the payload is inline) and adds MIME headers to the message.
- Reads the BDO attachments and adds them as individual MIME parts to the MIME message.
- Adds MIME-related HTTP headers (
MIME-Version
,start
,MIME_boundary
, andContent-Type
) to the HTTP message that is delivered.