Hi,
I have a requirement in which I want to view the content of a document (e.g. document with Object ID 092e46d4802474a4) using the OOTB web service provided by documentum. below is the piece of code which I am using. I am able to access the properties of the document but i am not able to access its contents. Can any body please help me resolving this issue as i am stuck with this issue from last three days. If there is any code available to view the contents of a document using OOTB web services then please do share with me.
string repositoryName = "repositoryname";
string userName = "userName";
string password = "password";
string objId = "092e46d4802474a4";
String moduleName = "core";
String address = "Service Address";
ContextFactory contextFactory = ContextFactory.Instance;
IServiceContext context = contextFactory.NewContext();
RepositoryIdentity repoId = new RepositoryIdentity(repositoryName,
userName,
password,
"");
context.AddIdentity(repoId);
ServiceFactory serviceFactory = ServiceFactory.Instance;
IObjectService objectService =
serviceFactory.GetRemoteService<IObjectService>(context,moduleName,address);
Emc.Documentum.FS.DataModel.Core.ObjectId objectId = new Emc.Documentum.FS.DataModel.Core.ObjectId(objId);
Emc.Documentum.FS.DataModel.Core.ObjectIdentity objectIdentity = new Emc.Documentum.FS.DataModel.Core.ObjectIdentity(objectId, repositoryName);
Emc.Documentum.FS.DataModel.Core.ObjectIdentitySet objectIdentitySet = new Emc.Documentum.FS.DataModel.Core.ObjectIdentitySet(objectIdentity);
ObjectIdentitySet objectIdSet = new ObjectIdentitySet();
List<ObjectIdentity> objIdList = objectIdSet.Identities;
objIdList.Add(objectIdentity);
OperationOptions operationOptions = null;
DataPackage dataPackage = objectService.Get(objectIdentitySet, operationOptions);
DataObject dataObject=dataPackage.DataObjects[0];
Content cont = dataObject.Contents[0];
Thanks in advance.!