B2B Integration 10.4 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Mime Folder | Summary of Elements in this Folder | wm.tn.mime:writeToStream
 
wm.tn.mime:writeToStream
Writes the specified MIME object to a stream, and optionally allows you to create a message digest.
Input Parameters
mimeData
Object The MIME object that you want written to a stream.
outputStream
OutputStream Stream to which you want the contents of the MIME object written.
createDigest
String (optional) Whether the service computes the message digest for the MIME message in mimeData. Valid values are:
*yes - Compute a message digest.
*no - Default. Do not compute a message digest.
digestAlgorithm
String (optional) The algorithm to use to compute the digest if createDigest is yes. You can specify one of the following values for digestAlgorithm: SHA-1 or MD5.SHA-1 is the default.
digestHeader
String (optional) Whether to include the MIME headers when computing the message digest if createDigest is yes. Valid values are:
*yes - Default. Include the headers when computing the message digest.
*no - Omit the headers when computing the message digest.
digestAllHeaders
String (optional) Whether to include all headers when computing the message digest or only those specified by the headersToDigest input parameter. This parameter is used when you specify yes for the digestHeader input parameter. Valid values are:
*yes - Include all headers when computing the message digest. When you specify yes, this service ignores the headersToDigest input parameter.
This service includes all headers for this MIME message when computing the message digest. The digest is computed based on the headers in the message at the time this service was invoked. If additional headers are added after you invoke this service, those headers will not be included in the final message digest.
*no - Default. Include only those headers specified by the headersToDigest input parameter when computing the message digest.
headersToDigest
String [ ] (optional) The headers to include in the message digest if digestHeader is yes. The default is { "Content-Type”, “Content-Transfer-Encoding”, “Content-Disposition” }.
The value that you specify for headersToDigest is not case sensitive. However, the order you specify the headers must match the order they appear in the message.
If no headers are specified (headersToDigest is empty), no headers are digested.
Output Parameters
bytesWritten
String Number of bytes written to outputStream.
messageDigest
String (optional) If digestHeader is yes, messageDigest contains the Base64 encoded digest for the message written to outputStream.
Usage Notes
*Use this service to obtain a message digest from a MIME message that you are parsing. If you are creating a message, use the services wm.tn.mime:setDigestAlgorithm and wm.tn.mime:getDigest to compute digests.
*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- 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.
Innovation Release