364 Smart SOA Solutions with WebSphere Enterprise Service Bus Registry Edition V7.5
10.2.2 Support service versioning with a dynamic SLA gateway
solution
In this section, we introduce the dynamic SLA gateway solution that we use in
this chapter and explain how to prepare it for service versioning.
The dynamic service gateway pattern in WebSphere ESB accepts generic
anyType messages, meaning it is able to process request messages for any
service and then determine the endpoint address of the service implementation
that is to be invoked within a mediation.
In our solution, the gateway inspects the SOAP message header of each service
request and extracts the consumer ID and the SLA context ID from the
governance enablement profile gateway header. It uses these to determine what
version of a service to invoke.
Importing the solution into IBM Integration Designer
To import the dynamic solution into IBM Integration Designer, follow these steps:
1. Launch Integration Designer, and specify a new workspace. Then, in
Integration Designer, click File Import.
2. In the Import dialog box, expand Other, select Project Interchange, and click
Next. Click Browse to locate DynamicSLAGW_Solution.zip in the additional
material that is provided with this book. Click Open, and then click Finish to
import the project.
The DynamicSLA_Gateway module is imported into your workspace. This
module contains a simple dynamic gateway pattern, which we have
customized for this example.
To examine the DynamicSLA_Gateway module, in the Business Integration
view, expand DynamicSLA_Gateway and double-click Assembly Diagram.
The Assembly Diagram shows three components, as shown in Figure 10-3:
A SOAP web services export
A mediation flow component
A SOAP web services import
Additional material: You can find all additional material resources for this
chapter in the /Versioning folder of the additional material that is supplied
with this book.
Chapter 10. Service versioning 365
Figure 10-3 Assembly for the dynamic SLA gateway module
3. In the Business Integration view, double-click Dependencies. Expand
Predefined Resources. Note that we selected Governance Enablement
Profile Gateway Header for use in the module, as shown in Figure 10-4. The
header schema includes the consumer ID and context ID elements.
Figure 10-4 Using the predefined Governance Enablement Profile Gateway Header
4. In the Business Integration view, select Integration Logic Mediation
Flows, and double-click DynamicSLA_Gateway. The Operation connections
view shows two mediation flows: one that is defined for the requestOnly
operation, and one that is defined for the requestResponse operation, as
shown in Figure 10-5.
366 Smart SOA Solutions with WebSphere Enterprise Service Bus Registry Edition V7.5
Figure 10-5 Operation connections of DynamicSLA_Gateway
5. Click the requestResponse operation to view this mediation flow. Figure 10-6
on page 366 shows the request flow for this mediation. We have customized
this flow to contain the following mediation primitives:
Trace mediation primitives to trace elements to the local server log
An SLA Endpoint Lookup mediation primitive
A fail mediation primitive
In this mediation flow, a service provider is invoked if the SLA Endpoint
Lookup primitive returns a match. If there is no match, the flow ends with a
failure. The trace primitives are used for debugging and can be turned on and
off using promoted properties.
Figure 10-6 Request message flow

Get Smart SOA Solutions with WebSphere Enterprise Service Bus Registry Edition V7.5 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.