SAP Exchange Infrastructure messages are based on XML. How can an application send a message of this type to a receiver? The idea is similar to a Remote Function Call (RFC): Communication with another system is encapsulated in an interface; the parameters of this interface are converted into a message. However, the significant difference between SAP XI and RFCs is that former always requires two interfaces for communication: One on the sender side and one on the receiver side. This has the advantage that the sender and receiver interfaces do not need to match exactly (loose coupling).
The following graphic illustrates schematically how a message is sent to a receiver using a sender interface:
Multiple receivers can exist, the principle remains the same.
The graphic illustrates that for an interface A in a sender system, there is an interface B in the receiver system:
· Interface B describes the inbound interface of an application.
· Interface A describes the outbound interface of an application.
At runtime, inbound interfaces give you access to a service that finds and returns customer data for an order. Outbound interfaces are used to call a service by means of the Integration Server.
Separation Using Outbound and Inbound Interfaces
To send a message, simply call the outbound interface (in the graphic: interface A) to which you want to transfer parameters for the request message. Furthermore, on the receiver side, you must implement receiver processing for the inbound interface (in the graphic: interface B). As indicated by the broken arrows, communication can only comprise the transfer of one message, depending on whether the communication is synchronous or asynchronous (also see: Communication Parameters).
Outbound and inbound interfaces are used to separate (potential) senders and receivers. The interface parameters do not have to match for a message exchange to be possible (but a mapping is required at runtime if they do not). This enables various different senders and receivers to communicate with each other. In particular, this loose coupling also enables you to assign interfaces to each other when one side of the communication must not, or cannot be changed. For example, an outbound interface can be a message interface for calling an RFC in a 4.6C SAP system. In this call, the RFC has the role of an inbound interface.
You assign outbound and inbound interfaces to each other at configuration time by means of an interface determination.
Interface Types and Runtime Components
The application does not need to perform any implementation to convert the parameters to or from a message. Depending on the type of interface, this task is performed by the following runtime component (see also: Connectivity):
In the simplified graphic, the XI runtime component is shown as part of the application system. This applies for proxy runtime, but depends on the adapter type in the case of adapters.
Interface Type | XI Runtime Component | Programming Model |
Proxy | Proxy Runtime | Proxies are executable interfaces in the application system. You can only create them in the system from message interfaces using the proxy generation functions. There are ABAP and Java proxies. |
IDoc | IDoc Adapter | You can connect all interfaces that are already available in the system to the Integration Engine by using adapters. The adapters map between the XI message protocol and the relevant interface type. Where adapters do not call an interface (for example, if the message data originates from a database or file), you must configure an interface yourself. |
RFCs, BAPIs | An adapter from the Adapter Engine | |
Interfaces from external systems |
If you use message interfaces, this is the outside-in approach; for any other interfaces, this is the inside-out approach (see: Design Time). In both cases, the Integration Builder supports the storage of the interface description in the Integration Repository. You create message interfaces there directly. You can import RFCs, BAPIs, and IDocs into the Integration Repository, and for external systems you have the option of loading message schemas in WSDL, XSD, or DTD into the Integration Repository. The interface description in the Integration Repository is decoupled from the implementation and this has the following advantages:
· You can access the information about the message structure centrally.
· You can use the interface description for the design of integration scenarios, integration processes, and mappings at the same time as application development in the systems.
See also: Communication Parties (Case Examples).
No comments:
Post a Comment