PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
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
SOAPToHTTP (Function)
In french: SOAPVersHTTP
Builds the HTTP request to call a function of a Webservice. This request can be modified to adapt it to the expectations of the Webservice, if necessary. It can then be sent using HTTPSend.
// Appel classique utilisant l'appel complet à une méthode de Webservice
stParam1 is Param1
stParam1.Chaîne = "une chaîne"
stParam1.Entier = 2
stRet is MonResult
stRet = MaFonction(stParam1)
// Récupération du Buffer pour appel via la fonction SoapExécuteXML
stParam1 is Param1
stParam1.Chaîne = "une chaîne"
stParam1.Entier = 2
cMaRequête is httpRequest = SOAPToHTTP(MaFonction, stParam1)
HTTPSend(cMaRequête)
WSRequete is wsRequest
UneHTTPRequête is httpRequest
UneHTTPRéponse is httpResponse
 
WWSdebase..Address = ...
"http://Serveur.mondomaine.com/WWSDEBASE_WEB/awws/WWSdebase.awws"
UneHTTPRequête = SOAPToHTTP(WWSdebase._Renvoyer__2_Param_type_chaine,
WSRequete, "MaChaine1", "MaChaine2")
IF NOT ErrorOccurred() THEN
UneHTTPRéponse = HTTPSend(UneHTTPRequête)
IF NOT ErrorOccurred() THEN
Info("HTTPEnvoie(UneHTTPRequête) = '" + UneHTTPRéponse.Content + "'")
ELSE
Error("HTTPEnvoie(UneHTTPRequête).'" + ErrorInfo() + "'")
END
ELSE
Error("SOAPVersHTTP().'" + ErrorInfo() + "'")
END
Syntax
<Result> = SOAPToHTTP(<Function> [, <HTTP request to use>] [, <Parameter 1> [... [, <Parameter N>]]])
<Result>: httpRequest variable
httpRequest variable corresponding to the generated HTTP request.
<Function>: Character string
Name of the function for which the SOAP request must be built. This function is a WDSL function of the Webservice previously imported into the project.
<HTTP request to use>: Optional wsRequest variable
Name of the variable of type wsRequest that corresponds to an HTTP request with the additional information to be used.
<Parameter 1>: Optional variant
First parameter expected by the function.
<Parameter N>: Optional variant
Nth parameter expected by the function.
Remarks
Webservices have a very wide spectrum and not all of them comply with the standard. The ease of use of a third-party Webservice in an application or site depends on its designer. This function makes it possible to retrieve the content of the HTTP request that is sent to the third-party Webservice server. It is possible to modify the XML content, to adapt it to the expectations of the Webservice.
Component: wd270xml.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment