Create a new gateway service configuration
Use the web services gateway to map an existing service - either an inbound or an outbound service - to a new web service that appears to be provided by the gateway. The gateway service acts as a proxy: the gateway service users need not know whether the underlying service is being provided internally or externally.
For a high-level task view of how you configure the web services gateway as part of an overall bus-enabled web services configuration, see Enable web services through the service integration bus.
You configure each gateway service for a specific gateway instance, so you must create a gateway instance before we can configure any gateway services for it.
The gateway service WSDL is created from the WSDL for the first target service. If the target service is an external web service, it already has an associated WSDL. If it is an internal service:
- Create a template WSDL file that describes the service, and make the WSDL available at a URL or through a UDDI registry. For information about how to create a WSDL file, see Develop a WSDL file.
- Make the service available at a service integration bus destination.
This topic also assumes that:
- You have created a new endpoint listener configuration for each endpoint listener to use to receive inbound requests.
- You have created references to any UDDI registries in which to register this gateway service.
Decide which method to use to configure these resources. We can create a new gateway service using the console as described in this task, or using the createWSGWGatewayService command.
The following figure shows how a gateway service looks, to client requestor applications, as if it is an inbound service. However, a gateway service is also mapped to a service destination on which a target service, either an internal service or an externally-provided web service, is available. A client request is received by an endpoint listener, then passed through an inbound port to the gateway service; the target service is either an internal service available directly at the destination or an external service available at the destination through one or more outbound ports; we can also apply JAX-RPC handlers and WS-Security bindings at the ports.
Figure 1. How a gateway service maps an inbound service to a target service
A gateway service is the web interface for an underlying service (the target service). The gateway service is made available at a different location to the target service, so we can replace or relocate the target service without changing the details for the associated gateway service. We can also have more than one target service (that is, more than one implementation of the same logical service) for each gateway service. For more information, see Target services and gateway services.
The target service can be either an externally-provided web service, or a service that is available internally to the organization, and it can be located at a destination that is on a different bus to the gateway service. If the target service is an internal service, the new gateway service is always created based upon the template WSDL for the service and the bus destination at which it is available. If it is an externally-provided web service, the new gateway service is usually created based upon the externally-published WSDL for the service, and at a new bus destination. However if the target is an externally-provided web service that is already available at a bus destination (for example because it has previously been configured as an outbound service) then you should provide the destination details as part of the new gateway service creation process. Otherwise the same external web service is made available at two different destinations.
We can control and monitor access to the gateway services in the following ways:
- We can control which groups of users can access a particular gateway service by making the service available only through a particular gateway instance.
- We can associate JAX-RPC handler lists with ports, so that the handlers can monitor activity at the port, and take appropriate action depending upon the sender and content of each message that passes through the port.
- We can set the level of security to be applied to messages (the WS-Security binding). The security level can be set independently for request and response messages.
When creating a new gateway service, you configure a single target service as a new web service that seems to be provided by the gateway. After creating the new gateway service, we can add more target services (that is, more implementations of the same logical service) by modifying the existing gateway service configuration.
To create a new gateway service using the console... For more information about the new gateway service properties, see Gateway services settings.
- Start the console.
- In the navigation pane, click Service integration -> Buses -> bus_name -> [Additional Properties] Web service gateway instances -> instance_name -> Gateway Services. The gateway services collection form is displayed.
- Click New. A panel is displayed through which you select the first target service for your new gateway service.
- Choose one of the two methods to create the gateway service (either through a WSDL-defined web service provider or a Service destination) then click Next.
If the target service is an internal service, or an externally-provided web service that is already available at a destination, select Service destination. If the target service is an externally-provided web service that is not already available at a bus destination, select WSDL-defined web service provider and the target service is configured to a new destination. The New gateway service wizard is displayed for the service creation method selecteded.
- Optional: If we selected WSDL-defined web service provider...
- Specify the gateway service name, gateway service destinations and mediations.
- Choose a gateway service name that is unique across all gateway and proxy services within the current gateway instance. If we enter a name that is not unique, an error message is displayed.
- You need not provide gateway destination names. If we leave either of these fields blank, a default name is generated for you when the wizard completes its operation. The default names are not displayed in the panel. They are constructed as follows:
- The request destination name is the same as the gateway service name. For example: myGatewayService.
- The reply destination name is the same as the request destination name, followed by "Reply". For example: myGatewayServiceReply.
- The lists of available mediations contain all mediations that are currently deployed to this service integration bus. If we have created a mediation and deployed it to the bus, then it is available for selection in both these lists. If we do not want to use a mediation with this gateway service, select none from either or both selection lists.
- Bus members are application servers or clusters added to this bus. The Request mediation bus member and the Response mediation bus member properties define the bus members to which the corresponding mediation is assigned. If we change the Request mediation or the Response mediation property value to (none), you should also change the corresponding bus member property value to (none). To use a mediation, assign it to a bus member. If we do not do this, the console displays an error message.
- Locate the target service WSDL.
- Select the service from the WSDL.
- This option is needed in case there is more than one service in the WSDL. The field is filled in for you by default. If there is only one service in the WSDL, accept the default.
- There needs to be at least one port defined in the service you select.
- Select the ports that are to be enabled for this service.
- The list of available ports is the set of ports described in the WSDL file.
- Select at least one port.
- Name the outbound service, the service destination and all of the port destinations.
- Default names are generated, but we can rename them. The default names are unique within the current service integration bus. Any replacement names that you choose must be similarly unique. If we enter a name that is not unique, an error message is displayed.
- If we have created a port selection mediation and deployed it to the bus, then it is available for selection in the list of mediations. If we do not want to use a port selection mediation with this gateway service, select none from the drop-down list. This list contains all mediations, including port selection mediations, that are currently deployed to this service integration bus.
- The list of available ports is a subset of the ports described in the WSDL file. You chose this subset in the previous step.
- Assign each port destination and (optionally) the port selection mediation to a bus member.
- The option to assign a port selection mediation to a bus member is only displayed if you selected a mediation in the previous step.
- Select endpoint listeners for the inbound configuration of this gateway service.
For more information, see Endpoint listeners and inbound ports: Entry points to the service integration bus.
- Define any UDDI publication properties.
Specify the UDDI publication properties used to publish this gateway service to one or more UDDI registries. For information about the UDDI publication properties, see UDDI Publication settings and UDDI registries: Web service directories that can be referenced by bus-enabled web services.
- Optional: If we selected Service destination...
- Specify the gateway service name, gateway and target service destinations and mediations.
- Choose a gateway service name that is unique across all gateway and proxy services within the current gateway instance. If we enter a name that is not unique, an error message is displayed.
- The target service need not be available on the same bus as the gateway service, so specify the bus and associated service destination at which the target service is available.
- The Target bus name field lists all available buses. The Target destination name field lists all available destinations. When you choose a bus and an associated destination, choose a destination that is available on the bus selected. If we do not do this, the console displays an error message.
- You need not provide gateway destination names. If we leave either of these fields blank, a default name is generated for you when the wizard completes its operation. The default names are not displayed in the panel. They are constructed as follows:
- The request destination name is the same as the gateway service name. For example: myGatewayService.
- The reply destination name is the same as the request destination name, followed by "Reply". For example: myGatewayServiceReply.
- The lists of available mediations contain all mediations that are currently deployed to this bus. If we have created a mediation and deployed it to the bus, then it is available for selection in both these lists. If we do not want to use a mediation with this gateway service, select none from either or both selection lists.
- The Request mediation bus member and the Response mediation bus member properties define the bus members to which the corresponding mediation is assigned. If we change the Request mediation or the Response mediation property value to (none), you should also change the corresponding bus member property value to (none). To use a mediation, assign it to a bus member. If we do not do this, the console displays an error message.
- Select the WSDL location.
For an internal service, the template WSDL is the service-specific WSDL file that describes the service that is directly available at a service destination.
- Select the service from the WSDL.
- This option is needed in case there is more than one service in the WSDL. The field is filled in for you by default. If there is only one service in the WSDL, accept the default.
- There needs to be at least one port defined in the service you select.
- Select endpoint listeners for the inbound configuration of this gateway service.
For more information, see Endpoint listeners and inbound ports: Entry points to the service integration bus.
- Define any UDDI publication properties.
Specify the UDDI publication properties used to publish this inbound service to one or more UDDI registries. For information about the UDDI publication properties, see UDDI Publication settings and UDDI registries: Web service directories that can be referenced by bus-enabled web services.
- If the target service is an external web service, the option Outbound web service enablement is available in the additional properties section. Click this option to modify the outbound service configuration for this target service. For more information, see Modify an existing outbound service configuration.
- Click Finish.
Results
If the processing completes successfully, the list of gateway services for this gateway instance is updated to include the new gateway service. Otherwise, an error message is displayed.
What to do next
To modify the new gateway service, or to add additional target services (that is, additional implementations of the same logical service) to the gateway service, see Modify an existing gateway service configuration. To set the level of security to be applied to messages (the WS-Security binding), see Configure secure transmission of SOAP messages by using WS-Security.
Subtopics
- Modify an existing gateway service configuration
Modify the configuration details for a gateway service.
- Delete gateway service configurations
Use this task to delete gateway service configurations using the console.
Related concepts
Target services and gateway services
addWSGWTargetService command removeWSGWTargetService command
Related information:
Gateway services [Settings] Target services [Settings]