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 the topic "Configure Qshell to
run WebSphere® Application
Server scripts".
This command is only valid when used with WebSphere Application Server Version 6 and later application servers. Do not use it with earlier versions.
Command-line help is provided for service integration bus commands:
wsadmin> $AdminTask help WSGateway
wsadmin> $AdminTask help command_name
For additional details of the command properties, see the related reference topic.
Before you use this command, you might want to use service integration technologies commands to create a new outbound service and add an outbound port. For more information, see the worked example at the end of this topic.
This command creates a new GatewayService with associated InboundService and TargetService objects.
The command creates the gateway request destination and corresponding reply destination. The gateway request destination is configured to update the reply path to add the reply destination. If a destination with the specified or default names already exists, the command fails.
If a gateway service or proxy service with the same name already exists, the command fails.
Specify either targetDestination or targetService.
The targetDestination identifies a destination, which might be within the same service integration bus as the gateway destination or in another bus (in which case the bus name must be specified). If the bus name is specified, then the template WSDL location must also be specified.
The command always creates an InboundService object with the same name as the gateway service. The command fails if an inbound service with that name already exists. The WSDL location from the OutboundService object or specified on the command is used as the template WSDL location for the inbound service.
If the WSDL is to be retrieved through a proxy, the server on which the command is running must have the system properties that identify the proxy server set correctly. If the proxy requires authentication, then the user ID and password can be set as parameters on the command.
The TargetService object created by this command is set as the default for the gateway service, and the default forward routing path on the gateway destination is set to point at the target destination. The gateway destination com.ibm.websphere.wsgw.targets property is set to contain the target destination or destination associated with the outbound service. The com.ibm.websphere.wsgw.gatewayService and com.ibm.websphere.wsgw.gatewayInstance properties on the gateway destination are set appropriately.
This is either a Web address or the service-specific part of a UDDI service key. If you specify a UDDI reference, the WSDL location is assumed to be a UDDI service key.
uddi:blade108node01cell:blade108node01:server1:default:6e3d106e-5394-44e3-be17-aca728ac1791The service-specific part of this key is the final part: 6e3d106e-5394-44e3-be17-aca728ac1791.
set gwService [$AdminTask createWSGWGatewayService $wsgw {-name "MyGatewayService" -targetService "MyService"}]
set outService [$AdminTask createSIBWSOutboundService $bus {-name "StockQuoteService" -wsdlLocation "http://myserver.com/wsdl/StockQuoteService.wsdl"}]
set outPort [$AdminTask addSIBWSOutboundPort $outService {-name "SOAPHTTPPort" -node "MyNode" -server "server1"}]
set gwService [$AdminTask createWSGWGatewayService $wsgw {-name "StockQuoteGatewayService" -targetService "StockQuoteService"}]
set inServiceName [$AdminConfig showAttribute $gwService "inboundServiceName"]
set inService [$AdminConfig getid /SIBus:$busName/SIBWSInboundService:$inServiceName/]
set inPort [$AdminTask addSIBWSInboundPort $inPort {-name "SOAPHTTPPort" -endpointListener "soaphttp1" -node "MyNode" -server "server1"}]