addWSGWTargetService command
Use the addWSGWTargetService command to add a target service to a gateway service configuration.
We can add a target service to a gateway service configuration using the wsadmin tool, or 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.
(iSeries) (iSeries) The wsadmin scripting client is run from Qshell. (iSeries) See Configure Qshell to run WebSphere scripts .
Command-line help is provided for service integration bus commands:
- For a list of the available gateway commands, plus a brief description of each command, enter at the wsadmin prompt:
print AdminTask.help('WSGateway')
- For overview help on a given command, enter at the wsadmin prompt:
print AdminTask.help('command_name')
After using the command, save the changes to the master configuration using the following command:
AdminConfig.save()
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).
- Specify either the -targetDestination or the -targetService parameter.
- -targetBus
- The name of the service integration bus that hosts the target destination.
- Specify this parameter if the -targetDestination parameter has been specified and the target destination is not within the same service integration bus as the gateway destination.
- -targetService
- The name of the target outbound service.
- Specify either the -targetDestination or the -targetService parameter.
Example
- Use Jython:
gwTarget = AdminTask.addWSGWTargetService(gwService, ["-name", "AnotherTarget", "-targetService", "AnotherService"])- Use Jacl:
set gwTarget [$AdminTask addWSGWTargetService $gwService {-name "AnotherTarget" -targetService "AnotherService"}]