168 Broker Interactions for Intra- and Inter-enterprise
8.5.3 Stage 3: Extended enterprise
The last stage is to make the Wholesale services available to external Retail
systems.
Figure 8-12 Web Services Gateway implementation, stage 3
Stage 3 builds on stage 2 by externalizing the Wholesale services. The
considerations are primarily security concerns. The interaction between the
Retail, Wholesale, and Web Services Gateway remain the same as in stage 2.
8.6 Development guidelines
Normally, when implementing a Router solution, the interface of the service is
determined by an existing application (in ITSO Electronics, the Wholesale
department application). In other cases, you implement a Web service interface
that encapsulates one or more operations of an existing application.
Note: The addition of the filter means that the WebSphere Application Server
Enterprise edition is required.
SOAP/
HTTP
Web Services Gateway (Router)
External
Retail
UDDI Registry
Wholesale1
SOAP/
HTTP
Wholesale2
SOAP/
JMS
Filter Impl.
Enterprise Application
Firewall
Firewall
Firewall
Firewall
Chapter 8. Router solutions using Web Services Gateway 169
If you plan to implement a Router Pattern, all the service providers have to use
the same service interface (targetNamespace, operations, etc.) and the same
binding (RPC or Document, literal or encoded, etc.). If there is any difference
between the service interface of the different providers, you will have to
implement a request filter that transforms the incoming message to the service
provider format.
Before implementing the Router solution, confirm that both the client and Web
service applications are working properly. For example, try connecting them
directly, without going through the gateway.
8.6.1 Implementation process
The section outlines the procedures used to implement the solutions for the ITSO
Electronics scenario.
Here is a summary of the necessary steps:
1. Web-service-enable the target application. The solution assumes that the
Wholesale systems have implemented their delivery date applications using
an EJB which can easily be converted to a Web service.
2. Register the business and services in the UDDI registry. This step is the same
regardless of the stage you are implementing, however, in stage 1 and 2
(intra-enterprise) you might elect to use a private UDDI registry. In stage 3,
you might consider using a commercial UDDI registry.
Note: This process assumes the following conditions:
򐂰 An enterprise application called WSWholesale1EAR exists. It contains an
EJB module with an EJB called WSWholesale1EJB. The EJB is coded to
return a delivery date for a part number supplied by the client.
򐂰 A second enterprise application called WSWholesale2EAR also exists. It is
similar to the first Wholesale application.
This section will describe the process used to create Web services from the
two EJBs, register them to the UDDI Registry and the Web Services Gateway,
and create a client to access the newly created Web services.
This process also assumes that:
򐂰 A third enterprise application called WSRetailEAR has been created and
skeleton code has been added. The only thing missing is the code that
invokes the Web services through the Web Services Gateway.
170 Broker Interactions for Intra- and Inter-enterprise
3. Create and deploy the filter application (stages 2 and 3).
4. Create the Web Services Gateway services and export the WSDL.
5. Export the Web services definition from the Web Services Gateway.
6. Web service enable the source application using the WSDL exported from the
Web Services Gateway. The Retail system needs to have the proper
information to call the Web services.
7. Test the source and target applications in the WebSphere Studio test
environment.
8. Deploy the source and target applications in your WebSphere Application
Server runtime environment.
8.6.2 Web service enable the target application
Figure 8-13 shows the steps involved in creating the Web services enabled
target application using the stateless session bean from our sample code.
Figure 8-13 Web service development for target application
Let’s walk through the process shown in Figure 8-13 for our target application.
Application
Assembler
Deployer
Application
Component
Provider
develop package deploy
WebSphere
Studio
Web
JAR
WebSphere
Studio
WebSphere
Admin
Console
WebSphere
Admin
Command
Line Tool
WSDL2
Java
Command
Line Tool
Target
WSDL
WebSphere
Application
Server
Enterprise
Archive
Enterprise
Archive
Set of
Components
Deployment
Descriptors,
Proxy classes

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.