Skip to Main Content

Security Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java code works with direct provisioning but now request-based provisioning

809412Jun 30 2011 — edited May 17 2012
OIM 11.1.1.3.0

I am currently using the following .jar in the following OIM_HOME/server folders : ConnectorResources, JavaTasks, ThirdParty

The goal is to create a user in OIM during a DBUM provisioning step. This code works fine when I do a direct provision (ie, the user shows up in the user list after running a search), but when I run a request based provision, it doesn't work at all (The user does not show up in the user list, yet other .jars still function properly). The only difference from request-based and direct provisioning are the individual it's assigned to (Direct is assigned to XELSYSADM and request is assigned to OIMINTERNAL) Is there someplace I need to be updated permissions for the adapters? What could be going wrong?

package oimuser;

import Thor.API.Exceptions.*;
import Thor.API.tcUtilityFactory.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import Thor.API.Operations.tcUserOperationsIntf;
import Thor.API.tcUtilityFactory;
import java.util.Hashtable;
import javax.naming.Context;

public class oimuser {

public oimuser() {
}

public void createUser(String uid, String fname, String lname, String password) throws tcChallengeNotSetException, tcLoginAttemptsExceededException, tcPasswordResetAttemptsExceededException, tcPasswordExpiredException, tcUserAlreadyLoggedInException, tcUserAccountInvalidException, tcUserAccountDisabledException {
try {
// Locations at oim4
System.setProperty("XL.HomeDir", "/u01/app/oracle/product/fmw/iam/server");
System.setProperty("java.security.auth.login.config", "/u01/app/oracle/product/fmw/iam/server/config/authwl.conf");
System.setProperty("Context.PROVIDER_URL", "t3://oim4.example.com:14000//oim");
System.setProperty("OIM.AppServerType", "weblogic");

// connection
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://oim4.example.com:14000/oim");

tcUtilityFactory ioUtilityFactory = new tcUtilityFactory(env, "xelsysadm", "Passw0rd");

tcUserOperationsIntf moUserUtility = (tcUserOperationsIntf) ioUtilityFactory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
Hashtable createUserCriteria = new Hashtable();
createUserCriteria.put("Users.User ID", uid);
createUserCriteria.put("Users.First Name", fname);
createUserCriteria.put("Users.Last Name", lname);
createUserCriteria.put("Organizations.Key", "1");
createUserCriteria.put("Users.Xellerate Type", "End-User");
createUserCriteria.put("Users.Role", "Full-Time");
createUserCriteria.put("Users.Password", password);
moUserUtility.createUser(createUserCriteria);
} catch (tcInvalidAttributeException e) {
e.printStackTrace();
} catch (tcAttributeMissingException e) {
e.printStackTrace();
} catch (tcDuplicateUserException e) {
e.printStackTrace();
} catch (tcAPIException e) {
e.printStackTrace();
}
}
}

Thank you kindly for any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2012
Added on Jun 30 2011
13 comments
884 views