Chapter 8. Router solutions using Web Services Gateway 165
For example, if you use the clustering feature of WebSphere Application Server
for to enhance the Web Services Gateway performance and availability, take
similar measures for the filter application.
Don’t create filters that do a lot of tasks. Instead, create multiple filters that each
perform one simple task (for example, logging, transforming content, routing,
etc.). Then, associate all the filters to the service you need. This facilitates the
development, reduces the complexity of the filters, and promotes the reuse.
8.5 System design overview
After considering the design guidelines, ITSO Electronics decided to implement
and test the solution in the following three stages.
8.5.1 Stage 1: Basic integration
In the first stage, the Retail and Wholesale departments are all internal to ITSO
Electronics. The Retail system is aware of which Wholesale department is
supplying each part and codes the request appropriately. The Router provides
transport protocol conversion and simple logging. It also provides a layer of
abstraction between the systems that allows the Wholesale services to change
or move without affecting the Retail systems.
The solution using WebSphere Web Services Gateway in this stage is shown in
Figure 8-10.
Figure 8-10 Web Services Gateway implementation, stage 1
Wholesale1
Wholesale2
SOAP/
HTTP
SOAP/
JMS
Web Services Gateway (Router)
Retail
Service:
InventoryWholesale1
SOAP/HTTP
Channel 1
UDDI Registry
WSDL
WSDL
Service:
InventoryWholesale2
Target
Service
Target
Service
2
1
3
4
SOAP/
HTTP
5
6
166 Broker Interactions for Intra- and Inter-enterprise
1. The client application (Retail) connects to the gateway using SOAP/HTTP to
send the request to the channel.
2. The service within the gateway receives the request and resends it to the
target service. In this phase, we are using one target service for each Web
service defined
3. The location of the service provider (for example, Wholesale1) is obtained
from the WSDL associated with the service. The location of the WSDL can be
specified in two ways:
A URL that points to the WSDL file
A UDDI location
This example uses a UDDI registry.
4. The request from the client is redirected to the service provider (for example,
Wholesale1).
5. The response is received by the gateway service.
6. The response is sent through the channel to the client.
8.5.2 Stage 2: Enhanced integration
In stage 2, a filter is added to the Router to determine the appropriate service
needed to fill the request. The Retail system no longer needs to know which
Wholesale supplier provides the part.
Chapter 8. Router solutions using Web Services Gateway 167
The solution using WebSphere Web Services Gateway in this stage is shown in
Figure 8-11.
Figure 8-11 Web Services Gateway implementation, stage 2
1. The client application (Retail) connects to the gateway using SOAP/HTTP to
send the request.
2. The service invoked by the client (for example, InventoryWholesale) receives
the request and resends it to the request filter associated with it. The filter is
actually an EJB in an enterprise application.
3. The component that implements the filter receives the request. In this
example, the filter looks at the content of the message and selects the target
service to be invoked.
4. The request sent by the client is sent to the target service specified by the
filter.
5. The location of the service provider (for example, Wholesale1) is obtained
from the WSDL associated with the service.
6. The request from the client is redirected to the service provider (for example,
Wholesale1).
7. The response is received by the gateway service.
8. The response is sent through the channel to the client.
Wholesale1
Wholesale2
SOAP/
JMS
SOAP/
HTTP
Web Services Gateway (Router)
Retail
Service:
InventoryWholesale
SOAP/HTTP
Channel 1
UDDI Registry
WSDL
WSDL
Target
Service
Target
Service
Filter Impl.
Enterprise Application
Request
Filter Ref.
7
1,8
5
6
2
3
4
SOAP/
HTTP

Get Patterns: Broker Interactions for Intra- and Inter-enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.