Glossary Item Box

Government Gateway 2.2.0 (MR-01) ISV Developer Help (Doc Version 06/03/08) | Send comments on this topic.

# GatewaySoapPublic.GsoGetAverageTransactionTimes Method

This method returns the average response time for documents, of the specified type, submitted through the Gateway Transaction Engine.

public void GsoGetAverageTransactionTimes(
string inputXml,
out string outputXml
);

#### Parameters

inputXml
  Input Xml for this method must have the namespace urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlInput
outputXml
  Output Xml for this method must have the namespace urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlOutput

#### Remarks

The input parameter is an XML document that contains the following elements:

- ServiceTransaction: Document transaction type for which the response time is required

The output parameter is an XML document that contains the following elements:

- ServiceTransaction: Document transaction type
- Sample (repeated): Each sample contains:
  - SampleDateTime: Time the sample was taken
  - AverageTransactionTime: Average response time (in seconds) that documents (of type ServiceTransaction) took for this sample period

The schema for the input document is as follows (this xsd references GsoCore200.xsd):

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema targetNamespace="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlInput" xmlns="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlInput" xmlns:core200="urn:GSO-System-Services:external:2.00:GsoCore" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
      <xs:import namespace="urn:GSO-System-Services:external:2.00:GsoCore" />
      <xs:element name="GsoGetAverageTransactionTimesXmlInput">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ServiceTransaction" type="core200:ServiceTransactionTYPE" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

The schema for the output document is as follows (this xsd references GsoCore200.xsd):

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema targetNamespace="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlOutput" xmlns="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlOutput" xmlns:core200="urn:GSO-System-Services:external:2.00:GsoCore" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
      <xs:import namespace="urn:GSO-System-Services:external:2.00:GsoCore" />
      <xs:element name="GsoGetAverageTransactionTimesXmlOutput">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="ServiceTransaction" type="core200:ServiceTransactionTYPE" />
            <xs:element name="Sample" minOccurs="0" maxOccurs="unbounded" nillable="true">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="SampleDateTime" type="xs:dateTime" />
                  <xs:element name="AverageTransactionTime" type="xs:positiveInteger" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

#### Method Details

This method will return all the average transaction times values calculated in the last 25 hours for the specified document transaction type.

Notes:

- The transaction time for a given submission is defined as the number of seconds between the submission being received and recorded in the Gateway Tracklog database, and the departmental response being received and recorded in the Tracklog database.
- The average transaction time will be calculated from all submissions that have had responses received in the last 15 minutes. This value of 15 minutes is a configurable system-wide setting on the Gateway.
- Every 5 minutes the average transaction time will be calculated and stored. If there are no submissions in the 15 minute calculation period a value will not be returned for this period.

#### Method Steps

This method performs the following steps:

- Checks that the supplied ServiceTransaction is valid
- Returns all stored (i.e. non-zero) samples for the specified ServiceTransaction

#### Calling Credential

The credential calling the function must meet the following rules

Rule | Error
--- | ---
The Credential must not present any GatewayToken | wsse:FailedAuthentication Presenting the incorrect token will produce the standard wsse:FailedAuthentication exception

#### Business Rules

All errors will return a SOAP fault. The GatewayDetails node will include ErrorNumber. It also contains a Message node with a detailed description of the cause of the error. The following is a list of the Error Numbers that may be returned from this method, each one represents a business rule that has been broken:

SOAP Fault Error Number | Description
--- | ---
22001 | Document type does not exist Invalid document type supplied
22002 | No average response time data for document class There is no average response time data for the service class

#### Audit Events

Audit Events are stored in the Audit Database. These events are not available publicly. Please contact Live Services for more information

Audit ID | Description
--- | ---
506 | GsoAuthorisation (Failure)

#### Notifications

Notifications are messages that originate from the Gateway and sent to an external source.

Notification | Description
--- | ---

#### Example

The following is a sample of an input document:

    <?xml version="1.0" encoding="utf-8"?>
    <GsoGetAverageTransactionTimesXmlInput xmlns="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlInput">
      <ServiceTransaction>AGENT2-TC1</ServiceTransaction>
    </GsoGetAverageTransactionTimesXmlInput>

The following is a sample of an output document:

    <?xml version="1.0" encoding="utf-8"?>
    <GsoGetAverageTransactionTimesXmlOutput xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlOutput">
      <ServiceTransaction>AGENT2-TC1</ServiceTransaction>
      <Sample>
        <SampleDateTime>2007-08-14T12:10:01Z</SampleDateTime>
        <AverageTransactionTime>12</AverageTransactionTime>
      </Sample>
      <Sample>
        <SampleDateTime>2007-08-14T12:15:01Z</SampleDateTime>
        <AverageTransactionTime>12</AverageTransactionTime>
      </Sample>
      <Sample>
        <SampleDateTime>2007-08-14T12:20:01Z</SampleDateTime>
        <AverageTransactionTime>12</AverageTransactionTime>
      </Sample>
    </GsoGetAverageTransactionTimesXmlOutput>

#### See Also

Public Interface

© Crown Copyright 2008. All rights reserved