Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
    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.

    h3. Overview:

    Differences between the Integration Directory and Directory API


    1. The programming interface enables you to configure multiple objects at the same time.
    2. Using the programming interface you can only edit your own change lists. You cannot take on and edit the change lists of other users.
    3. 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.
    4. 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:

    1. Web service URL from the web service runtime of the JEE server, by using the "Web Services Navigator"
    2. External definitions in the "SAP Basis 7.00" SWCV
    h4. Usage Examples:
    1. Customize Content Presentation of the Integration Directory. You can actually build your own version of the Integratoin Directory.
    2. Create custom views of the contents of the Integration Directory, for example, for the purpose of statistics or administrative reports.
    3. Create solutions or company-specific user-interfaces (e.g. maintaining partners in B2B scenarios in a spreadsheet).
    4. 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.
      1. 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:
    1. Start Visual Administrator (VA)
    2. Navigate to: Server *  »  * Services *  »  * Security Provider *  »  * Runtime *  »  * Policy Configuration
    select: sap.com/com.sap.xi.directoryaii_ibdir_sbeans.jar*
    In Security Roles: add roles api_develop and api_display to Users or Groups
    h4. Assigning roles in PI 7.1:
    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
    h4. Verify the Role Assignment:
    To make sure the assigned roles are correct, we can test using the webservice navigator:
    Start the webservice navigator: http://<server>:Directory API Development - Part 2 of 3
    Directory API Development - Part 3 of 3 </p></li></ol>
    17 Comments