Assigning regular role
RoleServiceSoapServiceLocator locator = new RoleServiceSoapServiceLocator();
RoleServiceSoap service = locator.getPortal_RoleService(new URL("http://username:password@localhost:8080/api/secure/axis/Portal_RoleService"));
service.addUserRoles(userId, roleIds);
Assigning site role
UserGroupRoleServiceSoapServiceLocator locator = new UserGroupRoleServiceSoapServiceLocator();
UserGroupRoleServiceSoap service = locator.getPortal_UserGroupRoleService(new URL("http://username:password@localhost:8080/api/secure/axis/Portal_UserGroupRoleService"));
service.addUserGroupRoles(userId, siteId, roleIds);
Done!!
No comments:
Post a Comment