Help / WLanguage / WLanguage functions / Communication / SOAP
  • Parameters of procedure to run
  • Type of parameter
  • Call to SOAPRun
  • Error handling
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
From version 2024, this feature is no longer available.
Runs a procedure on a SOAP server.
  • The procedure parameters must be specified before using SOAPRun via the SOAP structure (see the Notes).
  • This function does not support non-Latin languages.
  • This function is meant for advanced users, to handle special cases. In most cases, we recommend importing the wsdl file of the SOAP web service. For more details, see Importing/Consuming Webservices.
// Define the parameters of the "Temperature" procedure that
// returns the temperature of a city identified by its zip code
SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType
// Run the "Temperature" procedure on a non-WINDEV server
ResExecute = SOAPRun("", "Temperature", "urn:Temp-Degree")

Running a procedure on an ordinary SOAP server Hide the details

<Result> = SOAPRun(<URL of SOAP server> , <Procedure name> [, <Procedure Namespace> [, <Procedure action> [, <Encoding style>]]])
<Result>: Boolean
  • True if the communication was established with the SOAP server,
  • False otherwise. To get more details on the error, use ErrorInfo.
<URL of SOAP server>: Character string
URL of SOAP server to contact. This parameter is supplied in the documentation of SOAP server.
To submit a request with authentication, this parameter must correspond to:

The port can also be specified in the following syntax: http://user:password@ServerURL:port
<Procedure name>: Character string
Name of procedure that will be run on the specified SOAP server. This parameter is supplied in the documentation of SOAP server.
<Procedure Namespace>: Optional character string (mandatory for a WINDEV SOAP server)
Namespace of procedure to run. This parameter is supplied in the documentation of SOAP server.
<Procedure action>: Optional character string
Action of procedure (also called "SOAPAction"). This parameter is supplied in the documentation of SOAP server.
<Encoding style>: Optional character string
Encoding style of procedure (also called "EncodingStyle"). This parameter is supplied in the documentation of SOAP server.

Parameters of procedure to run

To pass parameters to a procedure executed on a SOAP server, WINDEV uses the following structure:
SOAP.NameSpaceOptional character string"NameSpace" of parameter.
SOAP.NameCharacter stringParameter name
SOAP.XMLParamOptional character stringFull parameter description in XML format. The other parameters (Value, Name, Type, NameSpace and EncodingStyle) are ignored if this parameter is specified.
SOAP.EncodingStyleOptional character stringEncoding style of parameter.
SOAP.TypeConstantType of parameter
SOAP.ValueAny typeParameter value
This structure must be used for each parameter. For example:
SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType
This structure is equivalent to:
SOAP.XMLParam[1] = <ZipCode xsi:type="xsd:string">94010</ZipCode>

Type of parameter

The type of parameter can be:
SOAPHexBinaryTypeHexadecimal binary
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)
SOAPUnsignedByteTypeUnsigned byte
SOAPDoubleTypeDouble real
SOAPAnyURITypeURL address

Call to SOAPRun

After the call to SOAPRun:
  • The procedure parameters are deleted.
  • The structure of the header specified with SOAPAddHeader is deleted.
  • SOAPGetResult returns the result of the procedure run.
  • SOAPError returns the error message of the procedure run.

Error handling

SOAPRun returns False if no communication was established with the SOAP server. To get more details on the error, use ErrorInfo with the errMessage constant.
Caution: SOAPRun can return False with a correct result if this one contains the ":fault" text.
Special case: "405 Method not allowed" error
This error means that the "/.soap" string is missing at the end of the URL of the SOAP server powered by WINDEV. This error can also occur if the Web server is not configured to use the WINDEV SOAP server.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 9
This page is also available for…
Click [Add] to post a comment

Last update: 09/07/2023

Send a report | Local help