5.5.1 Defining the stock management service adapter

Use the WSDL file for the stock management service (InventoryManagementService.wsdl) to define the stock management service adapter. The following table shows the values that you need to set when defining the stock management service adapter.

Table 5-5 Values that need to be set when defining the stock management service adapter

ItemValue to be setDescription
Service component typeWeb ServiceSpecify the type of service adapter that is set according to the type of service component to be called. Because the service component type of this sample program is a Web Service, also specify Web Service as the service adapter type.
Service nameStockManagementSpecify the name of the service adapter.
WSDL fileInventoryManagementService.wsdlThe WSDL file defines the method of writing what functions the Web Service has and what requests you need to send to use those functions, etc. Use the WSDL file for the stock management service (InventoryManagementService.wsdl) to create the stock management service adapter.
Port specificationInventoryManagerSpecify the port of the stock management service adapter.
Service IDInvAdpSpecify the ID of the stock management service adapter.
Client definition filec4webcl.properties
(This file contains the following entry: c4web.logger.log_file_prefix=InventoryManagementService)
The client definition file controls the client-side behavior. The user creates this file with the name c4webcl.properties.
This sample program provides a client definition file that sets InventoryManagementService as the prefix of the trace file and application log.
Note:
For details about the location of each file, see A.3 Configuration of the HelloProductArrangement sample program.

 

The following is the procedure for adding and defining the stock management service adapter.

  1. In the tree view, select and right-click Service Definition List, and then select Add Service Adapter.
    The dialog box for setting the type of service to be used from the service adapter to be added appears.
  2. From the drop-down list, select Web Services, and then click the Next button.
    The dialog box for entering the information that is necessary for adding a SOAP adapter appears.
  3. Enter StockManagement as the service name, specify InventoryManagementService.wsdl as the WSDL file, and then click the Next button.

    [Figure]

    The dialog box for specifying the port appears.
  4. From the Specification of Port drop-down list, select InventoryManager, and then click the Finish button.

    [Figure]

    A service adapter named StockManagement service adapter is created, and then the service adapter definition window appears.
  5. In the service adapter definition (standard) window, change the service ID to InvAdp.

    [Figure]

  6. In the service adapter definition (details) window, click the Browse button, and then specify c4webcl.properties as the client definition file.
    For the HelloProductArrangement sample program, the location of the above file is as follows:
    service-platform-installation-directory\CSCTE\Samples\ProductStock\Service\InventoryManagementService\c4webcl.properties
  7. From the menu, select File, and then Save.