Configuring a Service to Test the Reverse Invocation

How to:

The gateway listener performs the action requested by the relay service. For example, if a database operation is required to be performed, but the service is available on the gateway machine, the gateway listener picks up the message from the relay service and completes the processing. The result is then returned to the relay service or relay channel that is configured.

Procedure: How to Create a Service on the Gateway

To create a service on the gateway:

  1. Create a gateway listener.
  2. Add the listener to an inlet, for example, gatewayInlet.
  3. Create a service, for example, sqlServicedel, which is of type sqlAgent.
  4. Create a process, for example, sqlServicedel, with the required service to perform the requested action on the gateway.

    This service would be invoked by the relay service on the proxy machine through the socket call. In this case, a service (sqlServicedel) is used to perform a database operation, for example, a delete action through an SQL object.

  5. Add the process (sqlServicedel) to a route, for example, sqldel.
  6. Construct a channel, for example, gatewaychannel, as shown in the following image.
  7. Build the channel.

    For more information on how to create a service and constructing channels, see the iWay Service Manager User's Guide.

Procedure: How to Configure the RVIAttach Channel

To configure the RVIAttach channel:

  1. Create an RVIAttach listener.
  2. Construct a channel to perform the initial handshake with the gateway channel, as shown in the following image.

Procedure: How to Configure the Channel to Invoke the Remote Gateway Service

As an example, assume that a channel exists with a file listener that picks up files from a specified directory. After the file is picked up, a service on the gateway is invoked through the attach point and the result is written to an output directory.

To configure the channel to invoke the remote gateway service:

  1. Create a file listener.
  2. Add the listener to an inlet, for example, case1.
  3. Create a route, for example, ProxyRelay, which includes a relay service (RVIProxyService).
  4. Construct a channel, for example, RelayTestChannel, to test the remote service on the gateway machine, as shown in the following image.

Procedure: How to Test the RVI Invocation Using the Attach Point and Gateway

To test the RVI invocation using the attach point and gateway:

  1. Build the channel, for example, RVIChannel.
  2. Start the channel.
  3. If the RVIChannel starts without any errors, start the channel (gatewaychannel) on the gateway machine.
  4. If the channel (gatewaychannel) starts without any errors, a successful connection between the attach point and the gateway has been made.
  5. Start the channel (RelayTestChannel) to invoke the service.
  6. Place a file in the input path directory that was configured for the file listener (associated with the case1 inlet) to start the invocation process.

    The file read is successful indicating a success test run on the RVIAttach side. To see if the gateway service was invoked successfully, check the database to see if the database operation was completed successfully on the gateway side. If the database operation was completed, this indicates that the gateway service ran successfully.