Defining the request and response service interfaces
Define the service interface from one or more COBOL copybooks, PL/I includes files, or a
full program. A service interface defines the fields to expose for request and response
messages, and how these fields are made available to the API developers, such as with a more
descriptive field name.
Procedure
You can create a new service interface by importing a COBOL copybook, PL/I includes
file, or full program. You can also import an existing service interface from another service
project or the file system. An imported service interface file can be further modified for this
service project.
Important: Response service
interfaces cannot contain default values in fields. If a default value is specified for a response
service interface, an error is issued in the Problems view to assist problem
resolution.
Create a service interface or reuse an existing service interface in another service
project.
To create a new service interface:
Click Create Service Interface.
Specify a name for the service interface.
Click OK. The service interface
editor opens for you to
create the service interface.
In the service interface
editor, import the data structure or full program by clicking Import data structure (), or depending on the service type, right-click the COMMAREA, container, segment, or IBM® MQ message, and select Import data
structure.Figure 1. The service interface editor
To reuse an existing service interface from another project or the file system:
Click Import Service Interface.
Select an existing service interface file (.si file) from another project
in your workspace or from your file system, and click OK. Imported service
interface files can later be selected as the request or response service interface for the current
project.
Note: When you save the service interface, a copy of the service interface file of the same
name is saved in this service project. Although the new copy has the same file name as the original
one, they are separate copies. The original copy remains intact.
Optionally, customize the service interface. You can copy a data structure, specify the order
of the data structures, or add multiple containers or segments. You can also specify the fields to
include or exclude, rename fields or data structures, change field value type, specify default field
values, or add business descriptions.