ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Communication / SOAP
  • Parameters of procedure to run
  • Type of parameter
  • Call to SOAPRun
  • Handling errors
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
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.
// Définition des paramètres de la procédure "Température" qui
// retourne la température d'une ville identifiée par son code postal
SOAP.Value[1] = 94010
SOAP.Name[1] = "CodePostal"
SOAP.Type[1] = SOAPStringType
// Exécution de la procédure "Température" sur un serveur non WINDEV
ResExécution = SOAPRun("http://www.Temp.com/Degré", "Température", "urn:Temp-Degré")
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://utilisateur:motdepasse@URLServeur

You can also specify the port using the following syntax: http://utilisateur:motdepasse@URLServeur: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] = "CodePostal"
SOAP.Type[1] = SOAPStringType
This structure is equivalent to:
SOAP.XMLParam[1] = <CodePostal xsi:type="xsd:string">94010</CodePostal>

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.
Warning: The SOAPRun function may return Faux with a correct result if it contains the text ":fault"..
Special case: Error "405 Method not allowed "
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: 09/21/2024

Send a report | Local help