Webservice entity

Web services are a standard way of communicating between applications over an intranet or Internet. They define how to communicate between two entities: a server that exposes services and a client that consumes services.

A Webservice 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.

A standalone Webservice entity is represented as a 4ws file which can be opened and edited in the Form Designer Records tab. When a Webservice entity is implemented from the diagram, the 4ws file is created as well as 4gl source files containing the program logic to create and set up a web service and its CRUD operations. Any changes to the Webservice entity properties in the BA diagram or in the 4ws file 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 Webservice entity

Select the Webservice entity in the Business Application diagram to view and set the entity properties.

Table 1. Webservice entity Properties, Object Category
Group Property Description
Object Name Name of entity.
  Type Type of entity:
  • WebService (for a SOAP Webservice).
  • WebServiceJSON (for a JSON Webservice).
  File Name Full path to file.
  Description Description of web service.
Web Service Service Name Unique publishable service name.
  Comment Service comment that will appear in the wsdl file.

Contextual menu for the Webservice entity

Right-click a Webservice entity in the diagram to display a context menu of options.

Table 2. Webservice entity context menu options (partial listing)
Menu Option Description
Implement Web Service Creates a new blank managed web service definition file (4ws) 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 (4ws), 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 Webservice entity.
Convert to Converts entity from one type to another.
Locate in Project Locates and highlights the selected item in the project.

Webservice entity Business Record

Once the Web service definition file (.4ws) exists, right-click the Webservice entity and select Open to view the Business Record diagram.

In the Structure view, select the Root node. All Web services share the same set of properties in the Root node.
Object group
name, databaseName
In the Structure view, select a Record node. All Web services share the same Record node properties for the following groups:
Object group
name
Modeling group
active, masterTable, unique key
Query group
query
Functionality group
canDisplay, canAdd, canModify, canDelete, canSearch
For the same Record node, however, only SOAP Web services contain the properties that provide for XML and XSD Schema Serialization attributes:
Web Service group
XMLAll, XMLSequence, XMLList, XMLElementNamespace, XMLAttributeNamespace, XSTypename, XSTypenamespace
See the section on XML serialization in the Genero Business Development Language User Guide for more information.
In the Structure view, select a RecordField node. All Web services share the same RecordField node properties for the following groups:
Object group
name
Modeling group
lookup
Field group
fieldType, sqlTabname, colName, fieldIdRef, dataType
Web Service group
public
Miscellaneous group
defaultValue
For the same RecordField node, however, only SOAP Web services contain the properties that provide for XML and XSD Schema Serialization attributes:
Web Service group
XMLOptional, XMLElement, XMLAttribute, XMLName, XSDType, XSDLength, XSDMinLength, XSDMaxLength, XSDEnumeration, XSDWhiteSpace, XSDPattern, XSDMinInclusive, XSDMaxInclusive, XSDMinExclusive, XSDMaxExclusive, XSDTotalDigits, XSDFractionDigits
See the section on XML serialization in the Genero Business Development Language User Guide for more information.