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><?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetQuote xmlns="http://www.webserviceX.NET/"> <symbol>IBM</symbol> </GetQuote> </soap:Body> </soap:Envelope> </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><?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body> <GetQuoteResponse xmlns="http://www.webserviceX.NET/"><GetQuoteResult>& lt;StockQuotes&gt;&lt;Stock&gt;&lt;Symbol&gt;IBM&lt; /Symbol&gt;&lt;Last&gt;92.68&lt;/Last&gt;&lt; Date&gt;3/29/2004&lt;/Date&gt;&lt;Time&gt;4:01pm&lt; /Time&gt;&lt;Change&gt;-0.09&lt;/Change&gt;& lt;Open&gt;92.99&lt;/Open&gt;&lt;High&gt;93.61&lt; /High&gt;&lt;Low&gt;92.18&lt;/Low&gt;&lt;Volume& gt;4876300&lt;/Volume&gt;&lt;MktCap&gt;157.5B&lt; /MktCap&gt;&lt;PreviousClose&gt;92.77&lt;/PreviousClose& gt;&lt;PercentageChange&gt;-0.10%&lt;/PercentageChange& gt;&lt;AnnRange&gt;78.12 -100.43&lt;/AnnRange&gt;&lt; Earns&gt;4.34&lt;/Earns&gt;&lt;P-E&gt;21.38&lt; /P-E&gt;&lt;Name&gt;INTL BUSMACHINE&lt;/Name&gt;&lt; /Stock&gt;&lt;/StockQuotes&gt;</GetQuoteResult>< /GetQuoteResponse></soap:Body></soap:Envelope> </soapResponse> </WebServiceStatistics>