DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO.
DEFINE VARIABLE ccid AS CHARACTER NO-UNDO. DEFINE VARIABLE bOK AS LOGICAL. CREATE SERVER hAppSrv. bOK = hAppSrv:CONNECT("-URL AppServerDC://asHost:asPort/svc"). RUN remote.p ON SERVER hAppSrv. ccid = hAppSrv:RESPONSE-INFO:ClientContextId. |
DEFINE VARIABLE ccid AS CHARACTER NO-UNDO.
/* Assume the following procedure has been specified as the */ /* event procedure for an asynchronous remote procedure call */ PROCEDURE AsynRqIsDone: ccid = SELF:RESPONSE-INFO:ClientContextId. DELETE OBJECT SELF. END. |
DEFINE VARIABLE hAppSrv as HANDLE.
DEFINE VARIABLE hCPIn as HANDLE. DEFINE VARIABLE hCPOut as HANDLE. DEFINE VARIABLE ccid as CHARACTER. DEFINE VARIABLE bOK as LOGICAL. DEFINE VARIABLE loginState as CHARACTER. CREATE SERVER hAppSrv. ccid = hAppSrv:REQUEST-INFO:clientContextID. CREATE CLIENT-PRINCIPAL hCPIn. hCPIn:INITIALIZE("userName@domainName", ccid, ?, "password"). hAppSrv:REQUEST-INFO:SetClientPrincipal(hCPIn). bOK = hAppSrv:CONNECT("-URL AppServerDC://asHost:asPort/svc"). hCPOut = hAppSrv:RESPONSE-INFO:GetClientPrincipal(). IF VALID-HANDLE(hCPOut) THEN loginState = hCPOut:LOGIN-STATE. ELSE loginState = ?. . . . IF VALID-HANDLE(hCPOut) THEN DELETE OBJECT hCPOut. |