I have checked all other posts related to content download. I have also gone through DFS 6.5 development guide. My problem is while using Get method of Object service, I am getting the properties, but not the content. DataObject.Contents is null. There are no exception bieng thrown.I changed all possible combination of ContentProfile. I have checked it in FirstDoc, There is a PDF available. Please find the code below. Also find the complete contentprofile object is bieng passed. The content is PDF.
try
DataObject objData = null;
ObjectIdentitySet objectIdentitySet = CreateObjectIdentityFromObjectId(sObjectID);
OperationOptions operationOptions = new OperationOptions {
new Profile[]{
new ContentProfile { formatFilter = FormatFilter.ANY,
PageFilter.ANY,
PageModifierFilter.ANY,
RenditionTypeFilter.ANY,
RenditionOption.SERVER
new ContentTransferProfile { transferMode = ContentTransferMode.MTOM }};
DataPackage dataPackage = null;
using (OperationContextScope scope = new OperationContextScope(objectService.InnerChannel))
OperationContext.Current.OutgoingMessageHeaders.Add(new ServiceContextHeader());
//Call the DFS object service with input ObjectID, If result is not null, return the retreived object ID
if (dataPackage != null && dataPackage.DataObjects.Count() > 0)
return objData;
catch (FaultException<QueryServiceReference.SerializableException> ex)
throw new DFSException("Exception occured while getting object:" + sObjectID, ex);
catch (Exception exx)
throw new DFSException("Exception occured while getting object:" + sObjectID, exx);
contentReturnType null string
contentReturnTypeField null string
format null string
formatField null string
formatFilter ANY contentReturnType null string
contentReturnTypeField null string
format null string
formatField null string
formatFilter ANY ObjectServiceReference.FormatFilter
formatFilterField ANY ObjectServiceReference.FormatFilter
formatFilterFieldSpecified false bool
formatFilterSpecified false bool
pageFilter ANY ObjectServiceReference.PageFilter
pageFilterField ANY ObjectServiceReference.PageFilter
pageFilterFieldSpecified false bool
pageFilterSpecified false bool
pageModifier null string
pageModifierField null string
pageModifierFilter ANY ObjectServiceReference.PageModifierFilter
pageModifierFilterField ANY ObjectServiceReference.PageModifierFilter
pageModifierFilterFieldSpecified false bool
pageModifierFilterSpecified false bool
pageNumber 0 int
pageNumberField 0 int
postTransferAction null string
postTransferActionField null string
renditionOption SERVER ObjectServiceReference.RenditionOption
renditionOptionField SERVER ObjectServiceReference.RenditionOption
renditionOptionFieldSpecified false bool
renditionOptionSpecified false bool
renditionTypeFilter ANY ObjectServiceReference.RenditionTypeFilter
renditionTypeFilterField ANY ObjectServiceReference.RenditionTypeFilter
renditionTypeFilterFieldSpecified false bool
renditionTypeFilterSpecified false bool
urlReturnPolicy ALWAYS ObjectServiceReference.UrlReturnPolicy
urlReturnPolicyField ALWAYS ObjectServiceReference.UrlReturnPolicy
urlReturnPolicyFieldSpecified false bool
urlReturnPolicySpecified false bool
ObjectServiceReference.FormatFilter
formatFilterField ANY ObjectServiceReference.FormatFilter
formatFilterFieldSpecified false bool
formatFilterSpecified false bool
pageFilter ANY ObjectServiceReference.PageFilter
pageFilterField ANY ObjectServiceReference.PageFilter
pageFilterFieldSpecified false bool
pageFilterSpecified false bool
pageModifier null string
pageModifierField null string
pageModifierFilter ANY ObjectServiceReference.PageModifierFilter
pageModifierFilterField ANY ObjectServiceReference.PageModifierFilter
pageModifierFilterFieldSpecified false bool
pageModifierFilterSpecified false bool
pageNumber 0 int
pageNumberField 0 int
postTransferAction null string
postTransferActionField null string
renditionOption SERVER ObjectServiceReference.RenditionOption
renditionOptionField SERVER ObjectServiceReference.RenditionOption
renditionOptionFieldSpecified false bool
renditionOptionSpecified false bool
renditionTypeFilter ANY ObjectServiceReference.RenditionTypeFilter
renditionTypeFilterField ANY ObjectServiceReference.RenditionTypeFilter
renditionTypeFilterFieldSpecified false bool
renditionTypeFilterSpecified false bool
urlReturnPolicy ALWAYS ObjectServiceReference.UrlReturnPolicy
urlReturnPolicyField ALWAYS ObjectServiceReference.UrlReturnPolicy
urlReturnPolicyFieldSpecified false bool
urlReturnPolicySpecified false bool