Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Status Code: 100402

Status
Not open for further replies.

smallredville

Programmer
Aug 18, 2008
115
SG
Hi everyone,

I recently tried the sample code to add document from DR LAPI site...

But unsuccessful...

I got the following error message:

Failed to Add Document
Status Code: 100402
Api Error:
Error Message:
Status Message: Required System Attributes

I tried to debug but to no avail.

The following is my source code:

------------------------------------------------------------
package LAPI;

import com.opentext.api.*;

public class addDoc {

private static String Server = "localhost";
private static int Port = 2099;
private static String DFT = "";
private static String User = "Admin";
private static String Pass = "password";

public static void main (String [] args)
{
try
{
//variables
LLSession session;
LAPI_DOCUMENTS doc;
LLValue entInfo= new LLValue();
LLValue objInfo = new LLValue();
LLValue verInfo = new LLValue();
session = new LLSession (Server, Port, DFT, User, Pass);
doc = new LAPI_DOCUMENTS (session);



int volumeID,objectID,objID;
String objName, FilePath;
if(doc.AccessEnterpriseWS(entInfo) != 0)
{
System.out.println("AccessEnterpriseWS Failed.");
return;
}
else
{
volumeID = entInfo.toInteger("VolumeID");
objectID = entInfo.toInteger("ID");
System.out.println("Enterprise Volume"+volumeID+"Enterprise ObjID"+objectID);
}

objID = 684436; //684436 is object ID for a folder in DTREE
objName = "New Document";
FilePath = "C:\\yoyo\\AddDocument.java";

if (doc.AddDocument(volumeID, objID, objName, FilePath, objInfo, verInfo) == 0)
{
System.out.println("This version's name is"+verInfo.toString("Name"));
System.out.println("This version's created at "+objInfo.toDate("CreateDate"));
System.out.println("This objects id is"+verInfo.toInteger("NodeID"));
System.out.println("Document Added Successfully");
}
else
{
System.out.println("Failed to Add Document");
//Error Checking
System.out.println("Status Code: " + session.getStatus());
System.out.println("Api Error: " + session.getApiError());
System.out.println("Error Message: " + session.getErrMsg());
System.out.println("Status Message: " + session.getStatusMessage());
}
}
catch (Throwable e)
{
System.err.println(e.getMessage());
e.printStackTrace (System.err);
}

}//main ends
}//class ends


------------------------------------------------------------

In addition, where can I find the description for the Status Code e.g. 100401 means bla bla...

I tried to google on this but to no avail

___________________________________________________________
I hope somebody who has the idea about this, can share with me on how to solve the above mentioned error.

Many thanks in advance.... (^o^)


smallredville




 

Status Message: Required System Attributes

My guess is that on the same folder that has id of 684436
try going thru the GUI and add the same document.My guess is that you may be filling more than the name and the file while you are doing that.It looks to me that there are system attributes required so in that case this adddocument call is not the right one.Please use the example at KB with createobjectex call knowledge.opentext.com and use the SDKdevzone link

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top