How To Assign Role Info When Calling the ADD_USER Service from RIDC Code?

(Doc ID 1300853.1)

Last updated on JANUARY 19, 2018

Applies to:

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


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
IdcContext ctx = new IdcContext(userName, password);
DataBinder dataBinder = idcClient.createBinder();
dataBinder.putLocal(PARAMETER_USER_NAME, userId);
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();



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