Show TOC

Procedure documentationAdapting ESOA Services for Use in Visual Composer Locate this document in the navigation structure

 

This document describes how to use Service Composer in SAP NetWeaver Developer Studio to adapt an ESOA (Enterprise Service Oriented Architecture) service for consumption in Visual Composer. An ESOA service typically contains complex data structures. Service Composer enables a Visual Composer modeler to interact with a specific subset of the data structure.

The workflow for adapting an ESOA service for use in Visual Composer involves the following:

  1. Defining the interface of the service component

  2. Implementing the Web service

    1. Generating a WSDL from the service component. You will use this WSDL in Service Composer.

    2. Importing the WSDL of the ESOA service into the Service Composer development component.

    3. Using Service Composer to map between the fields in the WSDL generated from the Visual Composer service component and the corresponding fields in the WSDL generated from the ESOA service.

The result is a Web service that exposes to the user the desired interface, while activating the complex ESOA service.

Prerequisites

  • You have created a development component of type Service Composer.

  • You have created an Enterprise Application (EA) development component.

  • You have created a development component and model in Visual Composer.

Procedure

Defining the Interface of the Service Component
  1. In the Visual Composer perspective, create a Composite View model.

  2. Drag a new Service Component from the Compose task panel into your model.

  3. Create the interface for the Web service:

    1. Drill down (using double-click) into the Service Component.

    2. Add connectors as required by the planned interface of the service component to be generated:

      Data In for in ports

      Data Out for out ports

    3. Define the planned data structure for each port, by choosing Define Data from the context menu.

    4. Save the new Service Component model.

  4. In the Composite View model, redefine the ports on the Service Component placeholder to add the newly defined ports.

    For more information, see Redefine Ports/Reload Component/Reload Data Service/Replace Comp.

  5. Save the model.

Note Note

These instructions can also be performed by accessing Visual Composer in the browser.

End of the note.
Implementing the Web Service
  1. In your model, from the Service Component context menu, select Generate WSDL.

    The Select an EJB Development Component dialog box opens, listing all the possible EJB and Service Composer target projects.

  2. From the list of Matching items, select an existing Service Composer development component to contain the new component.

    Answer Yes to the message that asks you whether to open the WSDL file.

  3. Change to the Service Composer perspective.

  4. Locate the WSDL file within your EJB structure.

  5. In the context menu of the WSDL, select   Service Composition   New Composed Service  .

  6. Copy the WSDL of the ESOA service to the same folder that contains the Visual Composer WSDL.

  7. Drag the ESOA WSDL to the newly composed service you created.

    As a result, you see 2 circles that represent the Visual Composer service component interface, one for input and another for output. In addition, the ESOA service is represented by a rectangle.

  8. Connect the in ports of the newly composed service to the in ports of the ESOA service, by dragging from the circle that represents the input of the Visual Composer service to the rectangle that represents the ESOA service.

  9. Click the rectangle.

    In Properties view, in the Mapping Tab, map between the input fields of the Visual Composer service to the corresponding input fields of the ESOA service.

  10. Connect the out ports of the ESOA service to the out ports of the newly composed service, by dragging from the rectangle that represents the ESOA service, to the circle that represents the output of the Visual Composer service.

  11. Click the output circle.

    In Properties view, in the Mapping Tab, map between the output fields of the ESOA service and the corresponding output fields of the Visual Composer service.

  12. Save.