AnsweredAssumed Answered

CMLCopy - how to copy the documents binary data

Question asked by robobot on Feb 13, 2009
when performing a CMLCopy Operation, it seems that the file data is not copied. When using it as described in "" the content is copied to the desired destination but file is empty.
how can i copy the binary data of a file ?


        CMLCopy copy = new CMLCopy();
        copy.setTo(new ParentReference(folderReference.getStore(), folderReference.getUuid(), null, Constants.ASSOC_CONTAINS, "{" + Constants.NAMESPACE_CONTENT_MODEL + "}name.txt"));
        copy.setWhere(new Predicate(new Reference[]{reference}, null, null));
        CML cmlCopy = new CML();
        cmlCopy.setCopy(new CMLCopy[]{copy});       
        UpdateResult[] results2 = WebServiceFactory.getRepositoryService().update(cmlCopy);

Thank you.