Map to an Existing Service Interface (meet-in-middle) wizard

Use the Map to an Existing Service Interface wizard to generate Web service files from source and target XML schema definitions and high-level-language data structures for request mapping and response mapping.

Overview

The steps for generating service interface files in the meet-in-middle development scenario are as follows:
  1. Generate an initial request mapping session file that contains a source XML schema definition and a target high-level-language data structure.
  2. Generate an initial response mapping session file that contains a source high-level-language data structure and a target XML schema definition.
  3. In the request mapping session file, specify the field-to-field mappings between the source XML schema definition and the target high-level-language data structure.
  4. In the response mapping session file, specify the field-to-field mappings between the source high-level-language data structure and the target XML schema definition.
  5. Generate service interface files from the request mapping session file and the response mapping session file.
The following table shows the same steps with additional detail:
Step: Development tool: Input files containing source data structure and target data structure: Files generated: Link:
Source: Target:
1) Generate a request mapping session file. Create Mappings wizard XML, XSD, or WSDL (See Note 1) CBL Request mapping session file 1. Generate a request mapping session file
2) Generate an response mapping session file. Create Mappings wizard CBL XML, XSD, or WSDL (See Note 2) Response mapping session file 2. Generate a response mapping session file
3) Specify the field-to-field mappings in the request mapping session file: Mapping editor Request mapping session file Request mapping session file (with mappings) 3. Create data mappings in the request mapping session file
4) Specify the field-to-field mappings in the response mapping session file: Mapping editor Response mapping session file Response mapping session file (with mappings) 4. Create data mappings in the response mapping session file
5) Generate the service interface files: Map to an Existing Service Interface (meet-in-middle) wizard
  • Request mapping session file (with mappings)
  • Response mapping session file (with mappings)
Web service files (See Note 3): .cbl .wsbind .wsdl .xml 5. Generate service interface files
Note:
  1. For the Web Services for CICS® runtime, the source file for an request mapping must be a .WSDL file (cannot be an XSD file or an XML file).
  2. For the Web Services for CICS runtime, the target file for an response mapping must be a .WSDL file (cannot be an XSD file or an XML file).
  3. The number and types of the Web service files that are generated depends on the target runtime environment.

Overview of the wizards

In Steps 1 and 2 of the meet-in-middle development scenario, you run the CreateMappings wizard twice, with different inputs, to generate the following files:
  • An request mapping session file.
  • An response mapping session file.

In Steps 3 and 4 you use the mapping editor to set up mappings in each mapping session file.

In Step 5, you run the Map an Existing Service Interface (meet-in-middle) wizard. This wizard takes the request and response mapping session files as input and generates source files and control files for a Web service.

The CreateMappings wizard and the Map an Existing Service Interface (meet-in-middle) wizard are available in only one of the three contexts described previously (see Contexts for starting the single-service wizards).

That context is a project other than an Enterprise Service Tools single-service project that contains the proper source files, such as a local z/OS® project in the z/OS Projects perspective.

The following table summarizes this information:
Wizard: View: Type of project:
Create Mappings wizard Any view in which the project is displayed.
  • A project other than an Enterprise Service Tools single-service project that contains the proper source files.
  • For example, a local z/OS project in the z/OS Projects perspective.
Map an Existing Service Interface (meet-in-middle) wizard Any view in which the project is displayed.

Files types for the source and target entities in request or response mapping session files

A mapping session file, whether it is a request mapping session file or a response mapping session file, always describes a transfer of data between a high-level-language data structure and an XML schema definition. The XML schema definition can be derived from: (a) an XML schema definition in an XSD file; (b) an XML schema definition in a WSDL file; or (c) an element in an XML instance document (XML file).
  • A request mapping session file must describe a transfer of data from an XML schema definition to a high-level-language data structure.
  • A response mapping session file must describe a transfer of data from a high-level-language data structure to an XML schema definition.

The high-level-language data structure must be located in a COBOL file (extension .cbl, .cob, .cpy, or .ccp).

The type of file from which the XML schema definition can be taken or derived depends on the host runtime environment for which the service-interface-output files are being generated:

  • If the host runtime environment is Web Services for CICS, then the XML schema definition must be taken from a WSDL file. (The Web Services for CICS runtime requires a WSBind file, which can be generated from information in the WSDL file.)
  • If the host runtime environment is XML Transformation for CICS, this runtime is not supported for the meet-in-middle development scenario.
  • If the host runtime environment is one of the other runtime environments (IMS Enterprise Suite SOAP Gateway, or Batch, TSO, and z/OS UNIX System Services) then the XSD schema definition can be taken from a WSDL file or an XSD file, or can be derived from an XML schema instance document (XML file).
Table 1. Summary of File Types for the Source and Target Entities when Mapping (Request or Response)
Runtime: Request mapping - type of file required for data definition: Response mapping - type of file required for data definition:
Source: Target: Source: Target:
Web Services for CICS WSDL .cbl, .cpy, .cob,, .ccp .cbl, .cpy, .cob, .ccp WSDL
XML Transformation for CICS NOT SUPPORTED NOT SUPPORTED NOT SUPPORTED NOT SUPPORTED
  • IMS Enterprise Suite SOAP Gateway
  • Batch, TSO, and z/OS UNIX System Services
WSDL, XML, XSD .cbl, .cpy, .cob, .ccp .cbl, .cpy, .cob, .ccp WSDL, XML, XSD

Types of Web service generated - service provider or service requester

You can generate a service provider for any of the supported runtime environments. But you can generate a service requester only for the Web Services for CICS runtime environment or the IMS Enterprise Suite SOAP Gateway runtime environment.
Target runtime environment: Types of Web service generated:
Web Services for CICS:
  • Service provider
  • Service requester
IMS Enterprise Suite SOAP Gateway
  • Service provider
  • Service requester
XML Transformation for CICS Not supported in Meet-in-Middle scenario
Batch, TSO, and z/OS UNIX System Services
  • Service provider

Mapping

Mapping is the process of relating parts of two existing data structures to one another. Typically, the result of the mapping process is a generated runtime code that transforms and moves data between mapped elements. Enterprise Service Tools for mapping allow mapping between data structures defined by an existing XML schema definition (or some of its derivatives, such as XML instance documents) and data defined by an existing COBOL data structure.

For example, you might have a COBOL data structure named ACCOUNTINFO containing all the relevant information about an account, and you want to map just the address information from ACCOUNTINFO into an element of a complex type named AddressInfo in an XML schema definition. In this situation you want to create a mapping from certain fields in ACCOUNTINFO to certain fields in AddressInfo.

Request mapping means that the mapping that is done from (a) an XML instance document that a Web service receives; to (b) a high-level-language data structure that the Web service uses in some way.

For example, if the Web service is a service provider, then the Web service receives a request request containing an XML instance document, and the Web service maps the information in the XML instance document to a high-level-language data structure that the Web service then passes to a local application to process.

Response mapping means the mapping that is done from (a) a high-level-language data structure that a Web service acquires in some way; to (b) an XML instance document that the Web service sends out.