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.


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.

  1. Create a service interface or reuse an existing service interface in another service project.
    • To create a new service interface:
      1. Click Create Service Interface.
      2. Specify a name for the service interface.
      3. Click OK. The service interface editor opens for you to create the service interface.
      4. In the service interface editor, import the data structure or full program by clicking Import data structure (Icon for importing the 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
        Image shows the service interface editor, where you can import the data structure by clicking the icons or right-click the field and select Import data structure.
        For more information, see Importing data structures or full programs.
    • To reuse an existing service interface from another project or the file system:
      1. Click Import Service Interface.
      2. 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.
  2. 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.
    For more information, see Customizing the service interface.
  3. Save your changes.


The service interface file (.si file) is saved in the service-interfaces/ folder in your service project.