Follow the rules described here when you define a proxy
function that is used to access a service.
Assume that the outline of a proxy function for service access
is as follows:
Function GetEmployeeDetail(employeeCode STRING IN,
employeeSalary FLOAT OUT,
employeeStatus STRING INOUT)
returns(myEmployeeRecordPart)
{}
end
If the prototype is used to access an EGL REST-RPC service, the
following rules apply:
- The prototype can include IN, OUT, and INOUT parameters.
- The data received and returned by the service is always in JSON
format. JSON cannot include HEX, BLOB, or CLOB data.
- The service always returns a JSON string. In a Rich UI application,
the EGL runtime code rounds any numeric data that is returned by the
service and is greater than 15 significant digits. The rounding does
not occur when JSON is returned to EGL-generated Javaâ„¢ code.
If the prototype is used to access a SOAP service, the prototype
can include IN, OUT, and INOUT parameters.
If the prototype is used to access a third-party REST service,
the following rules apply:
- The IN modifier is required for each parameter.
- If a parameter is used to construct the URI or the query string,
the following rules apply:
- The name of the parameter must match the name of the substitution
variable in the URI template.
- The data type of the parameter can be a primitive type or related
data item.
- If the requester is being generated to JavaScriptâ„¢, the primitive type must be
STRING or one the following types, which are assignment-compatible
with STRING: FLOAT, BIN, or one of the integer equivalents to BIN
(INT, SMALLINT, or BIGINT).
- If the requester is being generated to Java, any primitive type is valid other than
HEX, BLOB, or CLOB.
- If the REST service returns a JSON string to a Rich UI application,
the EGL runtime code rounds any numeric data that is returned by the
service and is greater than 15 significant digits. The rounding does
not occur when JSON is returned to EGL-generated Java code.
- The value of a representation parameter can be a string, one of
the previously mentioned assignment-compatible types, or a non-structured
Record part whose only fields fulfill the following rules:
- The field is of type STRING or is assignment-compatible with STRING.
- The field can be based on a Record part that includes only strings
(or assignment-compatible values) or other Record
parts. Records can be nested within records to any level.