B2B Integration : Trading Networks Built-In Services Reference : Doc Folder : Summary of Elements in this Folder : wm.tn.doc:replaceContentPart
wm.tn.doc:replaceContentPart
Replaces an existing content part of a document with the supplied content part. A content part can be, for example, a segment of a document or an attachment.
Input Parameters
bizdoc
Object The document in which you want to replace a content part. The document must be an instance of com.wm.app.tn.doc.BizDocEnvelope.
partName
String (optional) The name of the content part (for example, “OrderAttachment”) that must be replaced.
partBytes
Object The content of the part you are replacing in the document. The data type of partBytes must be byte[].
partStream
Object The content of the part you are replacing in the document. The data type of partStream must be java.io.InputStream.
mimeType
String The MIME type of the content part you are replacing (for example, “text/plain” or “application/pdf”.)
partIndex
String (optional) The position of the content part in the document's existing array of parts.
Output Parameters
updateCount
String The number of documents that the service updated. Valid values are:
*1 The service replaced the content part of the document successfully.
*0 The service did not replace any content part of the document.
Usage Notes
This service replaces the content part of the saved document and also updates the database.
If you supply only the partName, the partIndex is retrieved from the database. Also, if you supply only the partIndex, the partName is retrieved from the database.
You must supply either partBytes or partStream to the replaceContentPart service, but not both. If partStream is supplied, Trading Networks will determine whether the new content part is large, and will handle it appropriately. If partBytes is supplied, Trading Networks always considers the new content part to be small, regardless of its actual size. For information about large doc handling, see webMethods Trading Networks Administrator’s Guide.
Copyright © 2016- 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback