SEEWARNING Before creating your site, it is advised to read the documentation:Before beginning.


The main function of the setup record 'Interface' is to identify and locate an X3 Web service by supplying:

  • its publication name or alias,
  • the data of the Web service server providing the service.

The interactions between an XTEND Web application and the X3 back office includes two service categories:

  • the services of type 'Access' describing the access to data,
  • the services of type 'Action'describing the User actions.

SEEWARNING The number of setups of Web services of type 'Access' or 'Sub-program access' is limited to 50.

In Web service mode, the X3 global variable GUSER contains the X3 User code set as a setup at the moment of the Web service call.

XTEND values the X3 User code depending on whether the User is logged in or not:

  • The XTEND User not logged in uses the X3 User code defined by default in the Web service pool,
  • The logged in XTEND User uses the X3 User code returned by the login function.

Interfaces of type 'Access'

The XTEND server does not have a direct access to the X3 database via a a database connector, but by calling up specialized Web services of type sub-program or left list.

The interfaces of type 'Access' make it possible to define these Web services working as data providers.

The Web services are called up by the tokens of type block.

Generated access to Table

Is used to generate automatically a Web service to access the recordings of a table of the X3 database:

1. Generation of a 4GL processing,

2. Creation of a record in the sub-program table,

3. Publication of the Web service.

The generated Web service can immediately be used on all Web service servers loading the folder.

Generated access to View

Same thing as for 'Generated access to Table', but concerns X3 views.

Left list access

Makes it possible to use the 'Left list' Web service of an X3 object as data source.

'Sub-program' access

The type 'Sub-program access' is generally used to add calculated fields to the fields of the table/view you want to access.

Example: add the availability and the product prices in a catalog.

In order to calculate the values of the 'calculated' fields, a 4GL processing must be run on the context setups coming in addition to those submitted to a standard processing by the XTEND server. For that purpose, setups AXPARCOD and AXPARVAL are used (see User actions).

Example: a Customer code or a quantity/date entered by the User.

Parameter grid 'Sub-program access'

This grid makes it possible to define the list of additional setups.
The value of setups of type 'Entry' is entered in the record of the token dynamic link or block.

SEEWARNING Unlike the User actions, the sub-program access does not make it possible to anter the mapping of setups.

The setup grid can be considered as a mapping on the list of setups AXPARCOD/AXPARVAL.

Optimizations

As for the Generated access to Table, calling Web services must sometimes be optimized to improve response times.

  • This grid is used by the developer to define (enter) his own optimization types.

  • The XTEND server values setup $OPTIMZE when calling the Web service.

  • The 4GL developer is responsible for the optimization processing taking into account the setup value.

Interfaces of type 'Action'

The interfaces of type 'User Action' make it possible to define Web services (4LG processings) having an effect on the X3 back-office data.

The interface 'Action' is associated with a record Web action is used to describe the setup mapping.

The Web actions are associated with the tokens of type dynamic link to be inserted in the graphical interface elements such as buttons (<input type="button" onClick="">) or anchors(<a href="button" onClick="">).

User action

An EXTEND User action always triggers the following: calling of an X3 Web service being either a sub-program or an action associated with an X3 object.

An XTEND action calls on setups on entry, carries out a processing and values a certain number of parameterson return such as calling a sub-program in 4GL.

In the case of an XTEND application, the setups on entry are generally entered by the User in an HTML form, and the values returned by the sub-programs are stored in memory in the User session (mapping) with the purpose of being displayed in an HTML page or used as setups for other actions.

Sub-program action

The 4GL processing must have been previously programed, and the sub-program record must have been created.

Once the interface has been created, the button 'Generate access' makes it possible to load the Web service.

X3 Object Action.

The code of the X3 action (Action button of the object) is entered in the Web action record.

Once the interface has been created, the button 'Generate access' makes it possible to load the Web service.

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

Header

Tab General

Interface general setups
The setups to enter depend on the interface type selected.

Tab Advanced

Tab Description

[Development screen]

Reports

By default, the following reports are associated with this function :

  PRTSCR : Screen print

This can be changed using a different setup.

Specific Buttons

Validation

This button is used to update the XTEND dictionary in XML format.

The X3WEB server takes into account only the dictionary with this format.

There is one XML file per dictionary.

For instance, the ACT.xml file corresponds to all the web actions for the current web site.

Copy

This button is used to copy an interface.