Show TOC

Background documentationAdapt, Simplify and Join Existing Services using CAF Locate this document in the navigation structure

 

Questions Answered
  • How are external services integrated in your composite application?

  • How can I use CAF to wrap or adapt existing services?

  • Which sources can I use to import service definitions in CAF?

  • What steps must I carry out to join external services using CAF tools?

Introduction

The interfaces of enterprise services can be very complex. However, consumers of composite applications require a particular business functionality and focus on the data that they need. With CAF you are in the position to provide original services with low complexity that are tailored to the needs of your composite application.

In addition to simplifying service interfaces, you can benefit from using the CAF tools’ mapping capabilities to wrap the enterprise services. This enables you to wrap original services in the business logic layer instead of consuming them directly in the higher levels (such as in the UI or the process layer). This decouples the consumers from the external services, making it easier and more flexible for you to adapt or replace those services later on in your composite applications. External services are required for communicating with external back-end systems and applications. The integration of external services makes it possible to reuse existing functions in these systems and applications in CAF projects independent of the respective technology and platform. Within CAF projects, this integration is done using import functions for service definitions.

You can import service definition documents from different sources:

  • Services Registry

    You import the WSDL document of a Web service published in the Service Registry.

  • Enterprise Services Repository (ESR)

    You import the WSDL document for a Service Interface modeled in the ESR.

  • File system or a remote location such as a URL

Activities
  1. Set up the CAF-related development components.

    Note Note

    Depending on the approach you use (top-down or bottom-up), you have the option of creating the CAF development components as part of a product or explicitly creating a separate CAF project. See also: Set Up Your Development Project for the Composite Application.

    End of the note.
  2. Establish a connection from the Developer Studio to the Services Registry.

    To import external service definitions published in a Services Repository, you must first configure the connection to the Services Registry using the preference settings in the Developer Studio.

    More information: Connecting the SAP NetWeaver Developer Studio to the Services Registry

  3. Import the original service into the project.

    To simplify or wrap an external service (from the Service Registry or other source), you must first import the original enterprise service interface definition into the Developer Studio.

    More information: Importing Web Services

  4. Create a new application service.

    Note Note

    You can take advantage of the modeling capabilities in the Composite Designer. To create a new development object (such as an application service), select it from the Composite Designer palette and drag and then drop it on the corresponding layer of your product (business logic layer).

    Alternatively, you can create a new application service in your CAF project.

    End of the note.
  5. Model and implement service operations.

    • Create new operations.

    • Add input parameters to the service operations.

    • Add output parameters to the service operations.

    • Implement service operations.

  6. Expose the application service as a Web service.

    More information: Exposing Application Services or Business Objects as Web Service

  7. Save, generate, build, and deploy your application service.

    On the basis of CAF metadata, the framework handles the generation of Java source code based on low-level APIs. You will find all the relevant operations in the context menu of the project tree.

  8. Run and test the new application service in the Service Browser.

    More information: Testing Services with the Service Browser