ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / SOAP
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Builds the HTTP request to call a function of a web service. This request can be modified to adapt it to the expectations of the web service, 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)
// Get the request and execute it using the HTTPSend function
stParam1 is Param1
stParam1.String = "a string"
stParam1.Int = 2
cMyRequest is httpRequest = SOAPToHTTP(MyFunction, stParam1)
HTTPSend(cMyRequest)
WSRequest is wsRequest
AnHTTPRequest is httpRequest
AnHTTPResponse is httpResponse

BaseWS.Address = ...
"http://Server.mydomain.com/BASEWS_WEB/awws/BaseWS.awws"
AnHTTPRequest = SOAPToHTTP(BaseWS._Return__2_Param_type_string, 
WSRequest, "MyString1", "MyString2"
IF NOT ErrorOccurred() THEN
AnHTTPResponse is HTTPSend(AnHTTPRequest)
IF NOT ErrorOccurred() THEN
Info("HTTPSend(AnHTTPRequest) = '" + AnHTTPResponse.Content + "'")
ELSE
Error("HTTPSend(AnHTTPRequest).'" + ErrorInfo() + "'")
END
ELSE
Error("SOAPToHTTP().'" + 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 web service 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
Web services have a very wide spectrum and not all of them comply with the standard. The ease of use of a third-party web service 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 web service server. It is possible to modify the XML content, to adapt it to the expectations of the web service.
Component: wd300xml.dll
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help