In this Post , Will show you how to download files from UCM using SOAP WS.
WSDL: https:/POD/idcws/GenericSoapPort
Request Payload To get the Documentid ...
it will take dDocName as Input Parameter which can be found from UCM UI.
<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_SEARCH_RESULTS">
<ucm:Document>
<ucm:Field name="QueryText">dDocName <substring> `UCMFA03374703`</ucm:Field>
<ucm:Field name="resultCount">25</ucm:Field>
<ucm:Field name="sortField">dDocName</ucm:Field>
<ucm:Field name="sortOrder">ASC</ucm:Field>
<ucm:Field name="startRow">1</ucm:Field>
</ucm:Document>
</ucm:Service>
</ucm:GenericRequest>
</soapenv:Body>
</soapenv:Envelope>
dDocName can be found from the below .
Content ID = dDocName
![](https://static.wixstatic.com/media/672833_c34f6fe0d28641148af2e7f25eff1ff9~mv2.png/v1/fill/w_980,h_541,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/672833_c34f6fe0d28641148af2e7f25eff1ff9~mv2.png)
Response Payload :
Capture the below did from above response .
![](https://static.wixstatic.com/media/672833_e4d468e016c0441396a10372046a2176~mv2.png/v1/fill/w_797,h_86,al_c,q_85,enc_auto/672833_e4d468e016c0441396a10372046a2176~mv2.png)
Using the same WSDL , Prepare the below Payload to download the actual file.
Request Payload :
<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">
<!--Optional:-->
<!--Optional:-->
<ucm:Document>
<!--Zero or more repetitions:-->
<ucm:Field name="dID">3403205</ucm:Field>
<!--Zero or more repetitions:-->
<!--Zero or more repetitions:-->
<!--Zero or more repetitions:-->
</ucm:Document>
</ucm:Service>
</ucm:GenericRequest>
</soapenv:Body>
</soapenv:Envelope>
Response Payload :
The Contents Tag will hold the Encoded file Contents .
![](https://static.wixstatic.com/media/672833_870517ca1a304cbe8e6feb78c6e9401a~mv2.png/v1/fill/w_980,h_95,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/672833_870517ca1a304cbe8e6feb78c6e9401a~mv2.png)
Encoded Data :
UEsDBBQAAAAIAEh4fFQU+sL03AAAAAAGAAATAAAAUG96U3VwcGxpZXJzSW50LmNzdtWSXQuCMBSG74P+w37AucjvupxzpSQ6/AjpRsSChHIy6v/n0AiSKPIm33EuNrax59khEcUJhSzbhC4OUJwy5ns0UgAUVdMNE4Bw0XBRXCteQ3xrmnN1FAAxo4GT4zRxw8jbUwdkUF+A0rg/by1X7VI3PubLbT/FLq7lKcfKY94+fz4jT/ptOoC3RsA/6KcBn9Dh1y/f0KNv8NX2CllTwGceIaEfDgSsRgnQdFXWFATs6IYm+JXfXIzjl/jmBPofX46iKosa2YVAa36rDx1vJ0EZI0FTDU120h9LuANQSwECFAAUAAAACABIeHxUFPrC9NwAAAAABgAAEwAAAAAAAAABACAAAAAAAAAAUG96U3VwcGxpZXJzSW50LmNzdlBLBQYAAAAAAQABAEEAAAANAQAAAAA=
Go to Online Decode to file tools and download the file .
![](https://static.wixstatic.com/media/672833_f835f1c6aeb64aaa8ac6624a31b6ca7b~mv2.png/v1/fill/w_980,h_427,al_c,q_90,usm_0.66_1.00_0.01,enc_auto/672833_f835f1c6aeb64aaa8ac6624a31b6ca7b~mv2.png)
Click On Application.zip file to see the file contents .
Hope this Helps . Happy Learning .
Comments