JSON Web Service entity
A 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.
For a JSON Web Service entity, the Type property states "WebServiceJSON". The XML representation of a JSON Web Service entity (the Web service definition file) is a .4wsj file.
The Web Service entity can be opened and edited in the Form Designer Records tab. When a Web Service entity is implemented from the diagram, both the XML file (.4ws or .4wsj) and the .4gl source files containing the program logic to create and set up a web service and its CRUD operations are created. 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 generated code can be customized.
See the topic Introduction to Web Services in the Genero Business Development Language User Guide for more information on Web Services concepts.
Properties of the Web Service entity
Select the Web Service entity in the Business Application diagram to view and set the entity properties.
Group | Property | Description |
---|---|---|
Object | Name | Name of entity. |
Type | Type of entity:
|
|
File Name | Full path to file. | |
Description | Description of web service. Optional. | |
Web Service | Service Name | Unique publishable service name. Important: The web service will not execute
without a service name. |
Comment | Service comment that will appear in the wsdl file. |
Context menu for the Web Service entity
Right-click a Web Service entity in the diagram to display a context menu of options.
Menu Option | Description |
---|---|
Implement Web Service | Creates a new blank managed Web service definition file to design from scratch. Note: Once
created, this menu option disappears; use Open for any future modifications. |
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. Note: Once created, this menu option disappears; use Open for any
future modifications. |
Open | Open the Business Record for the selected Web Service entity. |
Convert to | Converts entity from one type to another. |
Locate in Project | Locates and highlights the selected item in the project. |
Web Service entity Business Record
Once the Web service definition file (.4ws or .4wj) exists, right-click the Web Service entity and select to view the Business Record diagram.
- Object group
- name, databaseName
- Object group
- name
- Modeling group
- active, masterTable, unique key
- Query group
- query
- Functionality group
- canDisplay, canAdd, canModify, canDelete, canSearch
- Object group
- name
- Modeling group
- lookup
- Field group
- fieldType, tableName, colName, fieldIdRef, dataType
- Web Service group
- public
- Miscellaneous group
- defaultValue
See the section on XML serialization in the Genero Business Development Language User Guide for more information.