This blog post is about calling a remote REST Service, e.g. some 3rd Party Application, which is publishing its data via a REST API.

This could be done with the VDS, executing a HTTP Request against this REST Service.


It is also possible to perform this inside a JavaScript, which will be executed by the IdM runtime directly, without the need to set up a VDS inside your landscape.

Unfortunately, the used Rhino JavaScript Engine used inside IdM is not able to perform AJAX calls directly, so we have to do this via Java (Thanks Kai Ullrich for the hint with "Scripting Java inside JavaScript").

 

Below you find some example code.

 

Cheers, Jannis

 

 

// Main function: doTheAjax

 

function doTheAjax(Par){

 

    // import all needed Java Classes

    importClass(Packages.java.net.HttpURLConnection);

    importClass(Packages.java.net.URL);

    importClass(Packages.java.io.DataOutputStream);

    importClass(Packages.java.io.InputStreamReader);

    importClass(Packages.java.io.BufferedReader);

    importClass(Packages.java.lang.StringBuffer);

    importClass(Packages.java.lang.Integer);

 

    // variables used for the connection, best to import them via the table in a ToGeneric Pass

    var urlString = "http://host:port/rest_api";

    var urlParameters = "attribute=value";

    var httpMethod = "POST"; //or GET

    var username = "administrator";

    var password = "abcd1234";

    var encoding = uToBase64(username + ":" + password);

 

    // In case of GET, the url parameters have to be added to the URL

    if (httpMethod == "GET"){

        var url = new URL(urlString + "?" + urlParameters);

        var connection = url.openConnection();

        connection.setRequestProperty("Authorization", "Basic " + encoding);

        connection.setRequestMethod(httpMethod);

    }

    // In case of POST, the url parameters have to be transfered inside the body

    if (httpMethod == "POST"){

        // open the connection

        var url = new URL(urlString);

        var connection = url.openConnection();

        connection.setRequestProperty("Authorization", "Basic " + encoding);

        connection.setRequestMethod(httpMethod);

        connection.setDoOutput(true);

        connection.setDoInput(true);

        connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");

        connection.setRequestProperty("charset", "utf-8");

        connection.setRequestProperty("X-Requested-With", "XMLHttpRequest");

        //connection.setRequestProperty("Content-Length", "" + Integer.toString(urlParameters.getBytes().length));

        connection.setUseCaches(false);

        var os = new DataOutputStream(connection.getOutputStream());

        os.writeBytes(urlParameters);

        os.flush();

        os.close();

    }

 

    //get the result and print it out

    var responseCode = connection.getResponseCode();

 

    var is = connection.getInputStream();

    var isr = new InputStreamReader(is);

    var br = new BufferedReader(isr);

    var response = new StringBuffer();

    var line;

    while ((line = br.readLine()) != null) {

        response.append(line);

    }

    br.close();

 

    uWarning("Sending " + httpMethod + " Request to URL: " + urlString);

    uWarning("Response Code: " + responseCode);

    uWarning("Response: " + response.toString());

 

    connection.disconnect();

 

}

Hi community,


I just stumbled over the Oracle 10/11 recycle bin functionality. It seems that when creating databases with the Oracle DBCA (Database Configuration Assistant), this feature is by default turned on. With this functionality, it is possible to recover dropped tables from the recycle bin.

 

This feature is not usefull when using this database for IdM, as with every initial load / update job, temporary tables are dropped. So at the end, the databse will grow up with each of this jobs running.

 

In order to turn of, use following commands:

http://www.nabeelkhan.com/turn-off-recyclebin-in-oracle-10g11g/

 

Regards,

Jannis

For those who do not know: "SAPUI5 is our HTML5 controls library, that SAP is using as the standard User Interface Control library in all their future applications that need a "consumer grade" user experience, whether it is on desktop, tablet or smartphone." See also following blog Is this cool or what???

 

With SP 8 for SAP NetWeaver ID Mgmt 7.2, it is now posible to use (beside the already existing Web Dynpro UIs), the new SAPUI5 based end user UIs. They are delivered out of the box and are based on a new OData REST API.

 

They include, among other features, the possibility to:

  • Maintain your own data like master data, security questions, or even upload a profile picture.
  • Request new or extend existing role assignments.
  • Approve role assignments (for Managers or Role Owners).

 

The installation guide can be found on SAP Help. Below, you can find some screenshots.

 

Read also in my blogs how to Write your own UIs using the ID Mgmt REST API and Adapt the ID Mgmt Web Dynpro UIs to your Enterprise Portal Theme.

 

 

Maintain your own data:

08-07-2013 15-24-10.png

08-07-2013 15-25-25.png

 

Request new roles:

08-07-2013 15-31-50.png

08-07-2013 15-33-19.png

 

Extend role assignments:

08-07-2013 15-33-56.png

08-07-2013 15-34-58.png

 

Approval UI:

08-07-2013 15-43-59.png

Dear community,

 

please find here a noteworthy presentation about Identity Management Best Practices and the Rapid Deployment Solution, read by Kåre Indrøy.

 

http://www.sapvirtualevents.com/teched/sessiondetails.aspx?sId=3411

 

Cheers, Jannis

Web designers created a gorgeous Enterprise Portal theme for your corporate portal, which reflects your corporate identity in a nice way. But, what a pitty, everytime you open a new UI task from your ID Mgmt console, the SAP standard blue-colored Web Dynpro theme will be used.


How to change that? It is easy as this: Open your favorite administration console and change following property:

  • AS Java 7.0x: Open Visual Administrator -> Services -> Configuration Adapter -> webdynpro/sap.com/tc~wd~dispwda -> default Property Sheet  -> property sap.theme.default
  • AS Java 7.3x: Open NetWeaver Administrator -> Application Modules -> webdynpro/resources/sap.com/tc~wd~dispwda -> default Property Sheet -> property sap.theme.name.default

 

There, you have to enter the path to your theme directory you want to use (You are also able to find this folder accordingly in your file directory):

Restart you engine or the Web Dynpro Services, and all your Web Dynpro UIs will adapt to the selected Enterprise Portal Theme.

 

It is also possible to change the theme with adding a URL parameter:

http://<host>:<port>/webdynpro/dispatcher/sap.com/tc~idm~wd~workflow/Idm?sap-cssurl=http://<host>:<port>/com.sap.portal.design.portaldesigndata/themes/portal/<name_of_theme>

 

Other default themes are also available, like SAP Platinum:

http://<host>:<port>/webdynpro/dispatcher/sap.com/tc~idm~wd~workflow/Idm?sap-cssurl=http://<host>:<port>/webdynpro/resources/sap.com/tc~wd~dispwda/global/SSR/themes/sap_platinum


Read also how to Write your own UIs using the ID Mgmt REST API.

With SAP NetWeaver Identity Management 7.2 it is possible to use an application programming interface (API), in order to develop custom user interfaces (UI) for special end user scenarios.


This API uses web standards like REST (Representational State Transfer) and JSON (JavaScript Object Notation).

With this API you can make use of many different programming languages, which are able to use RESTful web services, like C#, Java, JavaScript, etc.



  • An interface description can be found in the documentation area:

https://scn.sap.com/docs/DOC-26747


  • Here you can view a video demonstrating a custom role request UI:

http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/a037522b-6067-2e10-7c94-db57233f093c

Actions

Filter Blog

By author:
By date:
By tag: