It's all about IAM

Create OIM COnnection from OUTSIDE OIM 10g and OIM 11g using OLD APIsRequirement:

Requirement:

Need to call OIM APIs from OUTSIDE 

Assumption:

Demo code shows the configuration for weblogic
You need to change the RED Color lines as per your environment
Copy the WORKING copy for Design Console directory
You should have proper permissions on the copied directory

Solution:

Copy working copy of Design Console Directory to local from where you want to call OIM APIs say Designconsole

Use the below code:

System.out.println("Startup...");
System.out.println("Getting configuration...");
ConfigurationClient.ComplexSetting config =ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer");
System.out.println("Login...");
Hashtable env = config.getAllSettings();
System.out.println(env.toString());
 System.setProperty("XL.HomeDir","D:\\designconsole");
 System.out.println(System.getProperty("XL.HomeDir"));
 System.setProperty("java.security.policy","D:\\designconsole\\config\\xl.policy");
 System.setProperty("java.security.auth.login.config","D:\\designconsole\\config\\authwl.conf");
 tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env,"xelsysadm","RDEWAN1234");
tcUserOperationsIntf userIntf = (tcUserOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
System.out.println("userIntf :: " + userIntf);

No comments:

Post a Comment