WebSphere WebSphere Application Server Network Deployment, Version 6.0.x Operating Systems: AIX, HP-UX, Linux, Solaris, Windows

Creating a new gateway service configuration through the command line

Before you begin

The command described in this topic is run using the AdminTask object of the wsadmin scripting client.

This command is only valid when run against WebSphere Application Server Version 6 application servers. Do not run it against earlier versions.

Command-line help is provided with each of the service integration technologies commands:
  • For a list of all the available gateway commands, plus a brief description of each, enter the following command:
    wsadmin> $AdminTask help WSGateway
  • For detailed help on a given command, enter the following command:
    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.

Purpose

This command creates a new GatewayService with associated InboundService and TargetService objects.

Command name
createWSGWGatewayService
Target
ObjectName of the gateway instance within which the gateway service is created.
Result
ObjectName of the created GatewayService object.

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.

Required Parameters

name
The gateway service name.

Conditional Parameters

wsdlLocation
The location of the template WSDL file. This is either a Web address or a UDDI service key. If you specify a UDDI reference, the WSDL location is assumed to be a UDDI service key.
wsdlServiceName
The name of the service within the WSDL. Only required if the template WSDL contains more than one service, or the WSDL is located through a UDDI registry.
wsdlServiceNamespace
The namespace of the service within the WSDL. Only required if the template WSDL contains more than one service, or the WSDL is located through a UDDI registry, or the service is not in the default namespace for the WSDL document.
targetDestination
The name of the target destination.
targetService
The name of the target outbound service.

Optional Parameters

requestDestination
The name of the gateway request destination.
replyDestination
The name of the gateway reply destination.
targetBus
The name of the service integration bus that hosts the target destination.
uddiReference
If you specified a UDDI service key as the WSDL location, supply the UDDI reference for the target UDDI registry.
userId
The user ID that you use to retrieve the WSDL.
password
The password that you use to retrieve the WSDL.

Example

set gwService [$AdminTask createWSGWGatewayService $wsgw {-name "MyGatewayService" -targetService "MyService"}]
The following is a minimal example of a sequence of commands to create a fully-functional gateway service with inbound and outbound SOAP over HTTP protocol attachments:
  1. Create the outbound service that represents the service provider, where bus is the service integration bus:
    set outService [$AdminTask createSIBWSOutboundService $bus {-name "StockQuoteService" -wsdlLocation "http://myserver.com/wsdl/StockQuoteService.wsdl"}]
  2. Add a SOAP over HTTP port as defined in the service provider WSDL:
    set outPort [$AdminTask addSIBWSOutboundPort $outService {-name "SOAPHTTPPort" -node "MyNode" -server "server1"}]
  3. Create the gateway service, where wsgw is the gateway instance:
    set gwService [$AdminTask createWSGWGatewayService $wsgw {-name "StockQuoteGatewayService" -targetService "StockQuoteService"}]
  4. Get the inbound service for the gateway service, where busName is the name of the service integration bus:
    set inServiceName [$AdminConfig showAttribute $gwService "inboundServiceName"]
    set inService [$AdminConfig getid /SIBus:$busName/SIBWSInboundService:$inServiceName/]
  5. Add a SOAP over HTTP port, where the SOAP over HTTP 1 endpoint listener is already configured:
    set inPort [$AdminTask addSIBWSInboundPort $inPort {-name "SOAPHTTPPort" -endpointListener "soaphttp1" -node "MyNode" -server "server1"}]
  6. Complete the configuration of the inbound and outbound services and ports. For example, apply JAX-RPC handlers or WS-Security.
Related information
Gateway services settings

Reference topic

Terms of Use | Feedback

Last updated: 5 Oct 2005
http://publib.boulder.ibm.com/infocenter/ws60help/index.jsp?topic=/com.ibm.websphere.pmc.nd.doc\ref\rwsg_cli_gw_new.html

© Copyright IBM Corporation 2004, 2005. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)