This comes from Document 2632698.1
Applies to:
Oracle Fusion Product Hub Cloud Service – Version 11.13.19.10.0 and later
Information in this document applies to any platform.
Goal
Users are trying to create a REST call to retrieve the attachments from an item. In SOAP and REST calls to Item Service V2 , the attachment was returned in an Attribute Called FileContents. Users are using it to download the attachment but its not working.
Solution
1. DocumentURL is to be used when file is being downloaded from a browser, however if users are looking for downloading Item attachments programmatically, GET_FILE SOAP Operation is better suited and it can be invoked with attributes extracted from DocumentURL .
Here is a sample Document URL :
https:// :/fscmUI/content/conn/FusionAppsContentRepository/uuid/dDocID:185774?XFND_SCHEME_ID=1&XFND_CERT_FP=43234DFCA02EE72391FA46FA15431B9A9405E9F2&XFND_RANDOM=-7965842644600108443&XFND_EXPIRES=1578479540283&XFND_SIGNATURE=LKclM1StAsirW0w6IoKaRCtH7Mf1Hrme3E8BAsyqyE1Q1HP9ZOPYbB8KinkAcMlpH1dAp1aXWGzbLQGhRZKGaYHaybWAemBZgcMGDUoW0PPiwjS0xtecO1BwgAGEViA3qgvYNFud03kQf05jakud0aWao9jEyAWryUtpSiK-IkyroZXqCnYdAGqDhYB6kysfcbYt9pA3cjB6UI66fZJEkDX7e5XbXixXy1YxzMpYiDAkleG3CG5bmaQoubtvF5iTHN2fTHXNfQ7F~-R0U3-HDIebcNUZmi0jKjTmGvjRxJgPXTHU1LzgHqUmocLJqfx7KK2CkY1O1IRIvMC2QQ__&Id=185774&download
From the above Document URL extract below attributes :
?XFND_SCHEME_ID=1
&XFND_CERT_FP=43234DFCA02EE72391FA46FA15431B9A9405E9F2
&XFND_RANDOM=-7965842644600108443
&XFND_EXPIRES=1578479540283
&XFND_SIGNATURE=LKclM1StAsirW0w6IoKaRCtH7Mf1Hrme3E8BAsyqyE1Q1HP9ZOPYbB8KinkAcMlpH1dAp1aXWGzbLQGhRZKGaYHaybWAemBZgcMGDUoW0PPiwjS0xtecO1BwgAGEViA3qgvYNFud03kQf05jakud0aWao9jEyAWryUtpSiK-IkyroZXqCnYdAGqDhYB6kysfcbYt9pA3cjB6UI66fZJEkDX7e5XbXixXy1YxzMpYiDAkleG3CG5bmaQoubtvF5iTHN2fTHXNfQ7F~-R0U3-HDIebcNUZmi0jKjTmGvjRxJgPXTHU1LzgHqUmocLJqfx7KK2CkY1O1IRIvMC2QQ__
&Id=185774
&download
Using above attributes now invoke GET_FILE operation as mentioned below:
EndPoint: https://server:port/idcws/GenericSoapPort?wsdl
GET_FILE SOAP Operation:
<soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:ucm=”http://www.oracle.com/UCM”>
soapenv:Header/
soapenv:Body
<ucm:GenericRequest webKey=”cs”>
<ucm:Service IdcService=”GET_FILE”>
ucm:User</ucm:User>
ucm:Document
<ucm:Field name=”dID”>185774</ucm:Field>
<ucm:Field name=”XFND_SCHEME_ID”>1</ucm:Field>
<ucm:Field name=”XFND_CERT_FP”>43234DFCA02EE72391FA46FA15431B9A9405E9F2</ucm:Field>
<ucm:Field name=”XFND_RANDOM”>-7965842644600108443</ucm:Field>
<ucm:Field name=”XFND_EXPIRES”>1578479540283</ucm:Field>
<ucm:Field name=”XFND_SIGNATURE”>LKclM1StAsirW0w6IoKaRCtH7Mf1Hrme3E8BAsyqyE1Q1HP9ZOPYbB8KinkAcMlpH1dAp1aXWGzbLQGhRZKGaYHaybWAemBZgcMGDUoW0PPiwjS0xtecO1BwgAGEViA3qgvYNFud03kQf05jakud0aWao9jEyAWryUtpSiK-IkyroZXqCnYdAGqDhYB6kysfcbYt9pA3cjB6UI66fZJEkDX7e5XbXixXy1YxzMpYiDAkleG3CG5bmaQoubtvF5iTHN2fTHXNfQ7F~-R0U3-HDIebcNUZmi0jKjTmGvjRxJgPXTHU1LzgHqUmocLJqfx7KK2CkY1O1IRIvMC2QQ__</ucm:Field>
</ucm:Document>
</ucm:Service>
</ucm:GenericRequest>
</soapenv:Body>
</soapenv:Envelope>