Handling Service Interfaces

Objective

After completing this lesson, you will be able to explain service interfaces

Service Interfaces Overview

Service interfaces are required at the following locations:

  • For automatic activities in BPMN processes where service interfaces act as start and end events.
  • For automatic activities where intermediate events act as trigger events.
  • In integration scenarios as outbound or inbound service interfaces.

A Web Service Description Language (WSDL) file is used to describe service interfaces. The actual data structure for service interfaces is defined by an embedded XML-schema.

Web Service Description Language (WSDL) File Design and Structure

The figure shows the different architectures between WSDL 1.1 and WSDL 2.0.

A WSDL file is an XML file defined by the following elements:

  • type (Data Type)
  • message
  • portType (Interface Type)
  • binding (Binding)
  • port (Port)
  • service (Service)

In detail:

  1. type (Data Type)

    Definition of the data types used for exchanging the messages.

  2. message

    Abstract definitions of the transmitted data, consisting of a plurality of logical components, each of which is associated with a data type definition.

  3. portType (Interface Type)

    A set of abstract operations involving the exchange of the following message types:

    Message Types

    Message Type 

    One way

    The service receives a request (message input) from the client, but it does not return a message (response).

    Request response

    The service receives a request (message input) from the client and sends a response (output message).

    Solicit response

    The service sends a message and waits for a response from the client.

    Notification

    The service sends an output message.

  4. binding (Binding)

    Determines the specific protocol and data format for the operations and messages that are given by a particular port type.

  5. port (Port)

    Specifies an address for a binding (that is, a communication interface), typically a URL. In WSDL 2.0, the name of this element was changed to endpoint.

  6. service (Service)

    Summarizes the number of ports or a port type together.

Abstract and Concrete WSDL

The main elements of WSDL files are broken into two different groups, abstract and concrete definitions. Each group contains specific elements.

Abstract Group Elements are:

  • type
  • message
  • portType (Ab WSDL 2.0: Interfaces)

Concrete Group Elements are:

  • binding
  • port (ab WSDL 2.0: Endpoints)
  • service

Service interfaces, which are stored in the Enterprise Service Repository, only represent the abstract part of service interfaces. Complete WSDL files are provided by service providers.

Service Registry

WSDL files, whether abstact or concrete, are delivered through a URL. This URL is listed along with descriptive data in a standardized directory service known as the Universal Description Discovery and Integration (UDDI). The SAP implementation is the service registry. The WSDL files are listed across domains.

Web Services Inspection Language (WSIL)

WSDL files can be stored in a Web Services Inspection Language (WSIL) document. This document contains the URLs of the WSDls on a J2EE server. A WSIL document lists only complete WSDLs. WSIL is accessed through the following url: http://<host>:<port>/inspection.wsil.

The figure shows an example of a WSDL file in the WSIL format.

Service Interface Creation in the ESR Builder

An abstract WSDL file is created when a service interface is created in the ESR builder. The figure, Service Interface Creation, schematically shows the methods by which service interfaces can be created.

Additionally the cardinalities between the different objects are displayed. Beside the most right branch, all other branches can be created in the ESR perspective of the SAP NetWeaver Developer Studio (NWDS).

The figure illustrates the cardinality between the different objects of a service interface.

Service Interface Creation in the NetWeaver Developer Studio

The procedure for creating a service interface in SAP NWDS is nearly identical to the steps you perform in the Enterprise Service Builder (ESB). The main difference lies in the use and operation of masks. A specific change list is used for creating these objects.

Step 1

In the ESR perspective, the connection to the ESR is established with the Connect button. (Number 1 in the figure)

Step 2

Connection data must have already been stored in WindowsPreferencesWeb ServicesEnterprise Service Browser.

Step 3

The type of mapping is defined here:

Step 4

In the OverviewAdvancedscreen, metadata such as direction can be entered.

Step 5

In the Detail viewDefinition screen, additional operations can be added to the marking operation:

Step 6
The input node is marked.
Step 7
Now the Add button is active. Choose it. The right side of the screen opens to choose additional options.
Step 8
Choose the Browse button, to open a new dialog box.
Step 9

Choosing the option Include Message Types allows message types to appear:

Step 10
Message types that are successfully assigned to a service interface appear. Now Save and Activate.

Service Interface Creation in the WSDL Editor

The WSDL Editor allows WSDL files to be created by hand, as shown in the figure, Creating a Service Interface with the WSDL Editor.

The figure shows the entry screens for creating a new service interface using the WSDL editor.

Differences in Service Interfaces Due to Creation Method

The Category property is selected for service interfaces created in the ESR. This property can be set to inbound or outbound.

Service providers use inbound service interfaces. Customers use outbound service interfaces. The Category property is useful for integration scenarios in which one sender is configured to 1-n receivers.

The Category property is visible in the configuration of provided services within the NetWeaver Administrator.

The figure, Provided Services Configuration View, shows an example service interface, SI_CallBackTechnicalProcess, created in the ESR-builder. The Category property for this service interface is set to inbound. This entry must be included in the abstract WSDL.

The connectivity for the service interface (WS in the example) appears in the NetWeaver Administrator under the Provided Services tab. You cannot assign a profile to the XI connectivity setting (see example).

Service Interface Usage

Service interfaces are used in BPMN processes for sending messages in automated activities or end events. Service interfaces are also used to receive messages with intermediate message events or within start trigger event service interfaces.

The figure, Using Service Interfaces, shows the following steps involved in service interface usage:

  1. Service interfaces are used in the BPMN process on the node Service Interface by importing the WSDL file.
  2. The available WSDL sources include the Enterprise Service Repository, the Services Registry, and remote access.
  3. The URL of the WSDL is set after remote access is granted. One potential source could be the WSIL document.
  4. The WSDL service interface appears under the target namespace in the WSDL file after the WSDL service interface is imported.

The figure highlights the place in the code, in which the WSDL Service interface is linked in a WSDL file.

Test the Catalog Service with WS Navigator

Exercise Information

Note

In this exercise, when the values include ##, replace the character with a two-digit number (01–30).

Exercise Options

You can perform this exercise in two ways:

  1. Live Environment: choose Start Exercise, and from the entry page choose Open PDF Document. Follow the steps described in this pdf in your own system landscape.
  2. Simulation: choose Start Exercise, and from the entry page choose Start Tutorial. Watch the step-by-step instructions within the simulation.

Note

We recommend running the simulation first.

Log in to track your progress & complete quizzes