Network Deployment (Distributed operating systems), v8.0 > Reference > Commands (wsadmin scripting)
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 by using wsadmin as described in this topic, or by using the admin console as described in Modify an existing gateway service configuration.
To run the command, use the AdminTask object of the wsadmin scripting client.
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, run at the wsadmin prompt:
print AdminTask.help('WSGateway')
- For overview help on a given command, run at the wsadmin prompt:
print AdminTask.help('command_name')
After using the command, save changes to the master configuration; for example, by 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
### Jython
gwTarget = AdminTask.addWSGWTargetService(gwService, ["-name", "AnotherTarget", "-targetService", "AnotherService"])### Jacl
set gwTarget [$AdminTask addWSGWTargetService $gwService {-name "AnotherTarget" -targetService "AnotherService"}]
Target services and gateway services
Create a new gateway service configuration
Modify an existing gateway service configuration
Target services [Settings]