X

An Oracle blog about HCM Cloud

Invoking WebCenter Content Document Transfer Utility using Windows Commands

Srirama Sista
HCM Cloud Technical Solution Manager

The WebCenter Content Document Transfer Utility is a set of command line interface tools written in Java providing content import and export capabilities.

  • The UploadTool is used to create a new content item in Oracle WebCenter Content based on contents streamed from a local file.
  • The SearchTool is used to locate content items within Oracle WebCenter Content matching specific query criteria.
  • The DownloadTool is used to retrieve a content item from Oracle WebCenter Content and save its contents to a local file

Forms of Document Transfer

Form 1: Soap Based transfer Utility (Recommended)

The preferred generic soap-based transfer utility (oracle.ucm.fa_genericclient_11.1.1.jar) which requires the Oracle JRF Web Service supporting libraries and uses JAX/WS over HTTPS to communicate with the Oracle WebCenter Content Server

The generic soap-based transfer utility accesses the Content Server through its GenericSoapPort web service (/idcws/GenericSoapPort) and requires the client to specify a suitable UsernameToken-based Oracle WSM Security Client Policy that matches the Server's configured service policy.

Form 2: RIDC Based transfer Utility (Not Recommended)

 The original RIDC-based transfer utility (oracle.ucm.fa_client_11.1.1.jar) which is a feature-set Java library that encapsulates Oracle WebCenter Content RIDC and uses standard HTTPS to communicate with the Oracle WebCenter Content server.

RIDC tool is impending deprecation in FA environments due to authentication obstacles, which currently cannot be handled universally and programmatically. Customers whom have deviated from standard Oracle Access Manager (OAM) web single sign-on for access to their Fusion Applications should utilize the generic soap-based transfer utility (or the underlying GenericSoapPort web service directly) to access the Content Server.

The RIDC-based transfer utility has support for "Basic" authentication and restricted support for OAM 11g form-based authentication.

Note: This document talks only about Soap Based Transfer Utility

Details steps for installing WebCenter Content Document Transfer Utility is documented here.

 

Services available in SOAP based Utility                                                                                   

Java Library File Name Service Type IDC  Service Name Class File Location
oracle.ucm.fa_genericclient_11.1.1.jar Upload CHECKIN_UNIVERSAL oracle.ucm.fa_genericclient_11.1.1.jar.oracle
.ucm.idcws.client.UploadTool
oracle.ucm.fa_genericclient_11.1.1.jar Search GET_SEARCH_RESULTS oracle.ucm.fa_genericclient_11.1.1.jar.oracle
.ucm.idcws.client.SearchTool
oracle.ucm.fa_genericclient_11.1.1.jar Download GET_FILE oracle.ucm.fa_genericclient_11.1.1.jar.oracle
.ucm.idcws.client.DownloadTool

 

Program Options Library

We can invoke the document transfer services (like upload/download/search) using Windows/Unix commands. Standard program options used in these commands are described below

                 Option

                                                                          Description

--url 

Content Server Protocol-Specific Connection URL /idcws/. 

For Example, if the HCM Cloud URL is https://zzzz-test.fs.us.oraclecloud.com/homePage/faces/AtkHomePageWelcome

then this URL value is 

https://zzzz-test.fs.us.oraclecloud.com/idcws/

--username

Oracle HCM Cloud User Name

--password

Oracle HCM Cloud Password

--policy

JAX/WS Client Policy - e.g. oracle/wss_username_token_over_ssl_client_policy

-Doracle.security

.jps.config

This is the path where jps-config.xml is saved. In our case the this file is present in 

‘D:\UCM\config’. We can set some properties like Minimum File Size, Maximum File Size,

other Audit properties in this jps-config.xml file. These values are pre-set. You can choose to edit these values or leave them as is.

--primaryFile

 Location of the file that needs to be uploaded

--dDocTitle

Title of the document

--dSecurityGroup

Destination Security Group; For FA import/export use-cases this is set by default to ‘FAFusionImportExport’

--dDocAccount

Destination Security Account.

Ex: ‘hcm/dataloader/import’ 

--proxyHost

Proxy Host Name

--proxyPort

Proxy Port Value

--allDocs

Search all documents including old revisions [true/false(default)]; By default we search only the latest released

--dID

Unique id (number) assigned to each contect in UCM

--dDocName

 Content item identifier (string). This is the Content ID attribute in UCM UI.

--dOriginalName

Document original name /filename (string)

--dDocAuthor

Document author

--dExtension

Document extension (string)

--SortField

Sort search query results based on the specified metadata field

--SortOrder

The sort order: ASC (ascending) / DESC (descending); defaults to ASC while searching.

--StartRow  

The row to begin the search results display (after having applied any sort); defaults to 1

--ResultCount

Maximum number of search results to return to client; defaults to 20

--defaultFields

Output core metadata fields (dID, dDocName, dDocTitle, dDocLastModifiedDate, dDocLastModifier) [true(default)/false] while searching

--moreFields

Output a more detailed set of metadata fields (fields above plus dOriginalName, VaultFileSize etc) [true/false(default)] while searching

--fields 

User-specified fields to render while searching e.g. --fields=dID,dOriginalName

--RevisionSelection

Method

Which revision to download; Valid values: Latest / LatestReleased.  Defaults to Latest

--outputFile

Output/Destination local file to write; if not provided dOriginalName of file provided at checkin time is utilized.

--outputDir

Can be leveraged in place of --outputFile to stream contents to a local file in specified output directory using dOriginalName provided at checkin time as the file name. Where dOriginalName is the name of the file while uploading into UCM

 

Sample Commands

Upload a File into UCM

Sample 1 : Command for File Upload to UCM (without Proxy):

java  -Doracle.security.jps.config="D:\UCM\config\jps-config.xml" oracle.ucm.idcws.client.UploadTool --url=https://zzzz-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --primaryFile="C:\worker.zip" --dDocTitle="SampleFile1" --dSecurityGroup=FAFusionImportExport --dDocAccount=hcm/dataloader/import

 

Sample 2:  Command for File Upload to UCM (with Proxy enabled):

java -Doracle.security.jps.config=" D:\UCM\config\jps-config.xml" oracle.ucm.idcws.client.UploadTool --url=https://zzzz-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --primaryFile="C: \worker.zip" --dDocTitle="SampleFile2" --dSecurityGroup=FAFusionImportExport --dDocAccount=hcm/dataloader/import --verbose --proxyHost=www-proxy.us.zzzzz.com --proxyPort=80

 

Search a File in UCM

Sample 1:  Command to fetch specific number of files in the order of their upload datetime starting with the latest file:

java oracle.ucm.idcws.client.SearchTool --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --allDocs=true --ResultCount=40

 

Sample 2:  Command to fetch specific file based on Document ID

java oracle.ucm.idcws.client.SearchTool --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --dID=6327

 

Sample 3:  Command to fetch specific file based on Content ID

java oracle.ucm.idcws.client.SearchTool --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --dDocName=UCMFA00005759

If you know only partial value of the Content ID attribute, then you can replace --dDocName=UCMFA00005759 with --dDocName%=UCM in the above command

 

Sample 4:  Command to fetch specific file based on the Title:

java oracle.ucm.idcws.client.SearchTool --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --dDocTitle%=work

 

Sample 5:  Command to fetch specific file based on Document Author, sorting the result by Document ID in Descending order

java oracle.ucm.idcws.client.SearchTool --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --dOriginalName=worker%  --dDocAuthor=HCM% --SortField=dID --SortOrder=DESC

 

Download a File from UCM

Sample 1:  Command to download a file using Document ID from a local directory

java " -Doracle.security.jps.config="D:\UCM\config\jps-config.xml" oracle.ucm.idcws.client.DownloadTool  --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --outputFile=C:\worker.zip  --dID=6328

 

Sample 2:  Command to download a file using Content ID from a local directory

java " -Doracle.security.jps.config="D:\UCM\config\jps-config.xml" oracle.ucm.idcws.client.DownloadTool  --url=https://xxxx-test.fs.us.oraclecloud.com/idcws/ --username=HCM.USER --password=Welcome1 --policy=oracle/wss_username_token_over_ssl_client_policy --outputFile=C:\worker.zip  --dDocName=UCMFA00005220 --RevisionSelectionMethod=Latest

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.