Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.2.2
-
None
-
None
-
Grouper 2.2.2
Description
I would to retrieve a multi-valued attribute calling a grouper web service using the GrouperClient API.
I'm doing this:
WsSubjectLookup sl = new WsSubjectLookup(); |
sl.setSubjectId("myuserid"); |
|
GcGetSubjects gs = new GcGetSubjects() |
.addWsSubjectLookup(sl)
|
.addSubjectAttributeName("myattribute"); |
|
WsGetSubjectsResults results = gs.execute();
|
WsSubject[] subjects = results.getWsSubjects();
|
for(String value : subjects[0].getAttributeValues()) { |
// Only the first value of the multi-valued attribute is retrieved |
// I know that the array should have one entry for each different attribute name, |
// but I'm expecting here to have at least a string with a list of a comma separated values, |
// as happen in the Grouper UI admin panel. |
}
|
Instead if I use the LDAP search all works correctly:
GcLdapSearchAttribute ls = new GcLdapSearchAttribute() |
.assignLdapName("...") |
.addMatchingAttribute("uid", "myuserid") |
.addReturningAttribute("myattribute"); |
ls.execute();
|
ls.retrieveResultAttributeStringList(); // <-- This works! |
Thanks for your help!