Glossary Item Box

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

# DATA_RESPONSE

# Message Source/Destination

Gateway to Portal/Client application

#

# Processing

The DATA_RESPONSE message is returned from the Gateway in response to a DATA_REQUEST message from the client.

The results set, if any, produced will be contained in the Body elements of a DATA_RESPONSE message. However, if the response is an error the response message will be in the format of the submission error message described in the SUBMISSION_ERROR.

Note: Documents whose resources have been deleted from the Gateway cannot be seen even if a time window is specified.

#

# Message Structure

GovTalkMessage | MANDATORY. A default namespace specified as “http://www.govtalk.gov.uk/CM/envelope”.
EnvelopeVersion | MANDATORY. Set to 2.0 or 1.0 to mirror the EnvelopVersion value in the associated DATA_REQUEST.
Header | MANDATORY.
MessageDetails | MANDATORY.
Class | MANDATORY. Identifies the class of XML document being queried – supplied in the DATA_REQUEST.
Qualifier | MANDATORY. Set to response.
Function | MANDATORY. Set to list.
TransactionID | MANDATORY. If DATA_REQUEST supplied a TransactionID it will be returned in this element.
CorrelationID | MANDATORY. Element will be empty.
ResponseEndPoint | MANDATORY. Contains a valid HTTP end-point address. The PollInterval attribute is set to a non-negative integer. Note: This element and its value has no significance here and should be ignored.
GatewayTimestamp | MANDATORY. Contains the time the message was generated.
SenderDetails | MANDATORY. Element will be empty.
GovTalkDetails | MANDATORY.
Keys | MANDATORY. Key elements will not be present.
Body | MANDATORY. May contain data.
StatusReport | MANDATORY. Header element for report results
SenderID | MANDATORY. Can be empty
StartTimeStamp | MANDATORY. Starting date and time for report. Can be empty.
EndTimeStamp | MANDATORY. End date and time for report. Can be empty.
StatusRecord | OPTIONAL. Detailed results. Included if any results are returned. Each Status Record includes the following 5 elements.
TimeStamp | MANDATORY. Date and time when the message was originally received.
CorrelationID | MANDATORY. CorrelationID for message upon which reported status change occurred.
TransactionID | MANDATORY. TransactionID if supplied in SUBMISSION_REQUEST message. Otherwise it is empty.
Identifiers | OPTIONAL. This element is present if the IncludeIdentifiers element in the DATA_REQUEST message has a value of 1. This Identifiers element includes one or more Identifier sub-elements. Note: For backward compatibility, if the IncludeIdentifiers element is not included in the DATA_REQUEST message, or has a value of 0, this element will not be present.
Status | MANDATORY. Latest status change recorded for a given message. Will be one of the following: SUBMISSION_ACKNOWLEDGE (the document has been acknowledged by the Gateway and is awaiting processing by the Government Department) SUBMISSION_ERROR (the document was submitted and found to be in error) SUBMISSION_RESPONSE (the document has completed processing and is awaiting client SUBMISSION_POLL/DELETE_REQUEST)

# Samples

The mandatory elements within the following sample data response are shown in bold while optional elements appear in normal type.
<?xml version="1.0"?> <GovTalkMessage xmlns="http://www.govtalk.gov.uk/CM/envelope"> <EnvelopeVersion>1.0</EnvelopeVersion> <Header> <MessageDetails> <Class>MOSWTSC2</Class> <Qualifier>response</Qualifier> <Function>list</Function> <TransactionID/> <CorrelationID></CorrelationID> <ResponseEndPoint PollInterval=”2”> https://secure.gateway.gov.uk/submission </ResponseEndPoint> <GatewayTimestamp>2006-11-23T11:54:18.345</GatewayTimestamp> </MessageDetails> <SenderDetails/> </Header> <GovTalkDetails> <Keys/> </GovTalkDetails> <Body> <StatusReport> <SenderID>VendorID</SenderID> <StartTimeStamp>13/11/2006 16:00:00.00</StartTimeStamp> <EndTimeStamp>13/11/2006 16:30:00:00</EndTimeStamp> <StatusRecord> <TimeStamp>13/11/2006 16:19:56.50</TimeStamp> <CorrelationID>C13C78E280A449E8B0B959FF6AA8125</CorrelationID> <TransactionID>A23EEBF5EA34eAA8</TransactionID> <Identifiers> <Identifier Type = “RefNo”>00012856</ Identifier> <Identifiers> <Status>SUBMISSION_ERROR</Status> </StatusRecord> <StatusRecord> <TimeStamp>13/11/2006 16:26:11.21</TimeStamp> <CorrelationID>5317CCA6A1F0444A97B02D85849F5445</CorrelationID> <TransactionID>BCC10045EA5DD441</TransactionID> <Identifiers> <Identifier Type = “RefNo”>00012235</ Identifier> <Identifiers> <Status>SUBMISSION_RESPONSE</Status> </StatusRecord> </StatusReport> </Body> </GovTalkMessage>

© Crown Copyright 2008. All rights reserved