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
- 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.
- In the Proxy Editor (transaction code
SPROXY), in the Enterprise Services
Browser right-click on Object Types and choose
Create new object.
- Select
Service Provider.
- Select ABAP back-end as the generation source for the
service provider.
- 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.
- 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.
- 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.
- On the internal or external view tab, add operations to your service provider by right-clicking on the service provider node.
- 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.
- 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
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.
- Save the service provider and activate it.
Results
The service provider has been created. You can now implement the new implementing class.