|
|
|
|
- Los diferentes tipos de resultados
DotNetGetResult( Función) Devuelve el resultado del último .Net Procedure que se ejecutó con éxito. // 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" + ... "just for fun: what would the answer be?" 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(".Net error: " + DotNetError(DotNetErrMessage)) END END
Sintaxis
<Result> = DotNetGetResult(<Type of result> [, <Result Number>])
<Result>: Cadena de caracteres - Resultado del último .Net Procedure ejecutado con éxito.
- Si el servidor devuelve varios resultados y si se utiliza la constante DotNetResult:
- resultado <Resultado Número>,
- primer resultado si no se especifica <Result Number>.
- Una cadena vacía (""") si:
- el servidor no devolvió ningún resultado,
- no se ha establecido ninguna conexión con el servidor.
<Type of result>: Constante Tipo de resultado a devolver:
| | DotNetHTTPResult | Resultado (en formato HTTP) de la última ejecución de .Net Procedure. | DotNetResult | Resultado de la última corrida de Procedure. | DotNetXMLResult | Resultado (en formato XML) de la última ejecución de .Net Procedure. |
<Result Number>: Entero opcional Número del resultado a devolver. Este parámetro se utiliza sólo si el servidor devuelve varios resultados y si se especifica la constante DotNetResult. De lo contrario, este parámetro se ignora. Observaciones Los diferentes tipos de resultados El mismo Procedure ejecutado en un servidor puede devolver tres tipos de resultados. Veamos el siguiente ejemplo: El "getTemp" Procedure (usado para averiguar la temperatura de una ciudad) se ha ejecutado. Los tipos de resultados devueltos por la función DotNetGetResult son los siguientes: - Con la constante DotNetResult: 37
- Con la constante DotNetHTTPResult:
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> - Con la constante DotNetXMLResult:
<?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>
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|