Wednesday, July 22, 2020

OIMConnection

public class OIMConnection {  
   
 public static OIMclient getOIMConnection(String userName, String password, String t3URL, String authLoc){

 Hashtable env = new Hashtable();                     env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory");
 env.put(OIMClient.JAVA_NAMING_PROVIDER_URL,t3URL);

            // Set system properties
      
            System.setProperty("java.security.auth.login.config", authLoc);
            System.setProperty("OIM.AppServerType", "wls");
            System.setProperty("APPSERVER_TYPE", "wls");
   
           OIMClient client = null;
            try {
                    client  = new OIMClient(env);
                    client.login(userName, password.toCharArray());
                    System.out.println("OIM Connection is successful : ");

            } catch (Exception e) {
                System.out.println("Error  in gettting connection : "e.getMessage());
            }
        return client;
 }

No comments:

Post a Comment

Fetch Members from Workgroup

  import java.util.ArrayList;   import java.util.Iterator;   import java.util.List;   import sailpoint.api.ObjectUtil;   import sailpoint.ob...