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
  • Executing the procedure (syntax 4, kept for backward compatibility)
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
Adds a header to the next SOAP function of a web service to run.
The added header can contain additional parameters affecting the SOAP request. In most cases, the information added into the headers does not directly represent the parameters of the Webservice function but meta information such as the authentication information for example.
Remark: The SOAP function will be run by a call to SOAPRun or SOAPRunXML.
Example
// Ajout d'un entête à la prochaine procédure SOAP exécutée
// Cet entête permet de vérifier le niveau de sécurité utilisée par le serveur SOAP
// Si le niveau de sécurité maximum n'est pas utilisé,
// la prochaine procédure SOAP ne sera pas exécutée
SOAPAddHeader("Sécurité", "SécuritéMax", "Sécurité-Niveau", True)
Syntax

Customizing the header of the web service Hide the details

SOAPAddHeader(<Web service name> , <Element to add into header>)
<Web service name>: Webservice
Name of web service to use. The Web service name is displayed in the "Project Explorer" pane, in the "Imported Webservices" folder..
<Element to add into header>: Simple or complex type
Variable of the same type as the header to insert into the call to the web service method. The different types have been retrieved when importing the WSDL file.
This element is added into the header whenever a SOAP function of the web service is called.

Adding a header for a specific web service Hide the details

SOAPAddHeader(<Web service name> , <Parameter name> , <Parameter value> , <Parameter namespace>)
<Web service name>: Webservice
Name of web service to use. The Web service name is displayed in the "Project Explorer" pane, in the "Imported Webservices" folder.
<Parameter name>: Character string
Name of additional parameter.
This additional parameter is used to check an information specific to the SOAP server.
This parameter is supplied in the documentation of the SOAP server and its functions.
<Parameter value>: Any type
Value of additional parameter.
The possible values are supplied in the documentation of the SOAP server and its functions.
<Parameter namespace>: Character string
Namespace of parameter.
This parameter is supplied in the documentation of the SOAP server and its functions.
Android Not available for Android applications

Adding a node to a specific SOAP web service header Hide the details

SOAPAddHeader(<Web service method> , <Node>)
<Web service method>: wsRequest variable
Name of the wsRequest variable that corresponds to the web service method to be used.
<Node>: xmlNode variable
Name of the xmlNode variable that corresponds to the node to be added in the SOAP header.
Android Not available for Android applications

Adding a header (syntax kept for backward compatibility) Hide the details

SOAPAddHeader(<Parameter name> , <Parameter value> , <Parameter namespace> [, <Procedure execution>])
<Parameter name>: Character string
Name of additional parameter.
This additional parameter is used to check an information specific to the SOAP server.
This parameter is supplied in the documentation of the SOAP server and its functions.
<Parameter value>: Any type
Value of additional parameter.
The possible values are supplied in the documentation of the SOAP server and its functions.
<Parameter namespace>: Character string
Namespace of parameter.
This parameter is supplied in the documentation of the SOAP server and its functions.
<Procedure execution>: Optional boolean
  • True: the procedure must not be run if the SOAP server cannot process the header (mandatory header).
  • False: the header is ignored by the execution of the procedure (optional header).
Remarks

Executing the procedure (syntax 4, kept for backward compatibility)

You have the ability to run (or not) the next SOAP procedure by adding a header. To do so, <Procedure execution> must be initialized to True.
If <Procedure execution> is initialized to True:
  • SOAPRun (or SOAPRunXML) returns True if the connection with the SOAP server was established, False otherwise.
  • If the connection with the SOAP server was established and if the SOAP server fulfills the conditions requested by the header, the procedure is run.
  • If the procedure was run, SOAPGetResult returns:
    • the result of the procedure if the procedure was successfully run,
    • an empty string ("") if the procedure failed.
  • If the procedure failed or if it was not run, SOAPError returns:
    • the "MustUnderstand" error code if the SOAP server does not fulfills the conditions requested by the header,
    • an error in the other cases.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 02/03/2024

Send a report | Local help