Hi,
Does anyone knows for sure whether the DFC CopyOperation should work across different docbases or not?
I have tried to search for this topic, but the answers were not clear and even contradictory.
I would like to copy documents from one repository to another by using DFC. I tried to use DfCopyOperation, but got the following error.
Cannot make copy of the document 'Migration Test 01'. - 1015
[DM_API_E_EXIST]error: "Store specified by filestore_02 does not exist." - DM_API_E_EXIST - 256
Below is the code snippet I used.
IDfSysObject srcDoc = (IDfSysObject)sessionSource.getObject(new DfId(SOURCE_DOCUMENT_ID));
IDfFolder targetFolder = sessionTarget.getFolderByPath(TARGET_FOLDER_PATH);
IDfId targetFolderId = targetFolder.getObjectId();
IDfCopyOperation copyOperation = (new DfClientX()).getCopyOperation();
copyOperation.setSession(sessionTarget);
copyOperation.setDestinationFolderId(targetFolderId);
copyOperation.add(srcDoc);
boolean copyResult = copyOperation.execute();
System.out.println("Copy result: " + copyResult);
The user credentials are the same in both the source and target repositories. Both repositories are accessible for the code.
Thank you in advance!
Akos