B2B Integration : Trading Networks Built-In Services Reference : Mime Folder : Summary of Elements in this Folder : wm.tn.mime:getBodyPartContent
wm.tn.mime:getBodyPartContent
Retrieves the content (payload) from the specified MIME object.
Use this service for both single-part and multi-part messages. To retrieve content from a multi-part message, specify the part for which you want to retrieve content using the index or contentID variables.
Input Parameters
mimeData
Object The MIME object for which you want to retrieve the content.
index
Integer (optional) The index number of the body part with the content you want to retrieve. The first body part is index number zero.
*To retrieve the content from a single-part message, set index to 0, and do not specify contentID.
*To retrieve the content for a specific 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 for which you want to retrieve content.
*To retrieve the content from a single-part message, do not use contentID; use index.
*To retrieve the content for a specific part in a multi-part message, use either contentID or index. If you specify both, the service uses contentID.
Output Parameters
content
InputStream An InputStream containing the content of the retrieved body part. The service removes all Content-Transfer-Encodings. Reading this stream consumes the MIME object, and you cannot use the wm.tn.mime:writeToStream service to re-create this object.
bodyPart
Object (optional) A MIME object containing the retrieved body part. If the MIME message is a single-part message, this object is the same as passed in mimeData.
encrypted
String (optional) Indicates whether bodyPart is an encrypted message. Valid values are:
*true - The MIME object in bodyPart is encrypted.
*false - The MIME object in bodyPart is not encrypted.
signed
String (optional) Indicates whether bodyPart is a signed message. Valid values are:
*true - The MIME object in bodyPart is signed.
*false - The MIME object in bodyPart is not signed.
certsOnly
String (optional) Indicates whether bodyPart contains digital certificates. Valid values are:
*true - The MIME object in bodyPart contains only digital certificates.
*false - The MIME object in bodyPart contains a regular payload.
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.
Copyright © 2016- 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback