PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
New WINDEV, WEBDEV 23 feature!
  • Overview
  • Types of variables automatically deserialized
  • Types of variables not automatically deserialized
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
In a REST Webservice, an entry point can have several types: GET, POST, DELETE, ...
The POST entry point receives a parameter that can have different types: Text string, JSON, Binary buffer, ...
From version 23, this parameter is automatically passed to the WLanguage procedure linked to the entry point.
The deserialization is automatically performed according to the type of parameter used and no code is required.
The wizard for creating a REST Webservice proposes the automatic deserialization of request. See Creating and using a REST Webservice for more details.
Types of variables automatically deserialized
The deserialization is automatically performed during the following operations :
  • Assignment in ANSI strings (and string if the current configuration is ANSI). The received content is directly assigned in the string.
    Caution: if the received content is in UTF-8 format, it is directly assigned in UTF-8 in the string.
  • Assignment in a buffer. The received content is directly assigned in the buffer.
    The result is equivalent to a call to WebserviceParameter associated with the paramBuffer constant.
  • Assignment in complex types (variant, array, associative array, structure and class), under conditions:
    • If the request is in JSON format, the 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 neither in JSON format nor in XML format, a specific error is displayed.
Types of variables not automatically deserialized
Some types of variables are not automatically deserialized because this operation is not straightforward or because it has no meaning.
The followings are not allowed:
  • The assignment in the numeric types and the boolan type.
  • The assignment in UNICODE strings (and string if the current configuration is UNICODE). A specific error is displayed.
  • All unmentioned types, especially:
    • The untyped parameters.
    • The Pascal, fixed and ASCIIZ strings.
    • The DateTime and Duration types.
    • The advanced types.
    • The enumerations and combinations.
    • The requests, automation object, .NET object, composite variable, interface.
    • The File Description, Item Description, Link Description and Connection Description variables.
    • The Procedure, Control, Font, Point, Rectangle variables, ...
Minimum required version
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment