154 Broker Interactions for Intra- and Inter-enterprise
8.3 Applying patterns
The Retail system needs to get delivery dates based on a part or system number
from the appropriate Wholesale supplier. Each Wholesale supplier has its own
unique implementation that returns the delivery date to requesters but has
basically the same input and output formats for incoming requests and outgoing
responses. Each Wholesale system does not necessarily support the same
protocol for transmission of the requests and responses.
From this, ITSO Electronics determined the following requirements:
򐂰 Each Wholesale department must expose its services as Web services.
The actual implementation on the Wholesale systems must be transparent to
the Retail system. The request for a delivery date will be done as a Web
service invocation, relieving the Retail system from having to know how the
request is fulfilled.
򐂰 The design must be able to support multiple protocols and perform protocol
transformation.
For the same Web service, Wholesale1 offers a SOAP/HTTP implementation,
while Wholesale2 offers a SOAP/JMS implementation. Although the Retail
system will initially use SOAP/HTTP as an interface, future requirements will
include the need to access the services using SOAP/JMS.
8.3.1 Application patterns
A Router node provides the multi-protocol transformation and intelligent request
routing required for the solution, therefore ITSO Electronics decided to use the
Application Integration Router pattern to design the solution.
To phase in the solution, they decided to implement it in stages.
Stage 1: Basic integration
In the first stage, the Retail system requests either the service of the Wholesale1
or Wholesale2 department. This assumes that the Retail system knows which
Wholesale department is the supplier for a particular part number. This solution
requires simple router functions, which will be supplied by Web Services
Gateway.
The request is directed to the Router node, which invokes the Web service from
the requested Wholesale department. The Router presents a unified interface for
the Retail system and transforms the message to the appropriate transport
protocol for the target. It also performs logging of the event.
Chapter 8. Router solutions using Web Services Gateway 155
The solution implemented in this stage by ITSO Electronics is shown in
Figure 8-3.
Figure 8-3 Basic Router implementation
Stage 2: Enhanced integration
In the second stage, ITSO Electronics will enhance the solution so the Retail
system no longer needs to know which Wholesale department supplies the part.
The Retail system can simply send the request to the Router, which will
determine the appropriate Wholesale system and invoke the Web service. This
places a requirement on the Router that it provide content-based routing.
The solution implemented in this stage by ITSO Electronics is shown in
Figure 8-4.
Figure 8-4 Enhanced Router implementation
Stage 3: Extended enterprise
In the third stage, ITSO Electronics will enhance the solution so that external
Retail systems can request delivery dates from the Wholesale departments. The
implementation does not change, but the Web Services Gateway is opened up to
the externals and protected with a firewall; and additional security concerns are
addressed.
SOAP/
HTTP
Router Rules
SOAP/
JMS
ITSO Electronics
Wholesale
ITSO Electronics
Wholesale
ITSO
Electronics
Retail
SOAP/
HTTP
SOAP/
HTTP
SOAP/
JMS
ITSO Electronics
Wholesale
ITSO Electronics
Wholesale
ITSO
Electronics
Retail
SOAP/
HTTP
Router Rules
156 Broker Interactions for Intra- and Inter-enterprise
The solution implemented in this stage by ITSO Electronics is shown in
Figure 8-5.
Figure 8-5 Extended enterprise implementation
Similarly, the solution could provide the Retail systems in ITSO Electronics could
access external Wholesale companies.
Figure 8-6 Extended enterprise implementation
In either case, the Router node can be placed on the secure internal network
behind the DMZ. The advantage of this configuration is that the gateway can
provide access to services using protocols that are not as firewall-friendly as
HTTP. For example, the Router node can enable Web service clients to access
EJB, JMS, and JavaBean applications.
The Router node could also be located in the DMZ. All the firewalls in our
example are configured for network address translation, so SOAP over HTTP
can be used to pass through the firewalls. This may not work if the gateway is
using RMI to access an EJB on the secure network, for example.
External
Retail
SOAP
/HTTP
SOAP/
JMS
Firewall
Firewall
SOAP/
HTTP
Firewall
Firewall
DMZ
ITSO Electronics
Wholesale
ITSO Electronics
Wholesale
Router Rules
SOAP/
HTTP
SOAP/
HTTP
Firewall
Firewall
Firewall
Firewall
DMZ
ITSO
Electronics
Retail
SOAP/
JMS
External
Wholesale
External
Wholesale
Router Rules

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.