This document gives an overview on application programming interfaces (APIs) to provide the context for an RPC call, for example passwords or a default server. The following topics are covered:
The API RPC-CNTX can be used for providing a context for RPC calls as it is done in test programs generated by the webMethods EntireX Natural Wrapper.
RPC-CNTX combines the functionality of several APIs and is available in
library SYSTEM
. There is no need for extra preparations such as
setting a STEPLIB or to copy APIs from SYSEXT to user libraries.
To make use of RPC-CNTX
Specify a DEFINE
DATA
statement
where level 01
is defined by 01
RPC-CNTX-AREA
, and specify the following parameters on level
02
:
Parameter | Format | I/O | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FUNCTION | A02 | I |
|
||||||||||||
BROKERID | A dynamic | I/O | Specify the broker name.
See the profile parameter
|
||||||||||||
CLASS | A32 | I | Specify the server class. For Natural RPC
servers, this is RPC . See the keyword subparameter SRVNAME of the
RPC profile parameter.
|
||||||||||||
SERVER | A32 | I/O | Specify the server name.
See the profile parameter
SRVNAME |
||||||||||||
SERVICE | A32 | I | Specify the type of RPC. For Natural RPC
servers, this is CALLNAT .
|
||||||||||||
COMPRESSLEVEL | A01 | I/O | Compression level requires API version 7. | ||||||||||||
RESERVED | I01 | I/O | Reserved for future use. | ||||||||||||
RPC-LIBRARY | A08 | I | |||||||||||||
RPC-RELIABLE-STATE | N01 | I/O |
|
||||||||||||
NAT-LOGON | A011 | I/O | |||||||||||||
EXX-USERID | A32 | I | |||||||||||||
EXX-PASSWORD | A32 | I | |||||||||||||
RPC-USERID | A32 | I | |||||||||||||
RPC-PASSWORD | A32 | I | |||||||||||||
ERR-CODE | I04 | O | The origin of some error code can be detected
by the following identifiers:
|
||||||||||||
ERR-TEXT | A dynamic | O |
Note:
The most important function codes are 'SL'
and
'LF'
. Function code 'SL'
is a combination of setting
the RPC context ('SC'
) and a logon to EntireX Broker
('LO')
.
In the calling program on the client side, specify the following statement:
CALLNAT 'RPC-CNTX' RPC-CNTX-AREA
For further information refer to Syntax Description in CALLNAT in the Statements documentation.
The setting of the RPC context is processed as follows:
Set the credentials for RPC server by specifying
RPC-USERID
and RPC-PASSWORD
(API USR1071N).
Set the mode for reliable RPC by specifying
RPC-RELIABLE-STATE
(API USR6304N).
Set the data for the RPC default server including the
logon option with a
specification for BROKERID
, SERVER
and
NAT-LOGON
(API USR2007N).
Change the library name on the RPC server for the logon by specifying
RPC-LIBRARY
(API USR4008N). If the name is left blank, the API is
not called.
Set parameters for EntireX COMPRESSLEVEL
by using API
USR4009N. If no values are specified, the API is not called.
For logging on to the EntireX Broker, specify BROKERID
,
EXX-USERID
, and EXX-PASSWORD
, which are then passed
to USR2071N.
After you have finished your work with the RPC connection, you need to
log off from the EntireX Broker using RPC-CNTX with function code
'LF'
.
Entries with a hyperlink correspond to APIs that are documented in the
Natural documentation. You can also find a description of an API in library
SYSEXT under the name USRnnnnT. The raw content of
the table was generated by running SYSEXT
with keyword
RPC
:
API name | Description |
---|---|
USR1071N | Set credentials for RPC server. Send logon data to the Natural RPC server if the client has no NSC, or if the client has NSC: for using a different user ID and password on server side. |
USR2007N | Get or set data for RPC default server, including the logon option. |
USR2032N | Support commit for CLOSE CONVERSATION. |
USR2035N | Get or set parameters for SSL support. |
USR2071N | Support EntireX Security on client side. Logon to EntireX Broker. |
USR2072N | Support EntireX Security on server side. Specify a password which is used for the LOGON in conjunction with profile parameter SRVUSER. |
USR2073N | Ping or terminate a Natural RPC server. |
USR2074N | Change the Natural Security password on the Natural RPC server. |
USR2075N | Terminate an EntireX Broker Service. |
USR2076N | Get or set RPC TIMEOUT value. |
USR4008N | Pass another library name to the Natural RPC server to log on to. |
USR4009N | Set parameters for EntireX. |
USR4010N | Get runtime settings of RPC server. |
USR4012N | Set application error on RPC server. |
USR6304N | Set/Get the mode for reliable RPC. |
USR6305N | Commit or roll back a unit of work that has been created with CLIENT_COMMIT. |
USR6306N | Get the status of all reliable RPC messages that you have previously sent under your user ID. |
USR8208N | Terminate EntireX Broker service. Pings or terminates an RPC server or terminates an EntireX Broker service. Displays the EntireX Broker version and other information from the EntireX Broker Command and Information Service (CIS). |