How To Assign Role Info When Calling the ADD_USER Service from RIDC Code? (Doc ID 1300853.1)

Last updated on SEPTEMBER 06, 2016

Applies to:

Oracle WebCenter Content - Version 10.1.3.3.3 to 10.1.4.0.0 [Release 10gR3]
Information in this document applies to any platform.
***Checked for relevance on 28-Aug-2012***

Goal

Is there any sample code on how to assign role info when calling the ADD_USER service?

Calling the ADD_USER service from RIDC API works fine except the user has only guest role by default. How to assign a "Test" role when creating a new user account.

IdcClientManager idcClientMgr = new IdcClientManager ();
IdcClient<IdcClientConfig, Protocol, Connection> idcClient = idcClientMgr.createClient(url);
idcClient.getConfig().setConnectionWaitTime(SOCKET_TIME_OUT); // 30 seconds
idcClient.getConfig().setConnectionPool(CONNECTION_MODE_SIMPLE);
IdcContext ctx = new IdcContext(userName, password);
DataBinder dataBinder = idcClient.createBinder();
dataBinder.putLocal(PARAMETER_IDC_SERVICE, SERVICE_ADD_USER);
dataBinder.putLocal(PARAMETER_USER_NAME, userId);
dataBinder.putLocal(PARAMETER_USER_TYPE, VALUE_USER_TYPE_GLOBAL);
dataBinder.putLocal(PARAMETER_FULL_NAME, fullName);
dataBinder.putLocal(PARAMETER_EMAIL, eMail);
dataBinder.putLocal(PARAMETER_ATTRIBUTE_INFO, VALUE_DUMMY_ROLE); // UCM doesn't take the dummy role! instead, 'guest' role only.
ServiceResponse response = idcClient.sendRequest(ctx, dataBinder);
DataBinder responseData = response.getResponseAsBinder();

 

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms