ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help /  / 
  • Overview
  • Variable types automatically deserialized
  • Variable types not automatically deserialized
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Overview
In a REST Webservice, there can be entry points of various types: GET, POST, DELETE, etc.
The POST entry point receives a parameter, which can also be of various types: String, JSON, Binary buffer, etc.
Starting with version 23, this parameter is automatically passed to the WLanguage procedure linked to the entry point.
Deserialization is automatic depending on the type of parameter and does not require any code.
The REST web service creation wizard suggests the automatic deserialization of the request. For more details, see Creating and using a REST web service.
Variable types automatically deserialized
Deserialization is automatic during the following operations:
  • Assignment of values to ANSI strings (and to simple strings if the current configuration is ANSI). The received content is assigned directly to the string.
    Note: If the content received is in UTF-8, it is assigned directly to the string.
  • Assignment of values to a buffer. The received content is assigned directly to the buffer.
    The result is equivalent to calling WebserviceParameter with the paramBuffer constant.
  • Assignment of values to complex types (variant, array, associative array, structure and class), under certain conditions:
    • If the request is in JSON format, JSON deserialization is used. The type must be deserialized from JSON.
    • If the request is in XML format, the XML deserialization is used. The type must be deserialized from XML.
    • If the request is not in JSON or XML format, a specific error is displayed.
Variable types not automatically deserialized
Some variable types are not automatically deserialized because this operation may be complex or useless.
The following are not allowed:
  • Assigning values to numeric and boolean variables.
  • Assigning values to Unicode strings (and to strings in general if the current configuration is Unicode). A specific error is displayed.
  • All types not listed, including:
    • Untyped parameters.
    • Pascal, fixed and ASCIIZ strings.
    • DateTime and Duration types.
    • Advanced types.
    • Enumerations and combinations.
    • Requests, automation objects, .NET objects, composite variables, interfaces.
    • Variables of type File Description, Item Description, Link Description and Connection Description.
    • Variables of type Procedure, Control, Font, Point, Rectangle, etc.
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/23/2025

Send a report | Local help