Many enterprise services, including those provided by SAP in the Enterprise Services Inventory described in Chapter 8, will be implemented in ABAP. Since web services—and therefore enterprise services—are loosely coupled, the consumer of the service can be written in ABAP or Java. This section explores using Java to consume the ABAP web service created in Chapter 15.
Service consumers can be created in a variety of ways and visualized using Web Dynpro, JSPs, or ASPs, for example. In this section, we'll create a UI using Web Dynpro for Java. As mentioned earlier, Web Dynpro for Java is integrated into SAP NetWeaver Developer Studio as an Eclipse perspective.
Web Dynpro for Java uses the model-view-controller (MVC) paradigm, which clearly separates business logic and presentation logic. Its capabilities far exceed what we can discuss in this brief section; we will use many defaults in our example, and we will not show every screen in this process for the sake of brevity. Nonetheless, this example gives a basic feel for creating a service consumer in Web Dynpro.
To set the stage for this example, we open the SAP NetWeaver Developer Studio, choose the Web Dynpro perspective, and start a new Development Component Project (by choosing File → New → Development Component Project). In the Development Component Project, expand the Web Dynpro node for this new project in the Web Dynpro Explorer, right-click on Application, select ...