DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO.
DEFINE VARIABLE ccid AS CHARACTER NO-UNDO. CREATE SERVER hAppSrv. ccid = hAppSrv:REQUEST-INFO:ClientContextId. |
DEFINE VARIABLE ccid AS CHARACTER NO-UNDO.
/* Assume that this procedure has been specified as the event procedure */ /* for an asynchronous remote procedure call */ PROCEDURE AsyncRqIsDone: ccid = SELF:REQUEST-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. |