Show TOC

Basic Concepts of Consumer MappingsLocate this document in the navigation structure

Use

When working with consumer mappings, you have to keep in mind the properties of the consumer proxy. Depending on the type of operation, only a request or a request/response pattern must be mapped, and the mapping either runs in coupled or decoupled mode.

Mappings for Asynchronous and Synchronous Operations

An operation mapping is used to handle a single operation of the source consumer proxy. There are two general kinds of operations, asynchronous and synchronous.

Asynchronous operations produce one-way messages. Therefore, for each operation of the source consumer, only the request message must be mapped to one or more request messages of the target consumer or target consumers. If an asynchronous mapping is used to map to more than one target consumer, this produces a message split.

A synchronous operation refers to a request, a response, and in some cases one or more fault messages. Therefore, you have to define a mapping for both request and response messages. If fault messages are used, you also have to define mappings for the fault operations. The operations of the target consumer must be synchronous as well.

Mappings for Coupled and Decoupled Consumers

A consumer proxy with asynchronous operations can either be defined to run within the application program context (in coupled mode) or later in a separate context (in decoupled mode, with an asynchronous border). The consumer mapping inherits this property from the consumer proxy implicitly. This has the following consequences:

  • Coupled mapping

    Coupled mapping is executed in the application program context without an asynchronous border in between. This offers the chance to access the application data in the mapping implementation, and to use it for the request message assembly of the target consumer, without the need to pass the data to the mapping implementation using the source consumer request messages. It may only require passing certain IDs or handles to have a reference to the relevant data or business objects within the application context. It also means that the error handling is carried out within the application.

  • Decoupled mapping

    Decoupled mapping is executed in a separate context at a later point in time, with an asynchronous border between the call of the consumer proxy in the application and the mapping. This means that the mapping implementation cannot access the application data. So all data required for the assembly of the target consumer request message must be passed into the mapping implementation using the source consumer request message, as long as they cannot be retrieved from other global sources (for example, a data base or a shared memory). This makes the decoupled mapping less flexible with respect to future enhancements of the service interface. Also, errors are handled separately in the message monitor.

This property has an impact on the design of the consumer proxy, since, for example, a request message either contains all application data, or only an individual item such as an ID. In coupled mode, the request message type of the source consumer can be quite generic, which means that it offers maximum flexibility to mappings for future enhancements of the service interface. In decoupled mode, all data that are required for the Web service provider must be passed into the mapping implementation.