PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Running a procedure on a SOAP server
SOAPError (Example)
Running a procedure on a SOAP server
The following code is used to run a procedure on a SOAP server. This procedure, named "Temperature", returns the temperature of a city identified by its zip code.
// Define the variable
ResExecute is boolean

// Define the parameters of the "Temperature" procedure that
// returns the temperature of a city identified by its zip code
SOAP.Value[1] = 94010
SOAP.Name[1] = "ZipCode"
SOAP.Type[1] = SOAPStringType

// Run the "Temperature" procedure
ResExecute = SOAPRun("http://www.Temp.com/Degree", "Temperature", "urn:Temp-Degree")
// Is the communication with the server successful?
IF ResExecute = True THEN
    // Is the procedure successfully run?
    IF SOAPGetResult(SOAPResult) <> "" THEN
      // Display the result returned by the procedure
      Info("The temperature is: " + SOAPGetResult(SOAPResult))
  ELSE
      // Display the error returned by the SOAP server
      Error(SOAPError(SOAPErrMessage))
  END
ELSE
  Error(ErrorInfo(errMessage))
END
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment