Create the JSON Web Service and Web Service Server in BAM

Use BAM entities to add JSON Web services to your application.

At minimum, a Web Service implementation requires a Web Service Server entity, at least one Web Service entity, and a relation between them. The JSON Web Service requires a Service Name. See Figure 1.

Figure: BA diagram for JSON Web Service

This figure shows a BA diagram for a JSON Web Service. It includes a JSON Web Service Server with a relation to a single JSON Web Service. The JSON Web Service is selected so that its properties display in the Properties pane. The Service Name property has a value of "JSONSuppliers".
  1. Open the BA Diagram.
  2. Create the Web Service Server entity by right-clicking on the background of the diagram and selecting New > JSON Web Service Server.
  3. Implement the Web Service Server.
    1. Right-click on the Web Service Server and select Implement JSON Web Service Server.
    2. Name and save the Web Service Server in your project.
  4. Create the Web Service entity.
    1. Right-click on the background of the diagram, select New and one of the following:
      • JSON Web Service
      • CRUD Form and JSON Web Service
      • Zoom Form and JSON Web Service
    2. Set the Service Name property.
      Important:

      The web service will not execute without a service name.

  5. Implement the Web Services.
    1. Right-click on the Web Service and select one of the Implement ... options.
      Note:

      The Implement from Database option provides a wizard to create a managed Web service definition file, allowing you to pick the columns to use in the operations. In general, it is recommended to use this option. The Web Service or Form with Web Service can be modified after it is created.

    2. Edit the business record as required. Functionality properties can be set on each record to specify whether the services operation of add, update, delete, and/or search should be generated. For further information, see Business records (data sets).
    3. Name and save the Web Service in your project.
  6. Draw a relation from the Web Service Server to each Web Service or Form with Web Service entity that are to be connected to the Web Service Server.
    Service publication is done by creating the relations between the server entity and the form with service or service standalone entities.

What to do next:

See Creating a client for a JSON Web service.