Calling Natural from Integration Server

Scenario: "I have a Natural server subprogram and want to call this from the Integration Server."

This scenario uses the EntireX Workbench tools IDL Extractor for Natural and Integration Server Wrapper of the Software AG Designer.

graphics/nat2is-simple.png

This document covers the following topics:


Introduction

To call a Natural server subprogram from the Integration Server, take an existing Natural server graphics/blue_1.gif and generate the integration logic graphics/blue_2.gif to call it from IS platform graphics/blue_3.gif, as shown below.

graphics/nat2is-solution.png

graphics/blue_1.gif Extract the interface of a Natural server. See Using the Software AG IDL Extractor for Natural.
graphics/blue_2.gif Generate Integration Server adapter service and adapter connections. See Using the Integration Server Wrapper.
graphics/blue_3.gif Execute call from Integration Server service to Natural server.

This scenario makes the following important assumptions:

For Task 1:

  • You have a working Natural subprogram, also known as a CALLNAT program.

  • You have access to the sources of this Natural subprogram. These must be stored either

    • locally, that is, on the same machine where NaturalONE is running

      graphics/nat2is_intro-local.png

    • or remotely and accessed via the Natural RPC Server (1), and either EntireX Broker or Integration Server.

      graphics/nat2is_intro-remote.png

      Instead of NaturalONE, you can also use the EntireX Workbench.

      graphics/nat2is_intro-remote-exx.png

    (1) See your Natural documentation for setting up the Natural RPC Server.

For Tasks 2 and 3:

  • You have an Integration Server with EntireX Adapter installed.

  • You can call the Natural server subprogram at runtime using different methods:

    • For the EntireX RPC connection method you need

      graphics/nat2is_intro-rpc.png

    • For the EntireX Direct RPC connection method you need the Natural RPC Server (1)

      graphics/nat2is_intro-direct.png

    (1) See your Natural documentation for setting up the Natural RPC Server.

Task 1: Extract the Interface of a Natural Server

Follow the instructions for extracting Natural under Using the Software AG IDL Extractor for Natural:

This process creates the following EntireX metafiles:

  • IDL file. A Software AG IDL file contains definitions of the interface between client and server. See Software AG IDL File in the IDL Editor documentation.

  • Server mapping file (optional). The mapping file is an EntireX Workbench file with extension .cvm that contains Natural-specific mapping information. See Server Mapping Files for Natural in the EntireX Workbench documentation.

Start of instruction setTo test the extraction results (optional)

  1. You can test the results of the extraction operation and the COBOL Server back end, using the EntireX IDL Tester. From the context menu of the IDL file in the EntireX Workbench, choose Software AG IDL Tester.

    graphics/nat2is_test-idlTester.png

    Note that the Broker and Server parameters contain the explicit route to call the server program, and you can optionally ping the connection from this client. See EntireX IDL Tester in the EntireX Workbench documentation.

  2. Check the Integration Server log, the EntireX Adapter log or the RPC logs. Applies to all connection methods.

Task 2: Generate the Connection and Adapter Services in Integration Server

This section describes your first steps to create a new Integration Server connection. This is described in more detail under Using the Integration Server Wrapper, for example working with existing Integration Server connections. This section covers the following topics:

Step 1: Start the Integration Server Wrapper Wizard

Start of instruction setTo start the Integration Server Wrapper wizard

  1. In the context menu of a Software AG IDL file, choose Integration Server > Generate webMethods IS Connection.

    This starts the wizard with a list of existing Integration Server Wrapper connections.

    Note:
    If the selected IDL file is not valid because of a syntax error, an error dialog comes up and the wizard does not start.

  2. Continue with Step 2: Create a New Integration Server Connection.

Step 2: Create a New Integration Server Connection

graphics/using_createNew.png

Start of instruction setTo create a new Integration Server connection

  1. Define the new Integration Server connection on the wizard page.

    Notes:

    1. The only required field is Server. Enter the hostname of the Integration Server including an optional port number. If no port number is specified, port number defaults to "5555". The Integration Server Authentication can be passed with the User and Password fields.
    2. Optional settings are for secure connections. The Truststore for HTTPS contains all signed certificates and must be a valid truststore.
    3. The check box Verify host name checks that the hostname is entered in the stored certificate.
    4. When the Integration Server has Client Authentication enabled, you can specify your Keystore file and keystore Password.
    5. For managing Integration Server connections, see Integration Server Preferences in the Integration Server Wrapper documentation.
  2. Choose Next and continue with Step 3: Select the Connection Type.

Step 3: Select the Connection Type

graphics/using_connectionType.png

Start of instruction setTo create a new connection

  1. Select a connection type from the drop down list.

  2. Click Next and continue with Step 4: Define Adapter Services for an RPC Connection.

Step 4: Define Adapter Services for an RPC Connection

graphics/using_define-rpc.png

Start of instruction setTo create a connection and related adapter services

  1. Select a package for the created objects.

  2. Define a folder name. If the folder does not exist, it will be created.

  3. Define a connection name.

  4. Define the parameters of the connection type. For details, see the EntireX and your webMethods Integration Server Applications.

    As a result, the folder will contain the connection and the adapter services (one for each IDL program). The name of a service is the same as the respective IDL program.

The default settings for new RPC adapter services are:

  • the Default package; if not available, the first package

  • the IDL library name for the Folder Name

  • the IDL library name with the suffix "Connection" for the Connection Name

Notes:

  1. The check box Overwrite existing Objects in Integration Server is useful for re-generating objects created previously. However, you cannot overwrite an RPC Listener Connection or a reliable RPC Listener Connection with a connection of a different type. If the connection is deleted with the Adapter Administration UI, it is not possible to overwrite the objects. In this case, you have to delete the adapter services in the Designer.
  2. When creating a connection, a package dependency is added such that the selected package depends on webMethods EntireX (the package WmEntireX) with the version currently used.

Task 3: Execute the Call from Integration Server to Natural

From the Service Development perspective, refresh the package where the connection service was written, select the adapter service and use the service test to Run Service.

graphics/common_test-calc.png

This invokes the adapter service through the connector service.

In case of error or unexpected results:

  • Check the Integration Server log, the EntireX Adapter log or the RPC logs.

  • Use the IDL Tester as described under Step 1 above.