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.
Open the BA Diagram.
Create the Web Service Server entity by right-clicking on the background of the
diagram and selecting New > JSON Web Service Server.
Implement the Web Service Server.
Right-click on the Web Service Server and select Implement JSON Web Service Server.
Name and save the Web Service Server in your project.
Create the Web Service entity.
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
Set the Service Name property.
Important:
The web service will not execute without a service name.
Implement the Web Services.
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.
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).
Name and save the Web Service in your project.
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.