2016-10-12 6 views
0

다음 코드가 있습니다. ReportDetails에 대해 7 가지 속성이 있습니다. 그러나이 코드는 작동하지 않는 것으로 나타나며 오류는 없습니다.OpenText content 웹 서비스 메타 데이터

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 

정말로 도움이 되었으면합니다.

+0

를 해결해야 다음과 같이 코드를 변경. 무엇을 성취하려고합니까? – abarisone

+0

주어진 폴더에 메타 데이터를 추가하려고합니다. 하지만 그것은 추가하지 않습니다. 오류가 없습니다. – rach

답변

0

existingNode 개체에 범주를 추가하고 노드를 업데이트하는 동안 범주가없는 reportFolder을 전달하는 중입니다.

당신이 말할 때 _ "그것은 작동하지 않는 이유는 무엇입니까?"_ 무엇을 의미합니까 문제를

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