This topic describes the conversion program
created by the Generate Conversion Code wizard.
The Generate Conversion Code wizard takes either
one or two mapping files as input and creates the following files
as output:
- A COBOL or PL/I source code file
- A WSBind file
- A log file
The generated COBOL or PL/I source code file contains
a program for converting data from XML format to an equivalent high-level-language
data structure, and also for converting data from a (possibly different)
high-level-language data structure to an equivalent XML format. This
program has three main procedures:
- A primary procedure receives conversion requests, calls one of
the other procedures to perform the actual conversion, and returns
the reformatted data.
- Two procedures perform the data format conversions. Each procedure
implements the conversion that was described in one of the two input
mapping files. Thus:
- One procedure converts data (for example, a customer ID and a
request for information about the customer) from XML format to a high-level-language
data structure (COBOL or PL/I).
- Another procedure converts data (for example, detailed customer
information) from a high-level-language data structure (COBOL or PL/I)
to XML format.
These conversion procedures can be used to enable
a Web service provider or requester to invoke and get data from an
existing CICS® application.
For example, in the case of a Web service provider:
- The Web service receives a request in XML format for information
about a particular customer ID.
- The Web service calls the conversion program to the convert the
request from XML format to the high-level-language format expected
by the existing CICS application.
- The Web service calls the CICS application,
passing it the request.
- The CICS application returns
with the requested information in a high-level-language data structure.
- The Web service calls the conversion program to convert the customer
information to XML format.
- The Web service returns the customer information to the remote
caller.