Configuring a Service to Test the Reverse Invocation
The gateway listener performs the action requested by
the relay agent. 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 agent and
completes the processing. The result is then returned to the relay
agent/relaychannel that is configured.
x
Procedure: How to Create a Service on the Gateway
To
create a service on the gateway:
-
Create
a gateway listener as described in Configuring the Gateway Listener.
-
Add
the listener to an inlet, for example, gatewayInlet.
-
Create
a service, for example, sqlServicedel, which
is of type sqlAgent.
-
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 agent 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.
-
Add
the process (sqlServicedel) to a route, for example, sqldel.
-
Construct
a channel, for example, gatewaychannel, as
shown in the following image.
-
Build
the channel.
For more information on how to create a service and constructing
channels, see the iWay Service Manager User's Guide.
x
Procedure: How to Configure the RVI Attach Channel
To
configure the RVI attach channel:
-
Create
an RVI attach listener as described in Configuring the RVI Attach Listener.
-
Construct
a channel to perform the initial handshake with the gateway channel,
as shown in the following image.
x
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:
-
Create
a file listener.
-
Add
the listener to an inlet, for example, case1.
-
Create
a route, for example, ProxyRelay, which includes
a relay agent (RVIProxyService).
-
Construct
a channel, for example, RelayTestChannel,
to test the remote service on the gateway machine, as shown in the
following image.
x
Procedure: How to Test the RVI Invocation Using the Attach Point and Gateway
To
test the RVI invocation using the attach point and gateway:
-
Build
the channel, for example, RVIChannel.
-
Start
the channel.
-
If the
RVIChannel starts without any errors, start the channel (gatewaychannel)
on the gateway machine.
-
If the
channel (gatewaychannel) starts without any errors, a successful handshake
between the attachpoint and the gateway has been made.
-
Start
the channel (RelayTestChannel) to invoke the service.
-
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 RVI attach 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.