Try OpenEdge Now
skip to main content
ABL Reference
Handle Attributes and Methods Reference : REQUEST-INFO attribute
 

REQUEST-INFO attribute

An object reference to a Progress.Lang.OERequestInfo class that provides information about a client request sent from this ABL session to an AppServer.
Data type: Progress.Lang.OERequestInfo class
Access: Read-only
Applies to: Server object handle, Asynchronous request object handle
The following code fragment retrieves the default client context identifier (CCID) that the AVM generates when you create a server object handle:
DEFINE VARIABLE hAppSrv  AS HANDLE NO-UNDO.
DEFINE VARIABLE ccid     AS CHARACTER NO-UNDO.

CREATE SERVER hAppSrv.
ccid = hAppSrv:REQUEST-INFO:ClientContextId.
You can also access this attribute using the SELF system handle inside an ABL event procedure that runs when an associated asynchronous remote procedure completes.
The following code fragment defines an event procedure (AsynReqIsDone) that you might use to access this attribute in response to an asynchronous remote procedure call:
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.
This event procedure accesses the CCID that was sent to the AppServer along with the asynchronous request and assigns the value to the ccid variable defined in the enclosing external procedure.
The bold code in the following fragment shows setting a client principal in a server's OERequestInfo instance:
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.

See also

GetClientPrincipal( ) method (Progress.Lang.OERequestInfo), CURRENT-REQUEST-INFO attribute, CURRENT-RESPONSE-INFO attribute, LOCAL-VERSION-INFO attribute, RESPONSE-INFO attribute, SetClientPrincipal( ) method