Web Service entity

A SOAP Web Service or JSON Web Service entity generates a web service with its CRUD operations, but with no accessible form. CRUD operations are used to Create, Read, Update, and Delete data from a database.

It includes one global read operation that reads all records in once and one global create operation that creates all records at once.

The XML representation of a SOAP Web Service entity is a .4ws file. The XML representation of a JSON Web Service entity is a .4wsj file.

See the topic Introduction to Web services in the Genero Business Development Language User Guide for more information on Web Services concepts.

Properties

The Type property is set to "WebService" for a SOAP Web Service entity, and "WebServiceJSON" for a JSON Web Service entity.

The Service Name property must be set, otherwise the Web Service will not execute. The Comment property is optional.

Implementing the Web Service

To implement a Web Service, right-click on the Web Service entity and select one of the following:
  • Implement Web Service: Creates a new blank managed Web service definition file to design from scratch.
  • Implement Web Service from Database: Provides a wizard to create a managed Web service definition file, allowing you to pick the columns to use in the CRUD operations. This option is generally preferred. The Web service can be modified after it is created.

When the Web service is implemented, an XML definition file (.4ws for SOAP or .4wj for JSON) is generated, as well as the .4gl source files containing the program logic to create and set up a web service and its CRUD operations. Any changes to the Web Service entity properties in the BA diagram or in the XML file (.4ws or .4wsj) are included in the subsequent re-generating of the program code.

The Web Service entity can be opened and edited in the Business Record; right-click the Web Service entity and select Open. For further details, see Business records (data sets).

Note:

A business record for a SOAP Web Service entity has additional Web Service properties. See the section on XML serialization in the Genero Business Development Language User Guide for more information.