Show TOC

Java Mapping of Adapter-Specific Message AttributesLocate this document in the navigation structure

Use

There is a header for adapter-specific message attributes in the message header of an XI message where sender adapters can write additional information in the message header. In this way sender adapters can write information that only becomes known at runtime into the message.

Developers can also get read and write access to adapter-specific attributes in a Java mapping program.

Integration

There are mapping rutime contants for XSLT programs (J2EE) and message mappings that developers can use to access to the same Java classes for mappings of adapter-specific attributes as in Java mapping programs. Mapping programs that are executed on the Integration Server supports this access.

There is a special interfaces for accessing ABAP Mappings (see interface documentation for interface IF_MAPPING_DYNAMIC_CONF).

Features

The key for accessing the value of an adapter-specific attribute is made up of a namespace and an attribute name that belongs to the adapter. There are, for example, the following attributes for the file adapter:

Example Attributes of the File Adapter

Adapter Namespace

Attribute Name

Attribute Value

http://sap.com/xi/XI/System/File

Directory

C:\tmp\

http://sap.com/xi/XI/System/File

FileName

test-input.xml

The adapter namespace comprises the namespace in the Enterprise Services Repository in which the Adapter Metadata for the adapter is saved and the name of the adapter metadata object. The adapter namespaces for the adapters shipped by SAP therefore have the following format:

http://sap.com/xi/XI/System/ <Adapter Metadata Object Name of Adapter>

The adapter metadata objects are in namespace http://sap.com/xi/XI/System of software component SAP BASIS .

Mapping API

The classes for accessing the adapter-specific attributes are part of the mapping API (package com.sap.aii.mapping.api ):

  • com.sap.aii.mapping.api.DynamicConfiguration Key

    Class to create a key object for an adapter-specific attribute. The key object consists of the adapter namenspace and the attribute name.

  • com.sap.aii.mapping.api.DynamicConfiguration

    Class to read, change, or delete the value of an adapter-specific attribute. You access the attributes in the methods using objects of DynamicConfigurationKey .

For more information on the Mapping API, see SAP Developer Network as of SAP NetWeaver '04 SPS14 under https://www.sdn.sap.com/irj/sdn/javadocs (SDN user required).

Adapter -Specific Attributes and Multi-Mappings

The question remains for a Multi-Mapping about how to deal with a variety of message headers with adapter-specific attributes. Basically, the Mapping API can only access one message header. This has the following consequences, depending on whether there are multiple source or target messages:

  • 1:n transformation

    If there are multiple target messages, the header for the adapter-specific attributes is copied for each message. You cannot create individual headers for the adapter-specific attributes for each message, but one header for all.

  • n:1 transformation

    This variant is only possible for multi-mappings in integration processes. If there is more than one source message, then it is not possible to have read-only access to the adapter-specific attributes of the different message headers at runtime.

  • m:n transformation

    The restrictions mentioned above apply here. Here, developers can write the same adapter-specific attributes for all target messages to the header without having to have read-only access the source message. m:n transformations are only supported in integrations processes.