Using the Car Rental Web Service with Web Dynpro



In this tutorial you will become familiar with all the development steps that are required in a Web Dynpro application, starting from a project base that already exists, in order to connect up to the business logic using a Web service-based model. The predefined Web service for executing a car reservation, as set up in the IDE standard example application (QuickCarRental application), will be used for this purpose. In this case, Web Dynpro serves as a Web service client for Web services implemented using an EJB.

The QuickCarRental application is part of the standard set of example applications contained in the example directory of the Developer Studio (.../SAP/JDT/eclipse/examples/ The Web service is already defined there and only needs to be deployed on the J2EE together with the EAR file. You can familiarize yourself with the Car-Rental application using a tutorial .

The user interface for this Web application should consist of a simple form for entering relevant booking data and for printing the corresponding booking results.

The development process described here using the Web Dynpro tools is determined to a large extent using a declarative approach. Through the automatic generation of numerous development objects, such as the model for communication with the Web service used or different controller classes, the implementation effort required can be reduced to a few lines of Java code. However, these can be easily generated in this simple scenario using suitable template wizards.


By the end of this tutorial, you will be able to:


Generate a model to be used for linking up a Web service from within the Web Dynpro project.


Declare a context node in the component controller in such a way so that a connection to the model can be created.


Perform context mapping between the view controller and the component controller.


Create a data link from UI elements to the view context.


Implement the use of the car rental Web service with suitable templates.


This tutorial uses the Car Rental Web service called QuickCarRentalService. This service is supplied with the QuickCarRental example application (in the example index in the Developer Studio …/SAP/JDT/eclipse/examples). It is contained in the project J2EE_QuickCarRentalEar after unpacking.

To use this Web service in your Web Dynpro client, you must have deployed the EAR contained in this project on the SAP J2EE engine.

You have made sure that the J2EE QuickCarRental example application can be successfully executed on the J2EE engine.

Systems, Installations, and Authorizations

You have installed the SAP NetWeaver Developer Studio.

You have access to the SAP J2EE Engine.


You have acquired some basic experience with Web Dynpro applications - for example, by working through the Welcome Quickstart guide (Creating Your First Web Dynpro Application).


Next Step:

Importing a Project Template