This topic describes the basics of mapping.
Mapping refers to the process of copying data
from a source location to a target location, and at the same time
converting the data from one type of data format to another. For example,
an inbound converter for a Web service provider copies and converts
data from locations in an inbound XML schema data structure to locations
in a COBOL or PL/I language structure. This language structure is
then passed to a CICS® application
as the input data.
Similarly, in the same scenario, when the same CICS application returns with its
output data in a COBOL or PL/I language structure, an outbound converter
for the Web service provider copies and converts the data from the
COBOL or PL/I language data structure to locations in the outbound
XML schema data structure.
A single mapping is a single instance of copying
and converting an item of data from XML schema structure to language
structure data, or from language structure to XML schema structure.
Such mappings are defined in the mapping editor.
Mapping is used only in meet-in-middle development
scenarios. The main steps in developing a meet-in-middle project are
as follows:
- Create a meet-in-middle project using a New <runtime> Project wizard.
- Import source files into the project using the Import
Source Files wizard.
- Create two mapping files using the Create Mappings wizard:
- A mapping file containing the inbound XML and COBOL (or PL/I)
data structures
- A mapping file containing the outbound XML and COBOL (or PL/I)
data structures
- Specify in each mapping file the source and target data elements.
- Generate resources for a runtime using the Generate <runtime> Resources wizard
(meet-in-middle wizard).
Mappings can be done for data structures stored in the following
types of files:
- COBOL source files (the file extension must be .cbl, .cob, .ccp,
or .cpy)
- PL/I source files (the file extension must be
.pli, .inc, or .map)
- XML content:
- WSDL documents (the file extension must be .wsdl)
- XML instance documents (the file extension must be .xml)
- XML schema (XSD) documents (the file extension must be .xsd)
Mappings are based on the following data models:
- The language data model for a COBOL or PL/I language
structure is expressed as an instance of the COBOL or PL/I Common
Application Metamodel (CAM).
- The XML data model for a given language structure is expressed
as an instance of the XML Schema model (whether it is an XML document,
WSDL types definition, or XML Schema representation).