Search code examples
oracle-ucm

How to import a document in UCM using ridc


I am trying to import a archived document that was checked-in earlier, but I want to import it using RIDC program, following is the code I am working on:

IdcClientManager manager = new IdcClientManager();

    IdcClient idcClient= manager.createClient("http://localhost/idc/idcplg");

    IdcContext idcContext = new IdcContext("sysadmin", "idc");

    // get the binder
    DataBinder binder = idcClient.createBinder();

    //populate the binder with the parameters
    binder.putLocal("IdcService", "IMPORT_DOCUMENT");
    binder.putLocal("Idc_Name", "idc");
    binder.putLocal("aArchiveName", "idc//test1");
    binder.putLocal("dDocName", "000022");
    binder.putLocal("dCollectionName", "test_checkin");

    ServiceResponse response = idcClient.sendRequest(idcContext, binder);

    DataBinder binderResult = response.getResponseAsBinder();

But I am getting the following error:

Unable to execute service IMPORT_DOCUMENT and function executeArchiveMethod.
(System Error: The collection name must be specified.)

I specified dCollectionID, dCollectionName,dCollectionLocation, but faced same result.

Can anyone guide me about this error, or where I am getting wrong in implementing this code.

For better understanding I would like to tell that the specified document was earlier checked in using WebDAV.

Any kind of help will be grateful.


Solution

  • Parameters are case-sensitive. You need to use IDC_Name.