Mobile SDK > Disconnected mobile application reference > Response XML
 
Response XML
The Response XML format is used to send respondent data to the MobileSyncWebService. Response XML can also be synchronized with the mobile application when a project uses sample. The synchronization makes it possible for an interviewer to start interviewing a respondent, and then reassign the sample record to another interviewer.
The Response XML is a simple format that includes FullName, DataType, and response values. The structure is different from the Player XML, that returns the responses in a connected interview. For disconnected interviews, it does not make sense to reuse the Questions XML. The Question XML delivers questions hierarchically, while the Response XML must provide a value for each flattened variable.
When a variable instance is not listed, its value is taken to be NULL, and the value in the target data set is not updated. NULL must be specified as the variable instance value if the data set target already has a variable instance value (for example, because a sample was reassigned to another interviewer for completion), and the client wants to remove the value (for example, because that question went off path). When the sample is reassigned, the Response XML must include all responses up to the current point in the survey. The responses include both the originally collected responses, and any newly collected responses.
All Respondent.Serial values in the Response XML are ignored because the values are eventually assigned a unique value within the target data set when the record is finally transferred to the case data.
System variables must be provided in the Response XML. For more information, see System variables.
Response XML system variables
Respondent.ID
Required?: Do not include
The Response element's ID attribute determines the value of the Respondent.ID field in the target data set. The Responent.ID system variable is ignored when it is included in the Responses XML.
Respondent.Origin
Required?: Yes
Must always be {Other}.
Respondent.Origin.Other
Required?: Yes
The source software product name.
The variable might be useful during the analysis of multimode studies (to analyze mode specific responses).
Respondent.Serial
Required?: Do not include
A unique Respondent.Serial value is allocated when the record is inserted into the target data set. The Responent.Serial system variable is ignored when it is included in the Responses XML.
Respondent.Serial.SourceFile
Required?: Not applicable
DataCollection.BatchID
Required?: Not applicable
DataCollection.BatchName
Required?: Not applicable
DataCollection.CurrentPage
Required?: Optional
The current page the respondent is answering. The value indicates the number pages that were answered. UNICOM Intelligence Interviewer - Server Admin numbers pages starting with zero (0) for the first page.
DataCollection.DataEntryMode
Required?: Not applicable
DataCollection.Debug
Required?: Not applicable
DataCollection.EndQuestion
Required?: Optional
The last question that was asked/shown before the interview completed (or was stopped). The information is useful when a interview is restarted (for example, by another interviewer), and ensures that the interview restarts on the correct question.
DataCollection.FinishTime
Required?: Yes
Specified in UTC as xsd:dateTime.
DataCollection.InterviewEngine
Required?: Optional
The mobile application's interviewing engine version. The information useful when debugging issues. For example, Interviewer Server uses IOM 6.0 or IOM 7.0.
DataCollection.InterviewerID
Required?: Suggested
The variable is useful when analyzing interviewer performance.
DataCollection.InterviewerTimeZone
Required?: Suggested
The Microsoft specific value for the interviewer’s time zone. Do not include the variable in the Response XML when the value cannot be calculated.
DataCollection.InterviewMode
Required?: Yes
Must be set to {Local}.
DataCollection.MetadataVersion
Required?: Do not include
Derived from DataCollection.MetadataVersionNumber.
DataCollection.MetadataVersionGUID
Required?: Optional
DataCollection.MetadataVersionNumber
Required?: Suggested
Must be specified as 1:2 in the Question XML and Routing XML (even when it does not work on the URL) to ensure that it can be passed back.
DataCollection.QuotaID
Required?: Do not include
Obsolete
DataCollection.Removed
Required?: Suggested
Allows records to be deleted from the mobile application user interface, but not completely removed from the data.
DataCollection.RespondentTimeZone
Required?: Suggested
DataCollection.RoutingContext
Required?: Suggested
Always Web in the CAPI interviews. The IOM code converts the routing context name to a categorical, and then assigns the categorical to DataCollection.RoutingContext.
DataCollection.SeedValue
Required?: Suggested
DataCollection.ServerTimeZone
Required?: Do not include
Typically set to the InterviewerTimeZone value.
DataCollection.StartTime
Required?: Yes
DataCollection.Status
Required?: Yes
DataCollection.TerminateSignal
Required?: Suggested
Available as part of the Exit item.
DataCollection.Variant
Required?: Do not include
DataCleaning.Note
Required?: Do not include
DataCleaning.ReviewStatus
Required?: Do not include
DataCleaning.Status
Required?: Do not include
Example
<Response ID="Id1">
  <Variable FullName="Age" DataType="Long" Value="16" / >
  <Variable FullName="Gender" DataType="Categorical" Value="{female}" / >
</Response>
The Response XML is never used by itself, but is sent to the server as part of the RespondentData XML and received as part of the SampleData XML. The Response XML is included in both schemas.
Cache file generation
The MobileSyncWebService submit responses back toSyncWebServiceV2 as a package of cache files. TheMobileSyncWebService uses the Value Cache to generate cache files.
Cache files contain state information in addition to the survey question responses. Cache files that are generated by MobileSyncWebService contain only response variables. The GenerateCacheSubscription.mrs script demonstrates how to take case data from the UNICOM Intelligence Data Model and generate a cache file that is compatible with the Synchronization Web Service. The MobileSyncWebService uses the same technique when it converts the Response XML to a cache file.
See also
Sample transformation (SampleData XML)
Quota transformation (Quota XML)
Disconnected mobile application reference