Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
LAPI Java AddDocument
ray_chance
Livelink Java LAPI problems,I can use the following Java code to add a document.LLValue objInfo = new LLValue().setAssocNotSet();objInfo.add("CATEGORY", "Correspondence"); objInfo.add("COMMENT", "test Dcomment"); int result = documents.AddDocument( pVolumeID, pNodeID, "test LL document 32 ", "c:\\TestLLDoc.doc", objInfo, versionInfo );or int result = documents.CreateObjectEx( pVolumeID, pNodeID, documents.VERSIONOBJECTTYPE, documents.DOCUMENTSUBTYPE, "test LL document 33 cat from CRTOBJ ", node_in, objInfo );System.out.println("addDoc result is " + result +"\n"); // result is 0Even though successfully add the document, but the comment and category data are not added to the DTREE table.If I use same code to add a document, which has setup with Category. I can not add a document to DTREE at all. The result code value is 100402 in the AddDocument() statement and the result code is 101105 in CreateObjectEx() statement. Is anyone known what the result code means and can tell me why I can not add document with category setup . Is it a bug in LAPI. Is there a way to go around it. I appreciate if you know the answers. J. Hsu
Find more posts tagged with
Comments
eLink User
Message from Dave Slimmon via eLinkHi there,objInfo is output, so to put something in there is not a good idea. The APIDeveloper's Reference describes the best way to deal with comments.CreateObjectEx has a field for comments in its createinfo.request parameter.You can set your category using UpdateObjectInfo if you do not want to usethe inherited one.If you have any further problems, you might want to contact Open TextCustomer Support directly and open up an SDK ticket on this matter. We canbe reached at support@opentext.comRegards,Dave___________________________________O P E N T E X T C O R P O R A T I O NDave SlimmonProduct Specialist &Knowledge Center Content Provider
http://knowledge.opentext.com-----Original
Message-----LAPI Java AddDocumentPosted by NSSCAdmin on 11/17/1999 05:03 PMLivelink Java LAPI problems,I can use the following Java code to add a document.LLValue objInfo = new LLValue().setAssocNotSet();objInfo.add("CATEGORY", "Correspondence");objInfo.add("COMMENT", "test Dcomment");int result = documents.AddDocument( pVolumeID, pNodeID, "test LL document 32", "c:\\TestLLDoc.doc", objInfo, versionInfo );orint result = documents.CreateObjectEx( pVolumeID, pNodeID,documents.VERSIONOBJECTTYPE, documents.DOCUMENTSUBTYPE, "test LL document 33cat from CRTOBJ ", node_in, objInfo );System.out.println("addDoc result is " + result +"\n"); // result is 0Even though successfully add the document, but the comment and category dataare not added to the DTREE table.If I use same code to add a document, which has setup with Category. I cannot add a document to DTREE at all. The result code value is 100402 in theAddDocument() statement and the result code is 101105 in CreateObjectEx()statement.Is anyone known what the result code means and can tell me why I can not adddocument with category setup . Is it a bug in LAPI. Is there a way to goaround it.I appreciate if you know the answers.J. Hsu[To reply to this thread, use your normal e-mail reply function.]============================================================Discussion: Development Discussion
http://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
http://knowledge.opentext.com/knowledge/livelink.exe