IBM Virtual Member Manager API(Javaコード)を使用して、カスタムLDAPリポジトリ(例:RepositoryID = custpmRepo)で新しいユーザーを作成しようとしています。ユーザー作成のためにIBMコードを使用しようとしています。しかし、これはデフォルトのリポジトリ(defaultWIMFileBasedRealm- InternalFileRepository)にユーザを作成しています。IBM VMMを使用してカスタムFederal Repositoryにユーザーを作成
IBMドキュメントは、誰もがVMMのAPI(Javaコード)を使用して、カスタムLDAPリポジトリ内のユーザーを作成する方法に私を導いてもらえhttps://www.ibm.com/support/knowledgecenter/SSAW57_8.0.0/com.ibm.websphere.wim.doc/programmingprereq.html https://www.ibm.com/support/knowledgecenter/SSAW57_8.0.0/com.ibm.websphere.wim.doc/samplecodeforworkingwithusersandgroups.html
を言及しました。以下 は、私は、ユーザー
public static void addPersonAccount(String uid, String cn, String sn)
{
System.out.println("****#### UserAndGroupSample - addPersonAccount - Entering Method");
try
{
locateService(EJB_JNDI_NAME);
DataObject root = SDOHelper.createRootDataObject();
DataObject entity = SDOHelper.createEntityDataObject(root, null,
SchemaConstants.DO_PERSON_ACCOUNT);
entity.set("uid", uid);
entity.set("cn", cn);
System.out.println("Input data graph before creating user"+ printDO(root));
// Create the PersonAccount entity
root = service.create(root);
System.out.println("Output data graph after creating user"+ printDO(root));
}
catch(Exception e)
{
System.out.println("Exception: " + e.getMessage());
e.printStackTrace();
}
System.out.println("****#### UserAndGroupSample - addPersonAccount - Exiting Method");
}