This section describes how to map to an API instead of an Application Open Interface Table. Data for an inbound XML message is copied to a set of staging tables known as Application Open Interface tables. The data in these staging tables are validated using an Application Open Interface API containing the business rules. Valid data is moved to the Application base tables. Invalid data is marked for review.
In the case where the staging table and the validation rules are embedded in the same code (commonly referred to as the Application API), data for an inbound XML message is mapped to the parameters of the Application API.
To map directly to an Application API, the map must be defined as follows:
The data definition type for the source and target must be XML.
The source and target DTD and version must be the same.
Map the source levels to the target levels.
Define a target action for Execute Procedure referencing the Application API as the procedure name. The action is defined at the document level as a postprocess activity. Map the source variables to the API parameters. Include an action to check the API return status.
Apply this approach for each level of the document. If the document has three levels, this approach is applied three times.
Load the message map and corresponding DTDs into the XML Gateway repository for processing. Refer to How to Load/Delete Message Maps and DTDs to load the maps into the XML Gateway repository.
Define the trading partner and enable the XML message.
Define any necessary code conversions.
Message Designer does not support Application APIs consisting of multiple document levels. Message Designer is designed to process data one document level at a time.