OpenText content Web Services metadata

Asked 5 months ago Modified today Viewed 136 times Asked By naveen020 Kolluri
0

 I have following code: have 7 different attributes for ReportDetails. But this code doesn't seem to work, and there is no error.

AttributeGroup DocTypeGrp = new AttributeGroup(); DocTypeGrp = docManClient.GetCategoryTemplate(ref otAuthentication, 12456); StringValue doc = new StringValue(); doc.Values = new string[1]; doc.Values[0] = "Report"; DocTypeGrp.Values[0] = doc; AttributeGroup rptDetailsGrp = docManClient.GetCategoryTemplate(ref otAuthentication, 45632); StringValue rptGroup = new StringValue(); rptGroup.Values = new string[1]; rptGroup.Values[0] = string.Empty; // rptGroup.Values[1] = "2012"; rptDetailsGrp.Values[0] = rptGroup; rptGroup = new StringValue(); rptGroup.Values = new string[1]; rptGroup.Values[0] = "2012"; rptDetailsGrp.Values[1] = rptGroup; Node existingNode = docManClient.GetNode(ref otAuthentication, reportFolder.ID); // Set Node Metadata metadata = new Metadata(); //Create Metadata object metadata.AttributeGroups = new AttributeGroup[] { DocTypeGrp , rptDetailsGrp }; existingNode.Metadata = metadata; // Set the Metadata objects back onto the node docManClient.UpdateNode(ref otAuthentication, reportFolder);//Update Node

Would really apprecitate any help.


Answers

0

Since you are adding the category to existingNode object and while updating the node you are passing reportFolder which doesn't have the category.

Changing the code as below should resolve your issue

docManClient.UpdateNode(ref otAuthentication, existingNode);//Update Node

 

Answered by Sathish Kumar Kinche 5 months ago

0
looks its working finr
Answered by Fayaz S T 1 week ago

0
Thanks
Answered by Naveen Teja Kolluri 6 days ago

Your Answer