Dynamic Configuration of Some Communication Channel Parameters using Message Mapping
Now, with XI 3.0 SP16, these values plus many additional ones can also be dyanmically configured using mapping programs, e.g. Message Mapping. In addition, many of these parameters are not available for dynamic configuration by using the Communication Channel as you can do with filename and directory.
For example, for an HTTP Receiver Adapter, the URL can be dynamically assigned with Message Mapping. In addition, the HTTP Header fields can also be assigned within Message Mapping.
Another benefit of using Message Mapping is that the value to be assigned does not have to be in the payload of the XML message, as what the File Receiver Communication Channel configuration requires in the case of filename and directory.
How do we determine which parameters can be assigned with a mapping program? Well, they will be listed in each of the Communication Channel configuration section, “Adapter-Speocific Message Attributes”. Once the option, “Use Adapter-Speocific Message Attributes”, is checked, all the values will be displayed.
For the discussion here, we will use the HTTP Receiver Adapter as an example. We will assign a value to the HTTP header, DOCTYPE, using Message Mapping.
Here are the steps:
- Configure the HTTP Receiver Communication Channel.
In the section, “Adapter-Speocific Message Attributes”, check the options: “Use Adapter-Speocific Message Attributes” and “Apply HTTP Header Fields”. Enter “DOCTYPE” in “Field 1”. This will be the HTTP header name.
- Create a user-function in Message Mapping:
The source code is below:
(Please note “HeaderFieldOne” is the technical name for “Field 1” in the Communication Channel configuration. The namespace used is also specific to the adapter. Please reference help.sap.com for the namespace and technical names.)
- Use the user-function in Message Mapping:
HTTP_USER_AGENT:SAP Web Application Server (1.0;640)
User-Agent: SAP Web Application Server (1.0;640)
The header “DOCTYPE” is assigne the value “SalesOrder”.