Home
Extended ECM
API, SDK, REST and Web Services
Java LAPI Create User returns?
unknown
Message from Sean M Alderman via eLinkAccording to the docs, LAPI_USERS.CreateUser() returns an integer forthe UserID of the Livelink User created. Is it possible for it toreturn something else? I ask because my Java LAPI app returns the samenumber all the time, 400403. It doesn't appear that CreateUser() throwsan exception with information on why the user couldn't be created, as Ido have the CreateUser() inside a try/catch block.Does anyone have experience with CreateUser() in java? Could your shareyour thoughts about it?-- Sean M. AldermanITRACK Systems AnalystPACE/NCI - NASA Glenn Research Center(216) 433-2795Calling a windowed operating system "Windows" is like naming anautomobile "Wheels."
Find more posts tagged with
Comments
Robert_Clavelle
I am trying to create users by calling VB LAPI and got the same error return and would like anyone give a clue. The error string returned was:"Error creating new user"Following are some related code: If mobjLLBase.session <= 0 Then strReturn = mobjLLBase.sessionOpen() If strReturn <> STANDARD_RETURN_OK Then addUser = "clsDRMLLUser.addUser.sessionOpen: " & strReturn Exit Function End If End If mlngStatus = LL_ValueAlloc(lngValue) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_ValueAlloc", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_ValueSetAssoc(lngValue) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_ValueSetAssoc", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "LastName", mstrLastName) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "FirstName", mstrFirstName) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "MailAddress", mstrEmail) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "Contact", mstrContact) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "Title", mstrTitle) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "password", mstrPassword) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_AssocSetString(lngValue, "verify_pw", mstrPassword) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_AssocSetString", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_CreateUser(mobjLLBase.session, _ mstrLoginName, _ mstrPassword, _ LL_PRIV_LOGIN, _ 0, _ LL_GROUP, _ mstrGroupName, _ lngValue, _ lngID) If mobjLLBase.checkError("clsDRMLLUser.addUser.LL_CreateUser", mlngStatus, mstrErr) Then GoTo errHandle End If mlngStatus = LL_ValueFree(lngValue) Call mobjLLBase.sessionCloseResults:mlngStatus = 400403mstrErr = Error creating new user (plus some of mine)