B2B Integration 10.5 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Mime Folder | Summary of Elements in this Folder | wm.tn.mime:createMimeData
 
wm.tn.mime:createMimeData
Parses a MIME message, creates a multipart mime message, or creates a single part mime message.
The MIME data object that this service creates is not compatible with the mime services in the pub.mime or pub.smime folders.
Input Parameters
input
InputStream (optional) The java.io.InputStream object that contains the MIME message to parse. Specify input to parse a MIME message.
mimeHeader
Document (optional) The header fields to add to the MIME object. Key names represent the names of the header fields. The values of the keys represent the values of the header fields.
For example, to add the following header fields:
X-Doctype: RFQ
X-Severity: 10
Set the value of the keys of the mimeHeader as follows:
*Value of key X-Doctype as RFQ
*Value of key X-Severity as 10
The wm.tn.mime:writeToStream service automatically inserts the following MIME headers when it generates the MIME message:
Message-ID
MIME-Version
Content-Type
Content-Transfer-Encoding
If you set these values in mimeHeader, the wm.tn.mime:writeToStream service overwrites them at runtime.
If you specify mimeHeader, you must also specify subtype or the service throws an exception.
Note: This service ignores this parameter when you pass input to the service.
subType
String (optional) The subtype component to use for the message's Content-type header. When you specify related, the service sets the message's Content-type header to “multipart/related.” Specify subtype when you want to create a multipart MIME message.
Output Parameters
mimeData
Object A MIME object. If you passed input to this service, mimeData contains the parsed MIME message. If you did not pass input to this service, mimeData is empty.
Note: You cannot use this object with the services in the pub.mime folder.
encrypted
String (optional) Whether input was an encrypted message. This string is present only if you specified a non-null value for input. Valid values are:
*true - Original message in input was encrypted.
*false - Original message in input was not encrypted.
signed
String (optional) Whether input was a signed message. This string is present only if you specified a non-null value for input. Valid values are:
*true - Original message in input was signed.
*false - Original message in input was not signed.
certsOnly
String (optional) Whether input contained only digital certificates. This string is present only if you specified a non-null value for input. Valid values are:
*true - Original message in input contained only digital certificates.
*false - Original message in input contained a regular payload.
Usage Notes
*You can use this service to parse a MIME message, create a multipart mime message, or create a single part mime message.
*To parse an existing MIME message, set the input variables as follows:
For this input variable...
Specify...
input
The InputStream object that you want to parse.
To parse an arbitrarily large MIME message, this InputStream object must implement the javax.mail.internet.SharedInputStream interface. Use the wm.tn.mime:writeToStream service to obtain an instance of a SharedInputStream.
mimeHeader
null
subtype
null
*To create a multipart MIME message, set the input variables as follows:
For this input variable...
Specify...
input
null
mimeHeader
Any additional headers.
subtype
The subtype of the message. When you specify related, the service sets the MIME message's Content-type header to “multipart/related.”
*To create a single part mime message, all input parameters should be null.
*The mimeData object that this service produces is not compatible with mimeData objects produced by the service pub.mime:createMimeData. MIME objects that this service creates will not function with the services in the pub.mime folder.

Copyright © 2016- 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.