Kbase P187066: 4GL/ABL:Error (3418) invoking CLIENT-PRINCIPAL:SEAL() method
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/3/2011 |
|
Status: Unverified
SYMPTOM(s):
4GL/ABL:Error (3418) invoking CLIENT-PRINCIPAL:SEAL() method
Incorrect number of arguments for attribute SEAL. (3418)
The statement lOk = hCP:SEAL(). generates error (3418) when running or checking syntax of code similar to the following snippet:
DEFINE VARIABLE pcUser AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDomainName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDomainKey AS CHARACTER NO-UNDO.
DEFINE VARIABLE hCP AS HANDLE NO-UNDO.
DEFINE VARIABLE lOK AS LOGICAL NO-UNDO.
SECURITY-POLICY:LOAD-DOMAINS (LDBNAME(1)) NO-ERROR.
IF VALID-HANDLE(hCP) THEN DO:
IF hCP:LOGIN-STATE = "LOGIN":U THEN
hcp:LOGOUT().
DELETE OBJECT hCP.
hCP = ?.
END.
ASSIGN
pcUser = OS-GETENV ( "username" )
cDomainName = "myAuthenticationSystemDomainName"
cDomainKey = "myAuthenticationSystemDomainAccessCode".
CREATE CLIENT-PRINCIPAL hCP.
ASSIGN
hCP:USER-ID = pcUser
hCP:DOMAIN-NAME = cDomainName
hCP:SESSION-ID = SUBSTRING(BASE64-ENCODE(GENERATE-UUID),1,22).
lOk = hCP:SEAL().
FACT(s) (Environment):
All Supported Operating Systems
OpenEdge 10.2x
OpenEdge 10.1x
CAUSE:
The CLIENT-PRINCIPAL:SEAL() method requires, as character argument, a character expression containing the key of the authentication domain that authenticated the user ID. For example: CLIENT-PRINCIPAL:SEAL(key).
FIX:
Ensure a character expression containing the key of the authentication domain that authenticated the user ID is passed as the character argument to the CLIENT-PRINCIPAL:SEAL() method. For example, the following version of the above code snippet runs error free:
DEFINE VARIABLE pcUser AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDomainName AS CHARACTER NO-UNDO.
DEFINE VARIABLE cDomainKey AS CHARACTER NO-UNDO.
DEFINE VARIABLE hCP AS HANDLE NO-UNDO.
DEFINE VARIABLE lOK AS LOGICAL NO-UNDO.
SECURITY-POLICY:LOAD-DOMAINS (LDBNAME(1)) NO-ERROR.
IF VALID-HANDLE(hCP) THEN DO:
IF hCP:LOGIN-STATE = "LOGIN":U THEN
hcp:LOGOUT().
DELETE OBJECT hCP.
hCP = ?.
END.
ASSIGN
pcUser = OS-GETENV ( "username" )
cDomainName = "myAuthenticationSystemDomainName"
cDomainKey = "myAuthenticationSystemDomainAccessCode".
CREATE CLIENT-PRINCIPAL hCP.
ASSIGN
hCP:USER-ID = pcUser
hCP:DOMAIN-NAME = cDomainName
hCP:SESSION-ID = SUBSTRING(BASE64-ENCODE(GENERATE-UUID),1,22).
lOk = hCP:SEAL(cDomainKey).