Step Type: XML via HTTP
An XML via HTTP step is defined for an HTTP-XML system connection and defines a URL called by SAP Mobile Platform Server and also defines how the XML data returned from this call is mapped to the data members of the mobile application. This step includes two child definitions that encapsulate the arguments passed by the Server to the defined URL, and the mapping of return values to the data members of the application. An XML via HTTP step is defined for a specific definition type within the same module.
The first information entered for an XML via HTTP step is the definition for which it is defined, which may be an object, transaction, or fetch. This information is needed by the step definition for use in its child definitions, which must have access to the property values of the selected data definition as a part of their behaviors.
Within this step type is the HTTP request. This portion of the step defines the URL called by the Agentry Server and the HTTP request method. This may be one of GET, HEAD, POST, or PUT.
The child definitions to an XML via HTTP step include its request arguments and response mappings. Request arguments provide access to the property values and other data values in scope for the step to be passed to the URL defined by the step. Included in this definition is the type of argument the data represents.
Response mappings extract data from the structured XML data or document returned from the request. They may use of XPaths to locate and retrieve these values from the XML and define to which property or other data member of the application the XML contents will be mapped. Response mappings may be used to extract a specific XML element’s contents, or a parent element may be specified with a second, child element within that parent of which there may be multiple instances.
XML via HTTP Child Definitions
- Request Argument:
- Response Mapping:
XML via HTTP Step Attributes
- Used For: This attribute specifies the data definition within the module for which the step will synchronize data. This may be any fetch, transaction, or object definition within the application. This attribute set by first selecting the type of definition and then selecting the specific definition within the project.
- Name: Contains the unique internal name for the step definition. This must be unique among all steps within the same module.
- Connection: This attribute references the system connection for which the step is defined. This attribute is set when the step is initially created and cannot be modified. For an XML via HTTP step this must be an HTTP-XML system connection type.
- Name: Contains the unique internal name for the HTTP request within the step definition. This is set by default to the name of the parent step definition. It may be modified. A given XML via HTTP step will have only one HTTP request.
- URL: This attribute contains the URL to which the Agentry Server will make a request. This value will be appended to the value configured as the base URL for the HTTP-XML system connection. This base URL is configured within the HTTP-XML system connection configuration options for the Agentry Server. Proper use of both this base URL option and the URL entered in the requests of the step definitions can support portability for the application, with the base URL being the implementation-specific portion and the step’s URL being the portion not likely to change for the same back end system from one implementation to the next.
- Method: This attribute specifies the HTTP request method for the request. This may be set to one of GET, HEAD, POST, or PUT.