Service maps

A service map contains the information that a local mapping service uses to transform and route requests and responses between service clients and service providers.

A service map sets conditions so that a request can be routed, transformed, or both. When you create a service map in Rational® Application Developer, you make connections between a source service (the original service provider) and a target service (the new service provider to which you want to route the request). You can define multiple connections from different parts of the source service, with a condition attached to each connection. Each connection creates a different type of service map, depending on the scope of the request to be rerouted.

You can develop a service map by using the Service Mapping Editor in Rational Application Developer, then deploying that service map to the WebSphere® Application Server run time. The WebSphere Application Server administrator creates a local mapping service, attaches the service map to the local mapping service, and configures the service clients that the local mapping service intercepts.

You can install a service map from either of the following locations:
  • A directory on your local file system
  • A location in the node of the cell that hosts the service client
The following figure shows a scenario where requests are both routed and transformed.
Note: In this diagram and subsequent diagrams, interfaces and services are indicated by shapes: circle, squares, triangles, and hexagons. Open shapes indicate interfaces. Filled-in shapes indicate services. An identical open shape on both the service client and the service provider means that their interface types are the same.
Figure 1. Service mapping used in a routing and transformation scenario
This diagram shows a service map in an application server with two service providers outside of the application server.

Service map components

Figure 2 is an example of a service map that shows the main components of the programming model. The service map in the preceding figure is magnified and explained further. A source service can send requests to one or more target services, and the request is routed or transformed depending on the condition that is set when the connection is made. An interface map can contain one or more operation maps. An operation map can contain one or more message maps.
Figure 2. The components of a service map
This diagram shows the different types of service map that you can create.

A source service can send requests to one or more target services, and the request is routed or transformed depending on the condition that is set when the connection is made. An interface map can contain one or more operation maps. An operation map can contain one or more message maps.

Service map

At the highest level, a service map has one or more interface maps, and provides conditions to choose between them.

Interface map

An interface map specifies the target service that requests should be routed to. Multiple interface maps can be created from the source service. Each map can have conditions that express routing decisions. Each interface map can contain one or more operation maps to define how the source and target interfaces should be connected.

Operation map

An operation map defines which operation is intercepted, and which target operation should be called. Each operation map contains one or more message maps, which define how the data is passed from source to target.

You can connect more than one operation map to a particular source operation, with a condition on each. This configuration calls a different target operation, which is based on the content of the request.

Message map

A message map connects requests, responses, and faults for a specific operation. Data maps provide transformation between dissimilar types on a message map. Data Mapping is an existing function in IBM® Integration Bus. For more information, see Graphical Data Mapping in IBM Integration Bus documentation.

Assets associated with a service map

When a service map is installed to WebSphere Application Server, a business-level application (BLA) and two assets are automatically generated. The business-level application contains two composition units that link to the two assets. The two assets are:
Enterprise application
The service map enterprise application is used to make outgoing calls to the target services that are defined in the service map.
Enterprise bundle archive (EBA) asset
The service map EBA asset contains the files that make up the service map and is used for target service selection and message transformation.

The enterprise application and EBA asset are standard WebSphere Application Server assets that can be managed by an administrator. For example, an administrator can apply policy sets to configure WS-Security for the request that is sent to the target service. The assets can be deployed to specific WebSphere Application Server clusters and servers.

In service mapping, you can simplify management of the BLA, EBA, and the enterprise application when you are installing service maps by using either the administrative console or the command line. When you install a service map by using the installServiceMap command, use the following optional parameters to specify properties of the BLA:
Use this parameter to specify the clusters or servers on which to install the BLA.
Use this parameter to specify the endpoint addresses of the service map target services that are called from the service map enterprise application.
For more information, see installServiceMap command. You can also specify these properties if you install your service map by using the administrative console. For more information, see Service maps - Install.

After the service map is installed, use the showServiceMap command to find out the name of the BLA that is associated with the service map. You can also use the service map settings panel in the administrative console to view the details of the BLA. For more information, see showServiceMap command and Service map settings.