I'm trying to create a physical object by using CreateNode method. Not sure why but I'm keep getting error from method CreateNode. I'm using 10.5 CWS and hope someone can let me why it doesn't work.
Hi Freddy,
To properly answer this it would be great if you provide the details of how you create the Physical Objects - did you provide POCreateInfo?
Here is a snipeet of a Physical Object creation using C#:
Node poNode = new Node();
long poType = [ Here is an ID of the Physical Item Type to be created ];
long folderId = [An ID of the Folder where the item will be created];
AttributeGroup[] theAttributeGroups = new AttributeGroup[1]; AttributeGroup theAttributeGroup = new AttributeGroup();
theAttributeGroup.Key = "POCreateInfo"; theAttributeGroup.Type = "POCreateInfo";
// Defined a type of the PO IntegerValue intValue = new IntegerValue(); intValue.Key = "selectedMedia"; intValue.Values = new long?[] { poType };
StringValue strValue = new StringValue(); strValue.Key = "poLocation"; strValue.Values = new string[] { "An existing Code value from the Location Table" };
theAttributeGroup.Values = new DataValue[] { intValue, strValue }; theAttributeGroups[0] = theAttributeGroup;
poNode.Metadata = new Metadata(); poNode.Metadata.AttributeGroups = theAttributeGroups;
poNode.Type = "PhysicalItem"; poNode.ParentID = folderId; poNode.Name = String.Format("TestBook_{0}", i + 1); poNode.Comment = "Example of PO Creation"; poNode.DisplayType = "PhysicalItem";
try { curNode = docManagement.CreateNode(poNode);
.....
Regards,
Alex
Hi,
I'm trying to create a box with CreateNode function.
Here is Request:
<v:Envelope xmlns:i="http://www.w3.org/1999/XMLSchema-instance" xmlns:d="http://www.w3.org/1999/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> <v:Header> <n0:OTAuthentication xmlns:n0="urn:api.ecm.opentext.com"> <n0:AuthenticationToken>v8WgywriwvBHFtboW9jmdA%3d%3D</n0:AuthenticationToken> </n0:OTAuthentication> </v:Header> <v:Body> <CreateNode xmlns="urn:DocMan.service.livelink.opentext.com" id="o0" c:root="1"> <n1:node xmlns:n1="urn:DocMan.service.livelink.opentext.com"> <ParentID>2376842</ParentID> <Type>PhysicalItem</Type> <Name>9987766</Name> <Metadata> <n1:AttributeGroups> <n1:AttributeGroup> <Key>POCreateInfo</Key> <Type>POCreateInfo</Type> <n1:Values> <n1:IntegerValue> <Key>selectedMedia</Key> <Values> <d:item i:type="d:string">2376841</d:item> </Values> </n1:IntegerValue> <n1:StringValue> <Key>poLocation</Key> <Values> <d:item i:type="d:string">WH1</d:item> </Values> </n1:StringValue> </n1:Values> </n1:AttributeGroup> </n1:AttributeGroups> </Metadata> </n1:node> </CreateNode> </v:Body></v:Envelope>
Here is Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <s:Fault> <faultcode xmlns:a="urn:DocMan.service.livelink.opentext.com">a:DocMan.NodeCreationError</faultcode> <faultstring xml:lang="en-US">Unknown AttributeGroup types {?}.</faultstring> </s:Fault> </s:Body></s:Envelope>
So, please anyone can help me, where I'm doing wrong in making request?
Cheers!
Waqar
Just to be clear - are you consuming the web service using striclty SOAP?
HI Alexander,
Yes, I using SOAP in making request in Android.