Show TOC

Developing a Web Service Provider in the ABAP Back-EndLocate this document in the navigation structure

Prerequisites

The Web service runtime has been configured (refer to Configuring the Web Service Runtime).

The SAP system uses the software component version SAP NetWeaver 7.0 EHP2, Service Package 08 or higher.

For general information on modeling Web service objects in the back-end, see Modeling Web Service Objects in the Back-End

Context

You can create a service provider locally in the back-end system using the internal ABAP modeling functions. For more information, see the documentation on modeling services in Enterprise Services Repository in the function-oriented view of the application help for SAP NetWeaver on the SAP Help Portal at http://help.sap.com.

Procedure

  1. Ensure that your namespace is assigned to the back-end.

    In transaction SPXNGENAPPL, you can check whether your namespace has been assigned to the back-end repository. If not, add it to this list and assign it to the generation source Backend Metadata Repository.

  2. In the Proxy Editor (transaction code SPROXY), in the Enterprise Services Browser right-click on Object Types and choose Create new object.
  3. Select Service Provider.
  4. Select ABAP back-end as the generation source for the service provider.
  5. Specify a name, a namespace and (optionally) a prefix.

    The external name that you define in this step is the one that is exposed to non-ABAP applications that consume or provide the Web service. Prefixes can be used to distinguish proxy objects from others. If your namespace has not been assigned to the back-end yet, you get an error message. Assign the namespace as described in step 1 above.

  6. Specify an ABAP package and a transport request.

    Either choose a transportable package or select Local Object to assign this object to your $TMP package. If you enter a package, select a request from your transport system.

  7. Finish the wizard.

    The proxy object is created and opened in the proxy editor. On the Properties tab, an empty class is displayed that you can implement as soon as the provider is activated.

  8. On the internal or external view tab, add operations to your service provider by right-clicking on the service provider node.
  9. On the internal or external view tab, right-click an operation to add message types. For an asynchronous operation, set a request message type. For a synchronous operation, also add a response, and, optionally, one or more fault message types.

    You can either add an existing message type or create a new one. Choose the appropriate action from the context menu of the operation. If you create a new one, the Enterprise Services Wizard is started and leads you through the creation process. You can also drag and drop message types from the Repository Browser or from the Enterprise Services Browser.

  10. On the internal or external view tab add datatypes to the message types by right-clicking a message type.

    You can either add existing datatypes or create a new type. Choose the appropriate action from the context menu. If you create a new type, the enterprise services wizard is started and guides you through the creation process. You can also drag and drop data types from the Repository Browser or from the Enterprise Services Browser.

    Note

    On the internal and external view tab the object a is displayed with the Check icon in front of it as long as it contains inconsistencies. Click on the same icon in the menu bar to carry out a check. This will display the individual warnings or errors.

  11. Save the service provider and activate it.

Results

The service provider has been created. You can now implement the new implementing class.