Configuring service archives

You can add the zosconnect_services element to server.xml and configure where service archive files for the REST client service provider are stored.

You copy a service archive (.sar) file into a directory where it can be accessed during API development. The definition of the service must be added to the server.xml configuration file before it can be used.

The zosconnect_services element in the configuration file defines the IBM® z/OS® Connect services to be deployed. For example,

<zosconnect_services location="/var/zosconnect/services" updateTrigger="polled" pollingRate="100ms">
 <service name="AddCustomer" />
 <service name="InquireCustomer" />
 <service name="UpdateCustomer" />

The server.xml configuration file can contain the following elements:

  • Only one zosconnect_services element is allowed.
  • The location parameter is optional and specifies where the service archive files are deployed. If it is not defined, the ${server.config.dir}/resources/zosconnect/services directory is used as the service archive file installation directory. When the server is started, all the service archive files are deployed in the server.
  • The updateTrigger parameter is optional and controls when IBM z/OS Connect is notified about changes in the services directory. The default value of the updateTrigger parameter is disabled. For more information, see zosconnect_services in the Reference section.
  • One or more service elements can be contained in the zosconnect_services element.
  • Supports other optional attributes that, for example, can be used to define authentication, authorization, or interceptors specific to a service. For more information, see Configuration elements.
  • The attributes adminGroup, invokeGroup, operationsGroup, readerGroup, requireAuth, and requireSecure are available to specify authentication and authorization for a service. For more information, see Securing IBM z/OS Connect resources.
  • The attributes interceptorsRef and runGlobalInterceptors are available to specify interceptors for a service. For more information, see Configuring API-specific interceptors.
  • One or more property elements can be contained in the service element.
  • Defines optional properties for the service provider.
  • Properties can only be defined by editing the server.xml file.
  • Properties remain in the configuration file after the service archive file is moved or deleted.

Collection ID and connection reference can be specified in server.xml to override the service archive properties in different server environments. For more information, see Overriding Db2 service properties in the server configuration.