addWSGWTargetService command
Use the addWSGWTargetService command to add a target service to a gateway service configuration.
You can add a target service to a gateway service configuration by using the wsadmin tool as described in this topic, or by using the administrative console as described in Modifying an existing gateway service configuration.
To run the command, use the AdminTask object of the wsadmin scripting client.
The wsadmin scripting client is run from Qshell.
- For a list of the available gateway commands, plus a brief description of each
command, enter the following command at the wsadmin prompt:
print AdminTask.help('WSGateway')
- For overview help on a given command, enter the following command at the wsadmin
prompt:
print AdminTask.help('command_name')
After using the command, save your changes to the master configuration by using the following command:
Purpose
This command adds a target service to a gateway service.
Target object
ObjectName of the GatewayService object.
The command adds the identified target as a target service to the gateway service.
The
gateway destination property com.ibm.websphere.wsgw.targets
is
updated to contain the new list of target destinations.
Required parameters
- -name
- The name of the target service.
Conditional parameters
- -targetDestination
- The name of the target destination, which might be within the same service integration bus as the gateway destination or in another bus (in which case the -targetBus must also be specified).
- -targetBus
- The name of the service integration bus that hosts the target destination.
- -targetService
- The name of the target outbound service.
Example
- Using Jython:
gwTarget = AdminTask.addWSGWTargetService(gwService, ["-name", "AnotherTarget", "-targetService", "AnotherService"])
- Using Jacl:
set gwTarget [$AdminTask addWSGWTargetService $gwService {-name "AnotherTarget" -targetService "AnotherService"}]