getLastStatistics

getLastStatistics(headerOnly: Boolean): String;

The getLastStatistics method of the JadeWebServiceConsumer class returns a string containing statistics data of the last Web service request.

Web service statistics are logged only when the logStatistics property is set to true.

If the headerOnly parameter is set to true, the data listed in the following table is returned (in XML format).

Value Description
name Web service name
operation Web service operation that was invoked
url Uniform Resource Locator (URL) of the Web service
dateTime Timestamp of when the request was sent
responseTime Time from the time the request is sent to the time a response is received, including the time the Web service spends processing user logic
processingTime Total time the Web service consumer takes to formulate the request plus the time the Web service consumer takes to process the reply; that is, the total time taken by the Web service consumer, excluding the time in the Web service itself
errorCode Error code if an error was returned by the Web service
requestSize Size of the SOAP message request
responseSize Size of the SOAP message response

In addition to the above data that is returned when the headerOnly parameter is set to true, the data listed in the following table is also returned (in XML format) when the headerOnly parameter is set to false.

Value Description
requestHeaders HTTP request headers
soapRequest The SOAP request message
responseHeaders HTTP response headers
soapResponse The SOAP response message

The following example of the data returned from the getLastStatistics method invokes an operation called getQuote from the Web service at http://www.webservicex.netstockquote.asmx. In this example, all details are returned because the headerOnly parameter is set to false.

<?xml version="1.0" encoding="utf-8"?>
<WebServiceStatistics>
    <name>StockQuote</name>
    <operation>getQuote</operation>
    <url>http://www.webservicex.netstockquote.asmx</url>
    <dateTime>30 March 2004, 11:00:54</dateTime>
    <responseTime>846</responseTime>
    <processingTime>3</processingTime>
    <errorCode>0</errorCode>
    <requestSize>349</requestSize>
    <responseSize>988</responseSize>
    <requestHeaders>Accept: text/plain
Accept: text/html
Accept: text/xml
Content-Type: text/xml; charset=utf-8
Host: www.webservicex.net
Pragma: no-cache
Proxy-Connection: Keep-Alive
SOAPAction: http://www.webserviceX.NET/GetQuote
User-Agent: Jade/2016
    </requestHeaders>
    <soapRequest>&lt;?xml version=&quot;1.0&quot;
    encoding=&quot;utf-8&quot;?&gt;
&lt;soap:Envelope
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;soap:Body&gt;
        &lt;GetQuote xmlns=&quot;http://www.webserviceX.NET/&quot;&gt;
                &lt;symbol&gt;IBM&lt;/symbol&gt;
        &lt;/GetQuote&gt;
    &lt;/soap:Body&gt;
&lt;/soap:Envelope&gt;
    </soapRequest>
    <responseHeaders>HTTP/1.0 200 OK
Server: Microsoft-IIS/5.0
Date: Mon, 29 Mar 2004 23:00:53 GMT
X-Powered-By: ASP.NET
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 988
X-Cache: MISS from localhost.localdomain
Proxy-Connection: close
    </responseHeaders>
    <soapResponse>&lt;?xml version=&quot;1.0&quot;
    encoding=&quot;utf-8&quot;?&gt;&lt;soap:Envelope
xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;
xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;&lt;soap:Body&gt;
&lt;GetQuoteResponse
xmlns=&quot;http://www.webserviceX.NET/&quot;&gt;&lt;GetQuoteResult&gt;&amp;
lt;StockQuotes&amp;gt;&amp;lt;Stock&amp;gt;&amp;lt;Symbol&amp;gt;IBM&amp;lt;
/Symbol&amp;gt;&amp;lt;Last&amp;gt;92.68&amp;lt;/Last&amp;gt;&amp;lt;
Date&amp;gt;3/29/2004&amp;lt;/Date&amp;gt;&amp;lt;Time&amp;gt;4:01pm&amp;lt;
/Time&amp;gt;&amp;lt;Change&amp;gt;-0.09&amp;lt;/Change&amp;gt;&amp;
lt;Open&amp;gt;92.99&amp;lt;/Open&amp;gt;&amp;lt;High&amp;gt;93.61&amp;lt;
/High&amp;gt;&amp;lt;Low&amp;gt;92.18&amp;lt;/Low&amp;gt;&amp;lt;Volume&amp;
gt;4876300&amp;lt;/Volume&amp;gt;&amp;lt;MktCap&amp;gt;157.5B&amp;lt;
/MktCap&amp;gt;&amp;lt;PreviousClose&amp;gt;92.77&amp;lt;/PreviousClose&amp;
gt;&amp;lt;PercentageChange&amp;gt;-0.10%&amp;lt;/PercentageChange&amp;
gt;&amp;lt;AnnRange&amp;gt;78.12 -100.43&amp;lt;/AnnRange&amp;gt;&amp;lt;
Earns&amp;gt;4.34&amp;lt;/Earns&amp;gt;&amp;lt;P-E&amp;gt;21.38&amp;lt;
/P-E&amp;gt;&amp;lt;Name&amp;gt;INTL BUSMACHINE&amp;lt;/Name&amp;gt;&amp;lt;
/Stock&amp;gt;&amp;lt;/StockQuotes&amp;gt;&lt;/GetQuoteResult&gt;&lt;
/GetQuoteResponse&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
    </soapResponse>
</WebServiceStatistics>