So recently I’ve had to download files from HP TRIM using the web service. Replace the record number with the record number you’re searching for. The endpoint should be:
http://serverwithtrimwebserviceinstalled/dataset/trim.asmx, where dataset is the name of your dataset.
There’s not much information available on how to do this, so here’s my message straight from SoapUI:
<soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope” xmlns:trim=”http://www.towersoft.com/schema/webservice/trim2/”>
<soap:Header/>
<soap:Body>
<trim:Execute>
<!–Optional:–>
<trim:req>
<trim:ShortcutRecordNumber>
<!–Optional:–>
<trim:TargetObjectType>?</trim:TargetObjectType>
<trim:TargetForUpdate>false</trim:TargetForUpdate>
<!–Optional:–>
<trim:Id>?</trim:Id>
<trim:IsForUpdate>false</trim:IsForUpdate>
<trim:Limit>1</trim:Limit>
<!–Optional:–>
<trim:RecordNumber>D-41923</trim:RecordNumber>
</trim:ShortcutRecordNumber>
<trim:Download>
<!–Optional:–>
<trim:TargetObjectType>record</trim:TargetObjectType>
<trim:TargetForUpdate>false</trim:TargetForUpdate>
<!–Optional:–>
<trim:Id/>
<trim:Checkout>false</trim:Checkout>
<!–Optional:–>
<trim:Comments>?</trim:Comments>
<!–Optional:–>
<trim:CheckoutPath>?</trim:CheckoutPath>
<trim:MaximumTransferBytes>0</trim:MaximumTransferBytes>
<trim:TransferInset>0</trim:TransferInset>
<!–Optional:–>
<trim:ChildUri>?</trim:ChildUri>
<trim:TransferType>inline</trim:TransferType>
<!–Optional:–>
<trim:DownloadId/>
</trim:Download>
<trim:HideVersionNumbers>1</trim:HideVersionNumbers>
<trim:ProvideTimingResults>1</trim:ProvideTimingResults>
<trim:ForceRealTimeCacheUpdate>1</trim:ForceRealTimeCacheUpdate>
</trim:req>
</trim:Execute>
</soap:Body>
</soap:Envelope>
Which will return:
<soap:Envelope xmlns:soap=”http://www.w3.org/2003/05/soap-envelope” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:wsa=”http://schemas.xmlsoap.org/ws/2004/08/addressing” xmlns:wsse=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd” xmlns:wsu=”http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”>
<env:Header xmlns:env=”http://www.w3.org/2003/05/soap-envelope”>
<wsa:Action>http://www.towersoft.com/schema/webservice/trim2/ExecuteResponse</wsa:Action>
<wsa:MessageID>urn:uuid:9d33d037-a2eb-4ce8-8feb-6b92146724a6</wsa:MessageID>
<wsa:RelatesTo>urn:uuid:bb12ff33-35cd-4bef-9a2f-11eebc7b93bd</wsa:RelatesTo>
<wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id=”Timestamp-c6e82623-d2ee-443f-8615-a8ba211ab2ac”>
<wsu:Created>2011-12-19T20:48:24Z</wsu:Created>
<wsu:Expires>2011-12-19T20:53:24Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</env:Header>
<soap:Body>
<ExecuteResponse xmlns=”http://www.towersoft.com/schema/webservice/trim2/”>
<ExecuteResult>
<TimingResult>
<Id>?</Id>
<TimeConsumed>18750120</TimeConsumed>
</TimingResult>
<SearchResult>
<Id>?</Id>
<FoundCount>1</FoundCount>
</SearchResult>
<TimingResult>
<Id/>
<TimeConsumed>625004</TimeConsumed>
</TimingResult>
<DownloadResult>
<Id/>
<Base64Payload>(document inline)</Base64Payload>
<DateTimeModified>11/11/2011 14:16:27</DateTimeModified>
<DocumentSize>28901</DocumentSize>
<FileType>DOCX</FileType>
<IsTrimMail>false</IsTrimMail>
<TransferType>inline</TransferType>
<AttachmentId>record-5332</AttachmentId>
<FinalChunk>false</FinalChunk>
</DownloadResult>
<EndResponse/>
</ExecuteResult>
</ExecuteResponse>
</soap:Body>
</soap:Envelope>











