Using MultiPart MIME

A BizTalk message can be constructed using the multipart MIME format defined in Request for Comment (RFC) 2387 (http://www.ietf.org/rfc/rfc2387.txt). To use the MIME format with an HTTP document, you need to take some special considerations. An example of a BizTalk Message in MIME format would look as shown in the code that follows.

  MIME-Version: 1.0
  Content-Type: Multipart/Related;
  Content-Description: This is the optional message description.
  -- biztalk_document_boundary
  Content-Type: text/xml; charset=UTF-8
  Content-ID: <po.xml@Northwindtraders.com>
  <?xml version='1.0' ?>
     xmlns:xsi= "http://www.w3.org/1999/XMLSchema/instance"
     <SOAP-ENV:Header xsi:type="NorthwindHeader">
     <!--BizTags begin here -->
     <dlv:delivery SOAP-ENV:mustUnderstand="1"
      <!-- Delivery and properties header entries omitted for
         brevity -->
   <fst:manifest xmlns:fst=
      <fst:reference fst:uri="#Purchase_Order">
         <fst:description>Ppurchase order for Northwind
      <fst:reference fst:uri="CID:po.jpg@Northwindtraders.com">
         <fst:description>Scanned image of the contract
     <!--BizTags end here -->
     <SOAP-ENV:Body xsi:type="NorthwindBody">
        <m:UpdatePO xmlns:m=
        <!-SOAP document containing PO enclosed ends here -->
  -- biztalk_document_boundary
  Content-Type: image/jpeg
  Content-ID: <CID:po.jpg@Northwindtraders.com >
     ...JPEG image...

The Content-Type tag identifies this document as a Multipart MIME document. The boundary parameter defines the boundaries between different documents in the MIME document. The start parameter is required for a BizTalk message and refers to the document that will be processed first. For a BizTalk message, the start parameter will always refer to the SOAP document. The value for the start parameter should always be equal to the Content-ID tag's value for the SOAP element. The Content-ID tags are used to identify the different sections of the document and are therefore required for every section. The manifest element's child element reference uses a URI to identify the non-SOAP elements of the document. The Content-ID for these non-SOAP elements must be equal to these URIs. The SOAP document must be included in the root of the MultiPart MIME document. MIME documents can have a charset parameter, but this parameter should not be used for BizTalk messages.

by BrainBellupdated