I developed a custom DFS service which gets the content, with format PDF, from repository using the r_object_id. If this content is null, it gets the document with RenditionOption.PRIMARY.
I'me facing a problem with one document. This document has a renditon (PDF) but it always shows the error below.
com.emc.documentum.fs.rt.ServiceInvocationRuntimeException: Could not get content as file: "Content{format='pdf', pageNumber=0, renditionType=CLIENT}".
at com.emc.documentum.fs.datamodel.core.content.Content.getAsFile(Content.java:265)
...
Caused by: java.lang.IllegalStateException: No such Part: Part=d29effd7-3677-4198-b4ac-3fc16130cc9d@example.jaxws.sun.com
at org.jvnet.mimepull.DataHead.readOnce(DataHead.java:150)
at org.jvnet.mimepull.DataHead.moveTo(DataHead.java:62)
at org.jvnet.mimepull.MIMEPart.moveTo(MIMEPart.java:112)
at com.sun.xml.ws.developer.StreamingDataHandler$StreamingDataSource.moveTo(StreamingDataHandler.java:105)
at com.sun.xml.ws.developer.StreamingDataHandler.moveTo(StreamingDataHandler.java:78)
at com.emc.documentum.fs.rt.impl.ContentFactory.toFileContentAndCleanup(ContentFactory.java:208)
at com.emc.documentum.fs.datamodel.core.content.Content.getAsFile(Content.java:258)
I tried, by DA, to retrieve this rendition and we got it without problems.
Here is a piece of the code:
options.getContentTransferProfile().setTransferMode(ContentTransferMode.MTOM);
options.getContentTransferProfile().setCachedContentTransferAllowed(false);
DataPackage dataPack = objectService.get(new ObjectIdentitySet(docIdent), options);
DataObject dataObject = dataPack.getDataObjects().get(0);
List<Content> contents = dataObject.getContents();
if (contents.size() > 0) {
DataHandlerContent content = (DataHandlerContent)contents.get(0);
if(content.canGetAsFile()){
contentType.append(content.getFormat());
return content.getAsFile();
}
}