Hi there,
I have DFS installed on a contentserver. The docbroker has been configured to talk to other instances of content server running on different machines. I'm trying to download content from an instance of content server via DFS but for some reasons the content is not coming back. Here is my code
ServiceHelper serviceHelper = new ServiceHelper(request);
ServiceFactory serviceFactory = ServiceFactory.getInstance();
IObjectService service = serviceFactory.getService(IObjectService.class, serviceHelper.getServiceContext()); ContentTransferProfile tranferProfile = new ContentTransferProfile();
tranferProfile.setTransferMode(ContentTransferMode.MTOM);
ContentProfile contentProfile = new ContentProfile();
contentProfile.setFormatFilter(FormatFilter.SPECIFIED);
contentProfile.setFormat(contentType);
OperationOptions operationsOptions = new OperationOptions();
operationsOptions.setContentTransferProfile(tranferProfile);
//operationsOptions.setContentProfile(contentProfile);
operationsOptions.setProfile(contentProfile);
// Add our selected document
ObjectIdentitySet objectIds = new ObjectIdentitySet();
ObjectId objId = new ObjectId(docId);
objectIds.addIdentity(new ObjectIdentity<ObjectId>(objId, serviceHelper.getDefaultRepositoryName() ) );
// Get the document conten DataPackage results = service.get(objectIds,operationsOptions);
DataObject object = results.getDataObjects().get(0);
Iterator<Content> it = object.getContents().iterator();
The call object.getContents.iterator is empty all the time. I have tried different combinations of Format and transfer types except for UCF but nothing seems to be working. Does anybody have any clues ?
Thanks
- Harjit