Configuring a Service to Test the Reverse Invocation
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.
x
Procedure: How to Create a Service on the Gateway
To
create a service on the gateway:
-
Create a 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 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.
-
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 RVIAttach Channel
To
configure the RVIAttach channel:
-
Create an RVIAttach 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 service (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 connection between the attach point 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 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.