ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / SOAP
  • Parameters of procedure to run
  • Type of parameter
  • Call to SOAPRun
  • Handling errors
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Warning
From version 2024, this function is kept for backward compatibility.
Runs a procedure on a SOAP server.
Remarks:
  • 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 web services.
// Define the parameters of the "Temperature" procedure that
// returns the temperature of a city identified by its postal code
SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType
// Run the "Temperature" procedure on a non-WINDEV server
ResExecute = SOAPRun("http://www.Temp.com/Degree", "Temperature", "urn:Temp-Degree")
Syntax

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:
http://user:password@ServerURL

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.
Remarks

Parameters of procedure to run

To pass parameters to a procedure executed on a SOAP server, WINDEV uses the following structure:
VariableTypeDetails
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:
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

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.

Handling errors

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: wd300com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/16/2024

Send a report | Local help