B2B Integration 10.2 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Doc Folder | Summary of Elements in this Folder | wm.tn.doc:getContentPartData
 
wm.tn.doc:getContentPartData
Retrieves the content of a content part. You can use this service to get content of small, as well as large content parts. It allows you to get the content as an InputStream or as byte[]. If you request the content to be returned in byte[] format, you must specify the start index and the number of bytes you need.
Input Parameters
bizdoc
Object The document from which you want to get content. The document must be an instance of com.wm.app.tn.doc.BizDocEnvelope.
partName
String The name of the content part from which you want get content.
getAs
String Specifies the format in which the content should be returned. Set the following values:
*bytes - Returns content as a byte[] object. If you specify bytes, you must specify startIndex and byteCount.
*stream - Returns an InputStream from the content of this part.
startIndex
String (optional) If getAs is set to bytes, this specifies the starting index of the content from which to read. This input is optional when getAs is set to stream.
byteCount
String (optional) If getAs is set to bytes, this specifies the number of bytes to read from startIndex. This input is optional when getAs is set to stream.
Output Parameters
partContent
Object The content of the part specified by partName. If getAs is set to bytes, partContent is an instance of byte[]. If getAs is set to stream, partContent is an instance of InputStream.

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.