An XML Response mapping is a child definition to the XML via HTTP step definition, defined to extract data returned by the parent step and map it to the property values or other data members of the application. Data returned may be extracted by the mapping when that takes the form of a Cookie, HTTP Header, or XML. The value extracted may be assigned to the properties of the definition for which the step was defined, or to one of several other data values within the application.
The response mapping defines both the source type, or “Mapping Type,” of the data returned by the step definition, and the data component of the mobile application where the value is stored. If the mapping type is an XPath Expression or XSL Transformation, the return data must be structured XML. Included in the response mapping then is the XPath or XSL to extract the data from the XML document received by the step after its request was submitted.
Once the data is extracted by the response mapping definition it is assigned to the data component of the mobile application as specified within the mapping definition. This can include a property within the definition for which the parent step was defined, as well as messaging, user ID, the creation of local and local XML data tags, the parent object’s key property, or the value may be used for validation.
A given XML via HTTP step can contain multiple response mappings. Each will extract data from the same data set returned by the step to the Agentry Server. The parent step definition’s property view contains a list of all response mappings. The order in which the mappings are processed is the position in which the mappings are listed in this view. This order can be modified by moving the mappings up or down within the list.