The stock quote scenario shows a business scenario for
getting stock quotes, that is implemented using the IBM® service connectivity scenario.
Introduction
This scenario
assumes a financial services company that provides stock quotes. The
company has a number of existing information technology (IT) services
that must be reused under new business conditions.
A stock
quote sample is provided with WebSphere® Enterprise
Service Bus and WebSphere Process
Server. For more information on the sample,
see:

Requirements
After analysing their business
processes the company defines the following, SOA-related, business
requirements:
- Different levels of service must be provided, depending on the
type of customer making the request. To start with there will be two
types of customers: standard customers and premium customers.
- If the company creates further levels of service, these must be
added without impacting existing customers.
The business requirements lead to the following IT requirements:
- Flexibility and reusability requirements. The solution must be
flexible, scalable and reusable; therefore, the services must be loosely
coupled.
- The service requester only needs to know the interface to invoke,
rather than the location, or physical nature, of the endpoint.
- Messages and interfaces must be defined using WSDL.
- The service requester provides the customer identifier, in the
input message; and the ESB routes the service request based on the
customer identifier.
- Customer details must be stored in a database and accessed using
a customer identifier.
- The solution must be able to transform the format of a request
or response, because the service requester and service providers use
different message formats.
Stock quote scenario version 1.0
The stock
quote scenario uses a customer identifer to look up customer details
in a database, and the customer details are used to route the message.
The stock quote scenario assumes that an input message needs its message
body transforming to make it suitable for a service endpoint.
Figure 1. Service connectivity scenario for stock quotes: overview
In version 1.0 of the scenario, stock quote inquiries
are routed to one of two service providers. However, the flexibility
and scalability of the ESB mean that you can add service providers,
and change the existing service endpoints, without impacting the service
requesters.
Version 1.0 of the scenario stores endpoint addresses
in a mediation module. However, later versions of the scenario store
endpoint addresses in a database, or a registry, for increased flexibility
and governance.
The following message flow shows the ESB:
- Logging the input message, (for audit purposes).
- Looking up customer details, using a customer identifier.
- Routing the message, based on the customer details.
- Transforming the message format, so that it is suitable for the
service provider.
Figure 2. Service connectivity scenario for stock quotes:
version 1.0 message flow overview