Show TOC Start of Content Area

Procedure documentation Exposing Web Services as Callable Objects  Locate the document in its SAP Library structure

Use

Web services are Web interfaces that are based on open and commonly accepted standards and can be integrated into a company’s business scenarios. Using Web services enables you to combine functions implemented in different software components into a single process.

You can expose any Web service as a callable object using Guided Procedures (GP) design time:

      Local Web services

      Web services accessed through a provider system

      Web services accessed through a logical destination

      Web services published in the Services Registry (SR)

You invoke the Web service through a Service Group that you create or by choosing an existing one.

For more information about Service Groups, see Managing Service Groups.

To expose the function module as a callable object, you must use the wizard that GP design time provides.

Caution

Currently Web Service callable objects support the following SOAP encoding styles:

       SOAP Remote Procedure Call Literal encoding (SOAP RPC-literal)

       SOAP document-style encoding, which is also known as message-style or document-literal encoding

Prerequisites

      To access Web services through a provider system, you must have configured the connection to the provider system.

If you are using GPProcessDiscoveryActiveWSIL, you have to configure the connection to the provider system using a WSIL document to http://<host>:<port>/gpcore/GPProcessDiscoveryActiveWSIL/inspection.wsil

For more information, see Creating Connections to Provider Systems.

      To access Web services through a logical destination, you must have created and configured the required destinations in advance.

For more information, see Configuring Destinations for WS Callable Objects.

      To access Web services through SR, you must have configured the connection to the SR on your system.

For more information, see Configuring the Services Registry.

Procedure

1. Search Web Service Interfaces

       1.      Open the gallery and choose Create Callable Object from the contextual panel.

       2.      Enter the required basic data as follows:

Parameter

Description

Type

Choose Service Web Service.

Name

Enter a name that is used to distinguish the callable object in the gallery. You are not required to use a unique name for the callable object.

Description

Describe the callable object by entering a brief description of its functions.

Original Language

Select the original language in which the callable object is being created.

Folder

Select the folder where the callable object is stored.

Note

You can either use an existing folder, or create a new one.

       3.      To open the Define Object screen, choose Next.

       4.      Choose one of the following mechanisms to discover the Web service suitable for the given task.

WSDL URL

You use this option when you want to search for an internal or external Web service, for which you know the precise WSDL URL.

To open the configuration screen, select the WSDL radio button.

...

       1.      Enter a string that defines the WSDL URL.

       2.      Choose the GO pushbutton.

Logical Destination

You use this option when you want to browse through a set of previously defined WSDL files

Note

This option is primarily used for backward compatibility purposes.

To open the configuration screen, select the Logical Destination radio button.

...

       1.      In the Search for field, enter a search pattern.

       2.      From the Logical Destination dropdown menu, select a provider system.

       3.      Choose Search.

The list with the Web service interfaces on the provider system appears in the Result table below.

       4.      Select an interface and choose the Accept pushbutton.

Provider System

You use this option to select a provider system from the landscape and browse the Web services available on this system.

To open the configuration screen, select the Provider System radio button.

...

...

       1.      In the Search for field, enter a search pattern.

       2.      From the Provider System dropdown menu, select a provider system.

       3.      Choose Search.

The list with the Web service interfaces on the provider system appears in the Result table below.

       4.      Select an interface and choose the Accept pushbutton.

 

Service Registry

You use this option when you want to call an internal or external Web service whose corresponding WSDL is published in the SR.

For more information about publishing Web services, see Publishing to the Services Registry.

To open the configuration screen, select the Service Registry radio button.

...

From the list with available interface operations, choose an operation

The operation parameters are displayed in the right-hand part of the screen.

Example

For each particular Web service, different operations are available, for example:

       StartProcess is an operation defined for the GPProcessDiscoveryWSIL Web service. It creates an instance of a process template.

For more information, see: Consuming the GPProcessDiscovery Web Services.

       CompleteAction is defined for the GPActionDiscoveryWSIL Web service and completes a process step.

For more information, see: Consuming the GPActionDiscoveryWSIL Web Service.

2. Choose Service Group

       1.      Choose one of the following options:

       Select an existing Service Group

Choose the Choose pushbutton and from the Choose Existing dropdown menu, select a Service Group.

Note

To use this option, you must have created a Service Group in the GP framework in advance.

       Create a new Service Group

                                                  i.       Choose the Create pushbutton and in the Name field, specify a name for the Service Group.

                                                ii.       In the Description field, enter a brief description of the group.

For more information about Service Groups, see Managing Service Groups.

       2.      To save the Service Group, choose OK.

Note

In case you closed the wizard without exposing a Web service but after saving the Service Group, the Service Group can still be used at a later point in time.

3. Expose the Web Service

...

       1.      To open the Define Input screen, choose the Next pushbutton.

The input parameters of the Web service are automatically detected.

       2.      To open the Define Output screen, choose the Next pushbutton.

The output parameters of the Web service are automatically detected

       3.      Choose Next, and then Finish and Open.

The callable object design time opens. You can edit the object definition here.

Note

If the definition of the Web service you have exposed changes, you can update the existing callable object through the GP design time. On the Object Definition tab page, choose Update to update input, output, configuration parameters, result states, and exceptions defined for the selected operation.

To check for parameter compatibility, choose Check.

       4.      To activate the object, choose This graphic is explained in the accompanying text(Activate).

Result

Now you must configure the Service Group in the NWA. For more information, see Configuring Groups of Web Service Clients.

Note

If you are behind a proxy and you want to call an external service, then you should configure your proxy in the SAP NetWeaver Administrator (NWA).

For more information, see Configuring Proxy Settings.

Example

For an example of exposing a Web service as a callable object, see Importing a Web Service in Guided Procedures.

End of Content Area