I am trying to call IRomoteUser.getRole(RoleAssignment), but it keep on
throw get expiration date exception, because we do not set expiration
date for the user role.
Does anyone know how to disable the expiration date check?
Here is the code
IRemoteRole roleStub = connMgr.getRoleStub(appID, appPassword);
User theUser = roleStub.getUser(userDN);
RoleAssignmentArray roleAssignments = theUser.getRoleAssignments();
RoleAssignment[] roles = roleAssignments.getRoleassignment();

if(roles != null && roles.length > 0) {

roleNames = new ArrayList<Role>();

for (RoleAssignment assignment: roles){

final Role role = roleStub.getRole(assignment.getRole());

if(role.getRoleLevel().getLevel() == roleLevel){
roleNames.add(role);
}
}
}
Error happened at final Role role =
roleStub.getRole(assignment.getRole());
Here are the error message.
INFO [RBPM]
[com.novell.idm.nrf.soap.ws.role.impl.RoleServiceSk eletonImpl:convertToNrfServiceException]
Error getting expiration date.
com.novell.idm.nrf.exception.NrfException: Error getting expiration
date.
at
com.novell.idm.nrf.persist.ReportRoleAssignmentInf o.getExpirationDate(ReportRoleAssignmentInfo.java: 344)
at
com.novell.idm.nrf.persist.RoleAssignment.getExpir ationDate(RoleAssignment.java:110)
at
com.novell.idm.nrf.soap.ws.NrfServiceHelper.conver tToRPC(NrfServiceHelper.java:1252)
at
com.novell.idm.nrf.soap.ws.NrfServiceHelper.conver tToRPC(NrfServiceHelper.java:355)
at
com.novell.idm.nrf.soap.ws.NrfServiceHelper.conver tToRPC(NrfServiceHelper.java:1288)
at
com.novell.idm.nrf.soap.ws.role.impl.RoleServiceDe legate.getRole(RoleServiceDelegate.java:354)
at
com.novell.idm.nrf.soap.ws.role.impl.RoleServiceSk eletonImpl.getRole(RoleServiceSkeletonImpl.java:25 1)
at
com.novell.idm.nrf.soap.ws.role.IRemoteRole_Servic eSkeleton._invoke(IRemoteRole_ServiceSkeleton.java :1090)
at
com.novell.soa.ws.server.ServletSkeleton.invokeEnd Point(ServletSkeleton.java:208)
at
com.novell.soa.ws.impl.soap.MessageHandlerInvoker. invokeServerMessageHandlers(MessageHandlerInvoker. java:348)
at
com.novell.soa.ws.impl.soap.SOAPHandler.handleServ erRequest(SOAPHandler.java:84)
at
com.novell.soa.ws.impl.rpc.ServerDelegateImpl.hand leServerRequest(ServerDelegateImpl.java:92)
at
com.novell.soa.ws.server.ServletSkeleton.handleReq uest(ServletSkeleton.java:107)
at
com.novell.soa.ws.server.ServletSkeleton.doPost(Se rvletSkeleton.java:317)


--
joshuaniu
------------------------------------------------------------------------
joshuaniu's Profile: http://forums.novell.com/member.php?userid=123060
View this thread: http://forums.novell.com/showthread.php?t=451449