CORBA Connector Guide
Introduction
The CORBA connector enables integration with Common Object Request Brocker Architecture applications.
Design time activity flow
With the help of the OpenLegacy CLI and the CORBA connector, you can create CORBA assets based on the metadata extracted from an OMG IDL source file. You can then upload the asset to the OpenLegacy Hub.
Finally, you can generate a service based on your uploaded asset that provides a working API to the CORBA-mediated application.
See below for step-by-step instructions on creating Micro Focus assets and modules.
Runtime data flow
The CORBA connector data flow consists of the following steps:
- First, the data consumer sends a request to the OpenLegacy CORBA service containing the data query described in JSON.
- After receiving the request, the OpenLegacy CORBA service converts the JSON data query to an OMG IDL file.
- The service then sends the OMG IDL file to CORBA's host and port.
- Finally, after CORBA returns an IDL response, the OpenLegacy CORBA service converts it to JSON and passes it to the data consumer.
Prerequisites
The OpenLegacy CORBA connector has no prerequisites.
Guide topics
The CORBA connector guide includes the following topics:
- Create CORBA modules and assets: a detailed step-by-step tutorial on creating a CORBA module and assets.
- Connector properties: a list of all the CORBA connector properties and their explanations.
Create CORBA module and assets
To create a CORBA asset, you will perform the following steps:
- First, create a CORBA module to contain CORBA assets.
- Second, create a JSON-based CORBA asset by parsing a local IDL source file.
- Third, test the connection to the remote CORBA mediated data source.
- Finally, test the created asset by sending a test query to the remote CORBA-mediated data source.
Step 1. Before you start
Before creating the CORBA module, ensure you have an OMG IDL data source file.
/*
* OMG IDL example
*/
module CbsOrderUnlockV1
{
struct CbsOrderUnlockOrderRequestV1
{
string orderID;
string operatorID;
};
struct CbsOrderUnlockResponseV1
{
CbsCommonTransactionV5::CbsServiceResponseV5 serviceResponse;
boolean isSuccessful;
};
interface CbsOrderUnlockV1Service
{
CbsOrderUnlockResponseV1 unlockOrder(in CbsOrderUnlockOrderRequestV1 request, in CbsCommonTransactionV5::CbsTransactionV5 cbsTransaction);
};
};
Step 2. Create a CORBA module
First, create the CORBA module.
> ol create module --connector corba-idl module-corba-idl
$ ol create module --connector corba-idl module-corba-idl
Step 3. View the properties of the CORBA connector
Review the connector properties. For more information on the CORBA connection properties, see Properties below.
-
Navigate to the module folder.
> cd module-corba-idl
$ cd module-corba-idl
-
From under the module directory, display the help menu of the ol add command.
[module-name]> ol add --help
[module-name]$ ol add --help
The ol add help menu displays the connector property list.
--verbose Enables verbose mode
--verbose-debug Enables debug mode
--verbose-trace Enables trace mode
--additional VALUE Additional properties
--source-path TEXT Provide single idl file (required)
--compile-args TEXT Provide compilation args for the 'org.glassfish.corba:idlj' (e.g. --verbose)
--compile-include-folder TEXT Provide a path to the folder with includes which defined in main *.idl source
--host TEXT Define the host
--port TEXT Define the port
--name-service TEXT Specify name service (required)
--timeout TEXT (default: 30000)
--profile TEXT Configuration profile
-h, --help Show this message and exit
Step 4. Test the connection to the remote CORBA-mediated server
Run the ol test connection command to verify that the connection properties are correct and hence the CORBA-mediated remote data source is accessible.
[module-name]> ol test connection --host 127.0.0.1 --port 1049
[module-name]$ ol test connection --host 127.0.0.1 --port 1049
Step 5. Add an asset to the CORBA mediated module
After you have verified the connection parameters, you can create a CORBA asset. To do so, execute the ol add command to parse the OMG IDL source file and generate an asset folder containing the asset configuration file ([asset-name].json) and the asset testing resources.
[module-name]> ol add --source-path ./idl/CbsOrderUnlockV1.idl --name-service unlock-order
[module-name]$ ol add --source-path ./idl/CbsOrderUnlockV1.idl --name-service unlock-order
Step 6. Test the CORBA asset
Test the asset you added to verify that you can request and receive actual business data from the data source.
- From your module folder root go to assets/unlock-order/test_data/case1/
[module-name]> assets/unlock-order/test_data/case1/
[module-name]$ assets/unlock-order/test_data/case1/
- To view and edit the test input data, open in.json
case-1> notepad in.json
case-1$ notepad in.json
in.json contains the information sent to the remote business operation. It consists of the input keys and values that the business operation requires.
[missing_value]
- In in.json, type the values of the input properties. In the example above, for the [missing_value] key type [missing_value].
- Now you are ready to run ol test asset.
[module-name]> ol test asset unlock-order
[module-name]$ ol test asset unlock-order
The response from the remote CORBA mediated server is displayed.
Properties
--source-path
The path to a local IDL file. The path is used by the CLI ol add command to access the file and parse it to extract its metadata.
--source-path ./idl/CbsOrderUnlockV1.idl --name-service unlock-order
--host
The IP address of the Corba mediated remote data source
--host 220.142.23.1
--port
The port from which the CORBA object request broker receives communication
--port 1049
--name-service
The name of the created asset
--name-service order-unlock
--timeout
[some-value]
--timeout [some-value]
--profile
The selected connection property to be added to the ol add or ol test connection commands (see: Connection Profiles).
--profile dev
Updated 4 months ago