Generating Interfaces and Proxies – The
Outside-In Approach
A second approach for providing services is the outside-in approach. Outside-in means that you create the metadata of your interface on a business level in the integration repository of the exchange infrastructure. Here you define global data with a technical data type and semantics that define the content of the data. For example, a global data type could define an address. This data is pure metadata.
In the next step, use transaction SPROXY to access this metadata in a back-end system – for example, in the ABAP page of the SAP NW Application Server. Then create a server-side proxy on this basis. After you have generated your interface on the provider side, you can start to develop its functions. The more frequent case is probably that you use your generated server-side proxy to call only methods and functions modules that already exist (glue implementation). Viewed in this way, it is also possible to use the outside-in approach to wrap one or several functions that already exist on the ABAP side with a new, common interface and a server-side proxy class. This class then calls the respective functions. To access the proxy created in this manner, generate a client-side proxy in the calling system in the respective program – again using transaction SPROXY. This proxy provides a suitable interface and encapsulates communication.
In this way, you can provide and consume Web services with the support of tools with the NW Application Server and this without any great effort. You can wrap an existing standard interface with a Web service without problems and thus make it accessible as a service. For the outside-in approach, which you can use to provide methods of ABAP classes or objects as services (also applies to Java classes), you require the exchange infrastructure. This is also a part of SAP NetWeaver.