5.5 The XI Message Protocol
It’s important to take a look at the workings of the internal message protocol format used in the AEX. This format is often referred to as the XI message protocol. This section will explore the XI message protocol from a high-level view.
When choosing a message format to use internally, SAP needed to pick one that was using a standard and from which it could easily translate messages back and forth to other formats. The XI message protocol is based on a standard that uses HTTP, HTTPS, and XML. When messages arrive in the AEX, they are converted from whatever format they arrive in to the XI message protocol. When messages need to be sent from the AEX to an external system, they are converted from the XI message protocol to whatever other format they need to arrive in. These conversions to and from the XI message protocol are taken care of by the adapter engine.
The XI message protocol is based on the W3C SOAP Messages with Attachments standard. It’s therefore made of three main components: SOAP header, body, and attachments.
Note
We’re not going to detail what a SOAP message is in this chapter because it’s assumed that you understand the standard. However, if you need further information about this topic, visit the W3C website (www.w3.org).
Even though the XI message protocol is based on the SOAP standard, there are some important differences:
-
Header
In SOAP, the header element is optional, but in the XI message protocol, it’s mandatory. -
Body
In SOAP, the body contains the message payload (the real XML message), but in the XI message protocol, the body only contains a reference to the actual payload. -
Attachment
In SOAP, the attachments contains attachment files, but in the XI message protocol, the message payload (the real XML message) is placed as the first attachment. Other attachment files are placed in the second attachment position.
Figure 5.20 provides a graphical illustration of the structure and composition of the XI message protocol.
The XI message format can be generated and used by both SAP ABAP (SAP backend) and Java-based systems. This message format provides a huge benefit because the same message format is used everywhere in a consistent manner.