AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones .Net
  • The different types of results
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Returns the result of the last .Net procedure that was successfully run.
Note This procedure was carried out by function DotNetRun or DotNetRunXML.
Ejemplo
// This example assumes that the eightball module is available from "www.gotdotnet.com". 
// The example would no longer operate if this module was not available on the site
DotNet.Value[1] = "enter a question" + ...
	"for the fun of it: what can we expect in response?"
DotNet.Name[1] = "psQuestion"
DotNet.Type[1] = DotNetStringType
IF DotNetRun("www.gotdotnet.com/playground/services/EightBall/eightballws.asmx", ...
		"Ask", "http://tempuri.org/", "http://tempuri.org/Ask") = True THEN
	Info(DotNetGetResult(DotNetResult))
ELSE
	IF DotNetError(DotNetErrMessage) ~= "" THEN
		Error(ErrorInfo()) 
	ELSE
		Error("DotNet error: " + DotNetError(DotNetErrMessage))
	END
END
Sintaxis
<Result> = DotNetGetResult(<Type of result> [, <Result Number>])
<Result>: Character string
  • Result of the last .Net procedure successfully run.
  • If several results are returned by the server and if the DotNetResult constant is used:
    • result <Result Number>,
    • first result returned if <Result Number> is not specified.
  • An empty string ("") if:
    • no result was returned by the server,
    • no connection was established with the server.
<Type of result>: Constant
Type of result to return:
DotNetHTTPResultResult (in HTTP format) of the last .Net procedure run.
DotNetResultResult of the last.Net procedure run.
DotNetXMLResultResult (in XML format) of the last .Net procedure run.
<Result Number>: Optional integer
Number of the result to return. This parameter is used only if several results are returned by the server and if the DotNetResult constant is specified. Otherwise, this parameter is ignored.
Observaciones

The different types of results

The same procedure run on a server can return three types of results.
Consider the following example:
The "getTemp" procedure (used to find out the temperature of a city) has been run. The types of results returned by DotNetGetResult are as follows:
  • With constant DotNet result: 37
  • With the DotNetHTTPResult constant:
    HTTP/1.1 200 OK
    Date: Mon, 09 Jul 2001 09:34:49 GMT
    Status: 200
    Set-Cookie2: JSESSIONID=To16135mC022383577812008837At;Version=1;Discard;Path="/soap"
    Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.3.0;
    Linux 2.2.19-6.2.1.2RS x86; java.vendor=IBM Corporation)
    Set-Cookie: JSESSIONID=To16135mC022383577812008837At;Path=/soap
    Content-Type: text/xml; charset=utf-8
    Content-Length: 467
    Content-Language: en
    <?xml version='1.0' encoding='UTF-8'?>
    <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:getTempResponse xmlns:ns1="urn:xmethods-Temperature"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:float">'''37.0'''</return>
    </ns1:getTempResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
  • With the DotNetXMLResult constant:
    <?xml version='1.0' encoding='UTF-8'?>
    <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:getTempResponse xmlns:ns1="urn:xmethods-Temperature"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:float">'''37.0'''</return>
    </ns1:getTempResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
Componente: wd300com.dll
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: 28/03/2025

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