Due to the amount of information on this topic (there are over 30 screenshots not including the code listing), I have divided the blog into 3 parts. The 1st part contains the high-level view of the Directory API and pre-requisites. The Directory API Development – Part 2 of 3 contains the details of setup, e.g. importing WSDL, generating proxies, before starting code development in Directory API Development – Part 3 of 3.
Differences between the Integration Directory and Directory API
- The programming interface enables you to configure multiple objects at the same time.
- Using the programming interface you can only edit your own change lists. You cannot take on and edit the change lists of other users.
- There are no default change list, e.g. with the name “Standard Change List”, which means that you must specify a change list of your own, or else, a new change list name will be generated each time based on a combination of username and time stamp.
- There is no ‘delta’ handling of attribute changes. This means that when you make a change to an object, you will still need to specify all the attributes for that object, just as though it is a create.
h4. Using the Directory API
SAP NetWeaver PI 7.0’s Directory API is available for SAP NetWeaver PI 7.1 and since SAP NetWeaver PI 7.0 SPS13 and SAP NetWeaver XI 3.0 SPS21.
The SAP NetWeaver PI 7.0 Directory APIs are implemented as webservices in SAP NetWeaver’s java server.
Java proxies can be generated in NetWeaver Developer Studio (NWDS) from:
- Web service URL from the web service runtime of the JEE server, by using the “Web Services Navigator”
- External definitions in the “SAP Basis 7.00” SWCV
h4. Usage Examples:
- Customize Content Presentation of the Integration Directory. You can actually build your own version of the Integratoin Directory.
- Create custom views of the contents of the Integration Directory, for example, for the purpose of statistics or administrative reports.
- Create solutions or company-specific user-interfaces (e.g. maintaining partners in B2B scenarios in a spreadsheet).
- In a pub/sub scenarios, the configuration objects (e.g. communication channels, receiver agreements, etc.) can be created from an external source (e.g. file or database). 100s of objects can be created without going thru the manual process of using the Integration Directory.
- h3. Pre-Requisite of using the Directory API:
To use the Directory API, the userid must be assigned specific roles. These roles must be assigned in the java server. The roles are not available using the ABAP transaction code SU01. h4. Assigning roles in PI 7.0 or XI 3.0:
- Start Visual Administrator (VA)
- Navigate to: Server * » * Services * » * Security Provider * » * Runtime * » * Policy Configuration
In Security Roles: add roles api_develop and api_display to Users or Groups
Since Visual Administrator in no longer available with PI 7.1, we will have to use the NetWeaver Administrator.
Start the NWA using http://<server>:In Assigned Roles tab, enter search using criteria: SAP_XI_API*
Select and add roles: SAP_XI_API_DISPLAY_J2EE and SAP_XI_API_DEVELOP_J2EE
To make sure the assigned roles are correct, we can test using the webservice navigator: