The WebSphere® ESB StockQuote
sample demonstrates how you can easily integrate disparate services and manipulate
in-flight messages without affecting the applications. This is achieved through
the Service Component Architecture (SCA) and mediation functionality provided
in WebSphere ESB.
About this task
A financial services company provides an interactive web-based
stock market service to its customers. The company wants to differentiate
itself from its competition by offering tiered levels of service. They want
to offer delayed stock quotes to their standard customers and real
time quotes to their premium customers (customers who pay a subscription).
The
company wants to:
- Make the delayed stock quote service available to all customers.
- Log all requests to the service to satisfy audit requirements.
- Make the real time stock quote service available to premium customers.
Figure 1. StockQuote overview
To run the StockQuote sample:
Procedure
- Launch the First Steps console.
- Start the server if it is not already started.
- Start the Samples Gallery by clicking Samples
Gallery on the First Steps panel. The WebSphere ESB StockQuote
sample is listed as an installed sample in the Samples Gallery.
- Click .
- Check the address of the Samples Gallery in the address field of
the browser window. If the port number value is 9080, go to the next step,
otherwise perform the following substeps.
- Open the administrative console and log in.
- Click . Available applications
are displayed.
- Click StockQuote. The details of the
StockQuote application are displayed.
- In the Module section, click Manage Modules.
- Click StockQuoteEJB. The details of
the StockQuoteEJB.jar file are displayed.
- In the Web Services Properties section, click Web services
client bindings.
- For sca/import/RealtimeService,
click Edit in the Port Information column. The port
information is displayed.
- In the Overidden Endpoint URL field, type http://hostname:nnnn/RealtimeService/services/RealtimeServiceSOAP, where hostname is either localhost or the
host name of the machine where the server is running; andnnnn is
the port number used for your default host.
- Click OK.
- For sca/import/DelayedService,
click Edit in the Port Information column. The port
information is displayed.
- In the Overidden Endpoint URL field, type http://hostname:nnnn/DelayedService/services/DelayedServiceSOAP, where hostname is either localhost or the
host name of the machine where the server is running; andnnnn is
the port number used for your default host.
- Click OK.
- Save your workspace changes to the master configuration and
return to the Samples Gallery.
The sample can now be run successfully on your server.
- Click Run and perform the following actions
with each of the 2 customers to demonstrate the capabilities of the integrated
service:
- Select a customer from the drop down list.
- Select one or more symbols.
- Click the Request button.
Results
Customer A,
a standard customer, will receive time delayed
quotes. Customer B,
a premium customer, will receive real time quotes.
What to do next
You can learn about the artifacts used in the sample from the Technotes
provided in the Samples Gallery.