Using the Natural Wrapper in Command-line Mode


Command-line Options

This section provides the command-line options for the following tasks:

See Using the EntireX Workbench in Command-line Mode for the general command-line syntax.

Generating a Natural RPC Client from an IDL File

To generate a Natural RPC client from the specified IDL file, use the following command with options in table below:

-natural:client
Option Description
-brokerpassword Password used for broker authentication.
-brokeruser User used for broker authentication.
-environment Name of the environment or an RPC server description.
-help Display this usage message.
-operationtype The operation type. Valid values are:
SAVE Generate Natural interface objects remotely on the server side
GET Generate Natural interface objects locally using Software AG Designer
-overwrite Overwrite existing Natural interface objects on the server side (SAVE command only).
-targetlibrary The target library for the Natural interface objects on the server side (SAVE command only).
-rpcpassword Password used for RPC server authentication.
-rpcuser User used for RPC server authentication.

Generating a Natural RPC Server from an IDL File

To generate a Natural RPC server from the specified IDL file, use the following command with options in table below:

-natural:server
Option Description
-brokerpassword Password used for broker authentication.
-brokeruser User used for broker authentication.
-environment Name of the environment or an RPC server description.
-help Display this usage message.
-operationtype The operation type. Valid values are:
SAVE Generate Natural interface objects remotely on the server side.
GET Generate Natural interface objects locally using Software AG Designer.
-overwrite Overwrite existing Natural interface objects on the server side (SAVE command only).
-targetlibrary The target library for the Natural interface objects on the server side (SAVE command only).
-rpcpassword Password used for RPC server authentication.
-rpcuser User used for RPC server authentication.

Example: Generating an RPC Client

<workbench> -natural:client /Demo/Example.idl -environment localhost:1971@SRV1 -operationtype SAVE -targetlibrary MYLIB

where <workbench> is a placeholder for the actual Workbench starter as described under Using the EntireX Workbench in Command-line Mode.

The name of the IDL file includes the project name. In the example, the project Demo is used. If the IDL file name describes a file inside the Eclipse workspace, the name is case-sensitive.

If the first part of the IDL file name is not a project name in the current workspace, the IDL file name is used as a relative (based on the IDL file) or absolute file name in the file system. Thus, the IDL files do not need to be part of an Eclipse project.

Example: Generating an RPC Server

<workbench> -natural:server /Demo/Example.idl -environment localhost:1971@SRV1 -operationtype SAVE -targetlibrary MYLIB

where <workbench> is a placeholder for the actual Workbench starter as described under Using the EntireX Workbench in Command-line Mode.

Warning:
Take care not to overwrite an existing server implementation with a server skeleton. We recommend you move your server implementation to a different folder.

Further Examples

Example 1

<workbench> -natural:client /Demo/example.idl -environment localhost:1971@SRV1 -operationtype GET

Uses the IDL file /Demo/example.idl and generates the Natural source files in parallel to the IDL file of the project /Demo. Output to standard output:

Using workspace file:/C:/myWorkspace/.
Processing IDL file C:/myWorkspace/Demo/example.idl to get the Natural interface objects via RPC environment localhost:1971@SRV1
Store Natural Source file C:\myWorkspace\Demo/CALC.NSN
Exit value: 0

Example 2

<workbench> -natural:client /Demo/example.idl -environment localhost:1971@SRV1 -operationtype SAVE -targetlibrary TEST

Uses the IDL file /Demo/example.idl and generates the Natural source files on the server side into the library TEST. Output to standard output:

Using workspace file:/C:/myWorkspace/.
Processing IDL file C:/myWorkspace/Demo/example.idl to stow the Natural interface objects via RPC environment localhost:1971@SRV1
Exit value: 0