Hi,
Following the code samples for uploading documents to LL server (https://knowledge.opentext.com/knowledge/cs.dll/fetch/2001/15080935/-15106263/15106294/15106295/16376487/17990637/45500683/upload_C#.html) I'm getting the error "Dispatched service DocumentManagement threw exception DocMan.NodeCreationError : Document Type is a required field" in this line:
string objectID = contentServiceClient.UploadContent(ref otAuth, contextID, fileAtts, fileStream);
Could you please advice how Document Type should be defined?
Thanks,
Alex
Hi Appu,
Yes, web UI asked me to provide Document Type for adding new document. Where should I do it in the code?
Here's a sample that used to work in my blog https://appukili.wordpress.com/2013/03/22/how-to-parse-a-nodes-categories-in-c-wcf-code/ this shows you if you have a node with metadata how would you take it and print what you see in the GUI.
Extended that same code to change things in a category
https://appukili.wordpress.com/2014/04/16/so-you-want-to-change-categoriesattributes-of-a-object-in-livelink-via-cws/
Here's a completely hard coded approach to how you can attach a piece of metadata,it is a zip file containing a C# sln file and a read me.Do not try the end points I have in the document because I have the server down.
https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=58635006&objAction=download&viewType=1
All the code that I produce is made by looking at OT produced code and using my imagination on how it could be so if you want to stick to OT code see the sample that creates a a category and adds a document.@Conocophillips I doubt if you will get category creation privileges in a system.
RE Upload document - "Document Type is required field" error Posted byalex.lapushinski@contractor.conocophillips.com (Lapushinski, Alex)On 03/17/2015 12:37 PM Hi Appu,Yes, web UI asked me to provide Document Type for adding new document. Where should I do it in the code?Thanks,Alex[To post a comment, use the normal reply function]Topic:Upload document - "Document Type is required field" errorForum:Content Web Services ForumContent Server:Knowledge Center
Thanks Appu! I'll follow these links.
While you create theContextID for your new document upload, you would essentially call the DocMan.createDocumentContext() first.
There is a parameter of return typeMetadata in this call.
This is where you would be adding the metadata information (category) together with the values (Documents Type) for this particualr document.
The next time you use this contextID with UploadContent, you shouldn’t have an issue.
-Pramod
From: eLink Entry: Content Web Services Forum [mailto:otdncontentwebservices971forum@elinkkc.opentext.com]Sent: Tuesday, March 17, 2015 7:39 PMTo: eLink RecipientSubject: RE Upload document - "Document Type is required field" error
RE Upload document - "Document Type is required field" error
Posted byalex.lapushinski@contractor.conocophillips.com (Lapushinski, Alex) On 03/17/2015 12:37 PM
[To post a comment, use the normal reply function]
Topic:
Upload document - "Document Type is required field" error
Forum:
Content Web Services Forum
Content Server:
Knowledge Center
Got it, Thanks!
Hi guys,
Thank you for info and links, I got it working.
By any chance, can I get some code samples for creating folders and deleting files using CWS?