Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Mime Folder | Summary of Elements in this Folder | wm.tn.mime:getBodyPartHeader
 
wm.tn.mime:getBodyPartHeader
Retrieves the headers from the specified body part of the specified MIME object.
Input Parameters
mimeData
Object The MIME object for which you want to retrieve the message headers.
index
Integer (optional) The index number of the body part that has the headers you want to retrieve. The first body part is index number zero.
*To retrieve the headers from a single-part message, set index to 0, and do not specify contentID.
*To retrieve the headers for a specific body part in a multi-part message, use either index or contentID. If you specify both, the service uses contentID.
contentID
String (optional) The value of the Content-ID header field of the body part from which you want to retrieve headers.
*To retrieve the headers from a single-part message, do not use contentID; use index.
*To retrieve the headers for a specific part in a multi-part message, use either contentID or index. If you specify both, the service uses contentID.
Output Parameters
mimeHeader
Document The retrieved header fields. Key names represent the names of the header fields. The values of the keys represent the values of the header fields.
For example, if the original message contained the following header fields:
Content-Type: text/xml
X-Doctype: RFQ
X-Severity: 0
This service returns the following IS document (IData object):
*For key Content-Type, the value returned is text/html.
*For key X-Doctype, the value returned is RFQ.
*For key X-Severity, the value returned is 0.
Usage Notes
This service is not compatible with those in the pub.mime folder. The MIME objects that the pub.mime:createMimeData service creates will not work with this service.