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 more information, see Configuring Qshell to run WebSphere scripts using wsadmin scripting.
print AdminTask.help('WSGateway')
print AdminTask.help('command_name')
AdminConfig.save()
This command adds a target service to a gateway service.
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.
gwTarget = AdminTask.addWSGWTargetService(gwService, ["-name", "AnotherTarget",
"-targetService", "AnotherService"])
set gwTarget [$AdminTask addWSGWTargetService $gwService {-name "AnotherTarget"
-targetService "AnotherService"}]