Developer

Service Event Type: OData Message Received

An OData message received service event type includes XML message mappings that map messages sent from the source back-end system to SAP Mobile Platform Server to indicate data has changed in that back-end system. This call is made by the back-end system via a CGI message containing XML data or an XML document. The service event filters messages using an XPath value. The service event handles this message by processing the read, data state, and update step definitions to update the destination back-end system

This type of service event includes a child definition called message mapping. A given OData Message Received service event may have one or more message mapping. Each mapping definition is intended to map data from the XML message or document to the properties of the target object of the service event, or to one of a selection of other data items within the application.

As a part of the OData service event type, an HTTP response is defined. This response is sent by SAP Mobile Platform Server back to the HTTP server that initially sent the XML message; that is, the response is sent back to the source back-end system. Included in this response is one of the standard HTTP response status codes, as well as other possible information. This information can include fixed string data or HTTP markup. This response after all processing for the service event has completed, including all read, data state, and update step execution.

OData Message Received Service Event - General Attributes

  • Name: The internal unique name for the service event definition, must be unique among all service events defined within the same module.
  • Connection: This attribute references an OData system connection type within the same application. This connection is the one over which the source back-end system sends the message to the SAP Mobile Platform Server containing the XML data or document to be processed by the service event. This system connection must exist prior to defining the OData Message Received service event and must be of type HTTP-XML.
  • Message Filter: This attribute contains the XPath statement to filter messages received by the service event. If the service event can select one or more nodes within the message document using this XPath, the service event processes the message. If it cannot make such a selection, it ignores the message.
  • Object Type: This attribute specifies the target object type of the service event. The properties of this object stores the data retrieved from the source back end to be updated to the destination back end. This may include child object collections where necessary.
  • Read Steps: This attribute specifies whether to retrieve data from the source back-end system using the read steps defined in the service event, or those defined in the target object type of the service event. When this attribute is true, the object’s read steps are used and the service event’s read steps are not processed.
  • Run Push: This attribute specifies a push definition to run when this service event type is called from the back-end system. This is provided as an alternative to the default polling behavior of a push definition, allowing them to be run on demand by the back-end system instead.

OData Message Received Service Event - HTTP Response Attributes

HTTP Response
  • HTTP Response Code: This attribute specifies the HTTP response status code sent by SAP Mobile Platform Server to the source back-end system that initially called the service event.
  • Response Data Type: This attribute specifies the data type of any data within the HTTP response status sent by the SAP Mobile Platform Server. This can be set to Fixed String, Small Markup or Large Markup. A fixed string is a single string value defined in the Response attribute. Small Markup is a short piece of HTML text, also set in the Response attribute. Large Markup is a larger chunk of HTML text, likely spanning multiple lines. This text is stored in the file referenced by the Markup File attribute.
  • Markup File: This attribute is available only when the Response Data Type is set to Large Markup. Markup File references the text file containing the HTML text to be sent as a part of the HTTP Response by the service event.
  • Response: This attribute is available when Response Data Type is set to either Fixed String or Small Markup. For fixed string, the Response attribute can contain any text value. For Small Markup the Response attribute should contain HTML text. The contents of the Response attribute are sent as a part of the HTTP Response by the service event.
Error Response
  • Error Response Code: This attribute specifies the HTTP response status code sent by SAP Mobile Platform Server to the source back-end system that initially called the service event.
  • Error Data Type: This attribute specifies the data type of any data within the HTTP response status sent by SAP Mobile Platform Server. This can be set to Fixed String, Small Markup or Large Markup. A fixed string is a single string value defined in the Response attribute. Small Markup is a short piece of HTML text, also set in the Response attribute. Large Markup is a larger chunk of HTML text, likely spanning multiple lines. This text is stored in the file referenced by the Markup File attribute.
  • Markup File: This attribute is available only when the Response Data Type is set to Large Markup. Markup File references the text file containing the HTML text to be sent as a part of the HTTP Response by the service event.
  • Response: This attribute is available when Response Data Type is set to either Fixed String or Small Markup. For fixed string, the Response attribute can contain any text value. For Small Markup the Response attribute should contain HTML text. The contents of the Response attribute are included as a part of the HTTP Response sent by the service event.