PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Returning a value from a WINDEV SOAP server to a SOAP client
  • Returning a result without encoding it
  • Preset SOAP types
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
SOAPEncodeResult (Function)
In French: SOAPEncodeRésultat
Allows you to configure the format of the value returned by the WINDEV SOAP server to the SOAP client program. By default, the WINDEV SOAP server returns simple data only (character string, integer, boolean, ...).
Types specific to the SOAP protocol are returned by SOAPEncodeResult to the SOAP client.
Caution: This function can only be used in a WINDEV "SOAP Server" application.
Versions 22 and later
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 22
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WEBDEV - Server codeLinux This function is now available for the WEBDEV sites in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Example
RESULT SOAPEncodeResult(5, SOAPIntType)
// Same as RESULT 5 used in the code of the SOAP server.

RESULT SOAPEncodeResult(myVariable, "mytype")
Syntax
<Result> = SOAPEncodeResult(<Value to Encode> , <Type> [, <Namespace> [, <Encoding Style>]])
<Result>: Character string
Value encoded according to the specified parameters.
<Value to Encode>: Character string (with quotes)
Value to encode according to the specified parameters.
<Type>: Constant or character string
Type of the result to return. Can be:
  • a character string used to specify a specific type.
  • a preset SOAP type (see the notes)
<Namespace>: Optional character string (with quotes)
Namespace of the value to return.
<Encoding Style>: Optional character string (with quotes)
Encoding style of the value (also called "EncodingStyle"). This parameter can correspond to any namespace defined in the WSDL.
Remarks

Returning a value from a WINDEV SOAP server to a SOAP client

By default, to return a value from a WINDEV SOAP server, the RESULT keyword can be used in the different functions of the SOAP server.
For example:
RESULT 5
RESULT "Result String"
To return specific types (other than WINDEV types), you must use SOAPEncodeResult.
For example:
RESULT SOAPEncodeResult(5, SOAPIntType, "urn:myNameSpace")
Note: The following code line:
SOAPEncodeResult("value", "type", "space", "style")
generates a response envelope such as:
<PROJECTNAMEResponse xmlns="namespace of PROJECTNAMEResponse" SOAP-ENV:encodingStyle="style">
<PROJECTNAMEResult xmlns:ns2="style" xsi:type="ns2:type">value</PROJECTNAMEResult>
</PROJECTNAMEResponse>

Returning a result without encoding it

SOAPEncodeResult used on a WINDEV SOAP server returns an "encoded" result. However, a string can be returned directly without being encoded. In this case, the XML string must be valid and it must contains one of the two sub-strings below:
  • "xmlns:"
  • </return>. In this case, the XML code must be enclosed between <return> and </return>. These tags must be removed when receiving the result.
    Caution: The XML is case sensitive: only the </return> tag in lowercase characters is recognized.
On the client side, you must use SOAPGetResult associated with the SOAPXMLResult constant.

Preset SOAP types

The SOAP types are as follows:
ConstantType
SOAPBase64BinaryTypeBinary
SOAPHexBinaryTypeHexadecimal binary
SOAPBooleanTypeBoolean
SOAPStringTypeCharacter string
SOAPNormalizedStringTypeCharacter string without carriage return (CR) and without tabulation (TAB)
SOAPDecimalTypeAny number without limit
SOAPIntTypeInteger included between - 2 147 483 648 and + 2 147 483 647)
SOAPShortTypeShort integer
SOAPUnsignedShortTypeUnsigned short integer
SOAPIntegerTypeInteger (no limit)
SOAPLongTypeLong integer
SOAPUnsignedLongTypeLong unsigned integer
SOAPNegativeIntegerTypeNegative integer (except 0)
SOAPNonNegativeIntegerTypeNon-negative integer
SOAPNonPositiveIntegerTypeNon-positive integer
SOAPUnsignedIntTypeUnsigned integer
SOAPPositiveIntegerTypePositive integer (except 0)
SOAPByteTypeByte
SOAPUnsignedByteTypeUnsigned byte
SOAPFloatTypeReal
SOAPDoubleTypeDouble real
SOAPAnyURITypeURL address
Components
WINDEVWEBDEV - Server codeReports and Queries wd230com.dll
Windows Mobile wp230com.dll
Linux wd230com.so
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment