Friday, June 23, 2023

OIC - Download file from UCM using SOAP webservice | GenericSoapPort webservice

Usecase: Here, we will show you how to download files from UCM using GenericSoapPort  SOAP web service. 

  • Get the document id with dDocTitle or file title.
  • Get the file based on the fetched document id.
  • Write the file content to stage.
  • Read the file content.
  • Delete the file from UCM based on fetched documment id.

Soap webservice details:

https://<erp_instance>:443/idcws/GenericSoapPort?wsdl

Request payloads used:

Get the document id with dDocTitle:
<ns0:GenericRequest webKey="CS">
<ns0:Service  IdcService="GET_SEARCH_RESULTS">
<ns0:Document>
<ns0:Field name="QueryText">dDocTitle &lt;starts> `testUCMDownload`</ns0:Field>
</ns0:Document>
</ns0:Service>
</ns0:GenericRequest>

Get file with fetched document id:
<ns0:GenericRequest webKey="CS">
<ns0:Service  IdcService="GET_FILE">
<ns0:Document>
<ns0:Field name="dID">4419562</ns0:Field>
</ns0:Document>
</ns0:Service>
</ns0:GenericRequest>

DELETE the file from UCM:
<ns0:GenericRequest webKey="CS">
<ns0:Service  IdcService="DELETE_DOC">
<ns0:Document>
<ns0:Field name="dID">4419562</ns0:Field>
</ns0:Document>
</ns0:Service>
</ns0:GenericRequest>

Note: instead of dDocTitle , we can also use dDocName which is the UCM content ID.
dDocName &lt;substring> `UCMFA03374721`

Implementation Steps with screenshots:

Create SOAP connection:



Integration flow:


Assign the QueryText:
varString : "testUCMDownload"
varQueryText: concat("dDocTitle <starts> `",$varString,"`")


Call webservice to get doc id based on dDocTitle Query text.






Call webservice to get file based on fetched doc id.






Write the file to stage.






Read the file content.




Call webservice to delete the file from UCM based on fetched doc id:

No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...