Glossary Item Box

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

# Getting the Average Transaction Times for a Transaction Class

#### Example GsoGetAverageTransactionTimes Request

Below is a sample SOAP Envelope for a client calling GsoGetAverageTransactionTimes. The Security element in the SOAP Header does not include a GatewayToken, but otherwise the structure of the message is the same as for the SOAP messages that do.

The SOAP message uses standard WS-Security and WS-Addressing specification elements.

Note: The actual XML on the wire that is being sent to GsoGetAverageTransactionTimes has been escaped as it is treated like a string, i.e. "<" becomes "&lt;" and ">" becomes "&gt;".

    <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"
      xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <soap:Header>
        <wsa:Action>http://www.gateway.gov.uk/soap/2007/02/public/GsoGetAverageTransactionTimes</wsa:Action>
        <wsa:MessageID>uuid:29deba47-142f-4fb4-9583-c4dc1a4498c6</wsa:MessageID>
        <wsa:ReplyTo>
          <wsa:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:Address>
        </wsa:ReplyTo>
        <wsa:To>http://www.gateway.gov.uk/soap/2007/02/public</wsa:To>
        <wsse:Security>
          <wsu:Timestamp wsu:Id="Timestamp-0cf4d203-c59b-45e8-bc58-38b4f9082c20">
            <wsu:Created>2007-02-05T11:30:45Z</wsu:Created>
            <wsu:Expires>2007-02-05T11:35:45Z</wsu:Expires>
          </wsu:Timestamp>
        </wsse:Security>
      </soap:Header>
      <soap:Body>
       <GsoGetAverageTransactionTimes xmlns="http://www.gateway.gov.uk/soap/2007/02/public">
          <inputXml>
            &lt;GsoGetAverageTransactionTimesXmlInput xmlns="urn:GSO-System-Services:external:2.00:GsoGetAverageTransactionTimesXmlInput"&gt;
              &lt;ServiceTransaction&AGENT2-TC1&lt;/ServiceTransaction&gt;
            &lt;/GsoGetAverageTransactionTimesXmlInput&gt;
          </inputXml>
        </GsoGetAverageTransactionTimes>
      </soap:Body>
    </soap:Envelope>

Notes:

> 1. <wsa:Action> ... </wsa:Action>

> The URL (or urn) for the method. In this example the Public endpoint is referenced (rather than the Portal endpoint) because the GsoGetAverageTransactionTimes method is is being used from an ISV application. The value is either:

> - http://www.gateway.gov.uk/soap/2007/02/public/GsoGetAverageTransactionTimes if the WS-* compliant endpoint set is used. Portals/applications should (be migrated to) use these endpoints.
> - urn:GSO-System-Services:external:1.65:PublicInterface/GsoGetAverageTransactionTimes if the non-WS-* compliant (legacy) endpoint set is used.

> 2. <wsa:To>... </wsa:To>

> This is the actor for the Public Interface. The options are:

> - http://www.gateway.gov.uk/soap/2007/02/public if the WS-* compliant Public Interface endpoint is used. Portals/applications should (be migrated to) use these endpoints.
> - urn:GSO-System-Services:external:1.65:PublicInterface if the non-WS-* compliant (legacy) Public endpoint is to be used.

> 3. <GsoGetAverageTransactionTimes xmlns="...">

> This has the same value as (2.).

> 4. Identifiers need to be unique across the message (this implementation is based on GUIDs, e.g. 82c56821-1970-49fa-8edd-6da6fa327fd3); including a label as part of an identifier aids readability.

#### Example GsoGetAverageTransactionTimes Response

Below is the response from the GsoGetAverageTransactionTimes call. The structure of this response message is the same as methods invoked with a GatewayToken.

The SOAP message uses standard WS-Security and WS-Addressing specification elements.

Note: The actual XML on the wire that is being sent back from GsoGetAverageTransactionTimes, has been escaped as it is treated like a string.

    <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"
      xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
      xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
      xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <soap:Header>
        <wsa:Action>http://www.gateway.gov.uk/soap/2007/02/public/GsoGetAverageTransactionTimesResponse</wsa:Action>
        <wsa:MessageID>uuid:3bd44b0a-4fe6-409a-809a-41f46bbdcd36</wsa:MessageID>
        <wsa:RelatesTo>uuid:29deba47-142f-4fb4-9583-c4dc1a4498c6</wsa:RelatesTo>
        <wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:To>
        <wsse:Security>
          <wsu:Timestamp wsu:Id="Timestamp-a0a410f5-09dc-4518-bc9c-72a36b11cea7">
            <wsu:Created>2007-02-05T11:30:45Z</wsu:Created>
            <wsu:Expires>2007-02-05T11:35:45Z</wsu:Expires>
          </wsu:Timestamp>
        </wsse:Security>
      </soap:Header>
      <soap:Body>
       <GsoGetAverageTransactionTimesResponse xmlns="http://www.gateway.gov.uk/soap/2007/02/public">
          <outputXml>
            &lt;?xml version="1.0" encoding="utf-8"?&gt;
            &lt;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"&gt;
              &lt;ServiceTransation&gt;AGENT2-TC1&lt;/ServiceTransation&gt;
              &lt;Sample&gt;
                &lt;SampleDateTime&gt;2007-08-14T12:10:01.9670000+01:00&lt;/SampleDateTime&gt;
                &lt;AverageTransactionTime&gt;12&lt;/AverageTransactionTime&gt;
              &lt;/Sample&gt;
              &lt;Sample&gt;
                &lt;SampleDateTime&gt;2007-08-14T12:15:01.7330000+01:00&lt;/SampleDateTime&gt;
                &lt;AverageTransactionTime&gt;12&lt;/AverageTransactionTime&gt;
              &lt;/Sample&gt;
              &lt;Sample&gt;
                &lt;SampleDateTime&gt;2007-08-14T12:20:01.8500000+01:00&lt;/SampleDateTime&gt;
                &lt;AverageTransactionTime&gt;12&lt;/AverageTransactionTime&gt;
              &lt;/Sample&gt
            &lt;/GsoGetAverageTransactionTimesXmlOutput&gt;
          </outputXml>
        </GsoGetAverageTransactionTimesResponse>
      </soap:Body>
    </soap:Envelope>

Notes:

> 1. <wsa:Action> ... </wsa:Action>

> This value relates to the request. The value is either:

> - http://www.gateway.gov.uk/soap/2007/02/public/GsoGetAverageTransactionTimesResponse
> - urn:GSO-System-Services:external:1.65:PublicInterface/GsoGetAverageTransactionTimesResponse

> 2. <GsoGetAverageTransactionTimesResponse xmlns="...">

> This is the same as the namespace in the request GsoGetAverageTransactionTimes element. The value is either:

> - http://www.gateway.gov.uk/soap/2007/02/public
> - urn:GSO-System-Services:external:1.65:PublicInterface

> 2. Identifiers need to be unique across the message (this implementation is based on GUIDs, e.g. 82c56821-1970-49fa-8edd-6da6fa327fd3); including a label as part of an identifier aids readability.

© Crown Copyright 2008. All rights reserved