date datatype problem in using LAPI with JAVA
hi all,LAPI and livelink: 8.0.2OS:winnt sp3JAVA: jdk 1.1.8When I use LAPI with JAVA, I get an error which seem odds.Here is a small JAVA program to reproduce the problem:import com.opentext.api.*;import java.io.*;import java.util.*;public class qq {public static void main(String[] args) {try {int volumeID;int nodeID;LLSession session;LAPI_DOCUMENTS lapi;LLValue createinfo=(new LLValue()).setAssocNotSet();LLValue outinfo=(new LLValue()).setAssocNotSet();LLValue requestinfo=(new LLValue()).setAssocNotSet();LLValue extendeddata=(new LLValue()).setAssocNotSet();LLValue requiredatt=(new LLValue()).setAssocNotSet();session=new LLSession("hqsdom01",2099,"livelink","Admin","amspcc");lapi=new LAPI_DOCUMENTS(session);if (lapi.AccessPersonalWS(outinfo)==0) { System.out.println("pws success"); volumeID=outinfo.toInteger("VolumeID"); nodeID=outinfo.toInteger("ID"); requestinfo.add("Comment",""); createinfo.add("request",requestinfo); createinfo.add("extendedData",extendeddata); createinfo.add("requiredAttributes",requiredatt); if (lapi.CreateObjectEx(volumeID,nodeID,LAPI_DOCUMENTS.OBJECTTYPE,LAPI_DOCUMENTS.TASKLISTSUBTYPE,"test tasklist",createinfo,outinfo)==0){ System.out.println("create success"); volumeID=outinfo.toInteger("VolumeID"); nodeID=outinfo.toInteger("ID"); System.out.println(volumeID); createinfo=(new LLValue()).setAssocNotSet(); outinfo=(new LLValue()).setAssocNotSet(); requestinfo=(new LLValue()).setAssocNotSet(); extendeddata=(new LLValue()).setAssocNotSet(); requiredatt=(new LLValue()).setAssocNotSet(); LLValue dd=new LLValue(99,7,30,0,0,0); Date qqqq=dd.toDate(); requestinfo.add("AssignedTo",3999);//here is the problem statements, if I comment out//these two statements, no error at all requestinfo.add("DateStarted",qqqq); requestinfo.add("DateDue",qqqq);//if I leave it as shown, I got an error requestinfo.add("Priority",50); requestinfo.add("Status",0); requestinfo.add("Intructions",""); requestinfo.add("Comment",""); createinfo.add("request",requestinfo); createinfo.add("extendedData",extendeddata); createinfo.add("requiredAttributes",requiredatt); if (lapi.CreateObjectEx(nodeID,-nodeID,LAPI_DOCUMENTS.OBJECTTYPE,LAPI_DOCUMENTS.TASKSUBTYPE,"test task",createinfo,outinfo)==0){ volumeID=outinfo.toInteger("VolumeID"); nodeID=outinfo.toInteger("ID"); System.out.println("create task success"); } }}}catch (Throwable e) { System.err.println(e.getMessage()); e.printStackTrace(System.err);}}}The error is:get(name) not implemented for this datatypecom.opentext.api.LLIllegalOperationException: get(name) not implemented for this datatype at com.opentext.api.LLInstance.get(LLInstance.java) at com.opentext.api.LLValue.toValue(LLValue.java) at com.opentext.api.LLConnect.unMarshall(LLConnect.java) at com.opentext.api.LAPI_DOCUMENTS.CreateObjectEx(LAPI_DOCUMENTS.JAVA) at qq.main(qq.java:56)It seem that something is not implemented in the Date datatype.So, I want to ask, is there any work arround of this problem? or is there any method to do the same job?I only want to do is create a task list and a task with preset start date.thx a lotWaimailto:leungkw@mtrcorp.com