Trading Networks 10.7 | Administering and Monitoring B2B Transactions | Trading Networks Built-In Services Reference | Doc Folder | Summary of Elements in this Folder | wm.tn.doc:view
 
wm.tn.doc:view
Retrieves a single document (envelope information and attributes) from the database; the service verifies that the client invoking the service is either the sending or receiving partner of the document being viewed or a Trading Networks administrator.
Optionally, the service can retrieve the raw document content and related document information.
Input Parameters
internalId
String The internal document ID of the document to retrieve. This is a unique ID that Trading Networks assigns to the document.
getContent
String (optional) Indicates whether to retrieve the document content and envelope information. Valid values are:
*true - Retrieve the document content.
*false- Default. Do not retrieve the document content.
contentPartCriteria
Document (optional) The retrieval criteria for the content parts associated with this document. This is an instance of wm.tn.rec:BizDocEnvelope. If not specified, this service retrieves all content parts of the matching document. Specify a list of part names to include and/or a list of part names to exclude from the retrieved envelope. The document contains the following keys:
*includeParts String List (optional) The list of content part names to retrieve.
*excludeParts String List (optional) The list of content part names that should not be retrieved.
getRelated
String (optional) Whether you want to retrieve information about the related documents (including grouped documents and those in the conversation). Valid values are:
*true - Retrieve the related document information.
*false - Default. Do not retrieve the related document information.
Output Parameters
bizdoc
Document The document this service retrieved from the database. For the structure of bizdoc, see wm.tn.rec:BizDocEnvelope. The service fills in the Content field within bizdoc if you specified true for getContent.
sender
Document The profile summary for the sender of the document. For the structure of sender, see wm.tn.rec:ProfileSummary.
receiver
Document The profile summary for the receiver of the document. For the receiver, see wm.tn.rec:ProfileSummary.
relatedDocCount
String (optional) If you specified true for getRelated, this String contains the number of related documents that are associated with the retrieved document.
relatedDocs
Document List (optional) If you specified true for getRelated, this is information about documents related to the retrieved document. Each IS document (IData object) returned in relatedDocs will contain these keys:
*relationship String The type of relationship.
*from String The internal document ID of the “from” document.
*to String The internal document ID of the “to” document.
groupedDocCount
String (optional) If you specified true for getRelated, the number of documents with the same group ID as the returned document.
groupedDocs
String List (optional) If you specified true for getRelated, a list of documents with the same group ID as the returned document.
Usage Notes
If you are invoking this service from a Java program, in addition to returning bizdoc, sender, and receiver as IS documents (IData objects), the service returns bizdoc as an instance of com.wm.app.tn.doc.BizDocEnvelope and sender and receiver as an instances of com.wm.app.tn.profile.ProfileSummary.