AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Área de texto enriquecido
  • Running a procedure on a SOAP server
SOAPRunXML (Example)
Running a procedure on a SOAP server
The following code is used to run a procedure on a SOAP server. This procedure, named "getTemp", returns the temperature of a city identified by its zip code.
// Define the variables
MessageXML is string
ResExecute is boolean
 
// Define the XML message of the "getTemp" procedure that
// returns the temperature of a city identified by its zip code
MessageXML = ...
"<SOAP-ENV:Envelope xmlns:SOAP-ENV="+ ...
"http://schemas.xmlsoap.org/soap/envelope/"+...
"xmlns:xsi=""http://www.w3.org/1999/XMLSchema-instance"""+ ...
"xmlns:xsd=""http://www.w3.org/1999/XMLSchema"">"+ ...
"SOAP-ENV:Body> "+...
"<ns1:getTemp xmlns:ns1=""urn:xmethods-Temperature"" SOAP-"+ ...
"ENV:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/"">"+ ...
"<zipcode xsi:type=""xsd:string"">94041</zipcode> "+ ...
"</ns1:getTemp> "+ ...
"</SOAP-ENV:Body> "+ ...
"</SOAP-ENV:Envelope>"
 
// Run the "getTemp" procedure
ResExecute = SOAPRunXML("http://services.xmethods.net:80"+ ...
  "/soap/servlet/rpcrouter", MessageXML)
 
// 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
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

Señalar un error o enviar una sugerencia | Ayuda local