Create a REST Web Service

Restriction: This topic applies only when the Enterprise Server feature is enabled.

This section walks you through the process of creating a REST type Web service for the BookDemo application.

  1. From the Solution Explorer, right-click the ProgramCORS project; then click Add > New Item.
  2. Expand COBOL; then select Native.
  3. In the center pane, click Service Interface.
  4. In the Name field, type AccessBooks; then click Add.
  5. In the Type of interface field, select Web Service.
  6. Click the JSON transport type.
  7. In the Type of source field, select COBOL Program; then click OK.

At this point, Visual Studio adds the AccessBooks Web service to the Solution Explorer and invokes the Interface Mapper. You are now ready to define the details of the Web service.