grouper-users - RE: How to get group name returned in WsSubject?
Subject: Grouper Users - Open Discussion List
List archive
- From: Paul Gazda <>
- To: Chris Hyzer <>, Grouper Users Mailing List <>
- Subject: RE: How to get group name returned in WsSubject?
- Date: Mon, 1 Jun 2009 16:18:51 -0700
- Accept-language: en-US
- Acceptlanguage: en-US
Chris, Thanks for the quick response. I
did get this to work by setting ws.subject.result.attribute.names
= name I had erroneously assumed that I
had to specify includeSubjectDetail=true to see the name. I can get the result using WsSubject.getAttributeValue.
I had been looking for it in the name attribute - WsSubject.getName(). It seems
odd that the name is not available through getName, but as long as I can get
the info, I’m happy. Thanks. Paul Gazda From: Chris Hyzer [mailto:] There
have been some bugs fixed with WS subject attributes post 1.4.1, e.g. https://bugs.internet2.edu/jira/browse/GRP-226 1.4.2
will be released soon. However, you can try this first: The
includeSubjectDetail will only do anything if you have attributes configured in
your grouper-ws.properties file under the setting:
ws.subject.result.detail.attribute.names (by default none). If you want
to put “name” in the request under subjectAttributeNames, the
client can decide if they want the name or not. Here is an example from
the grouper client which shows the name “test:test1” is a member of
“test:test2”: C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1>java
-jar grouperClient.jar --operation=getMembersWs --groupNames=test:test2
--subjectAttributeNames=name --debug=true DEBUG:
Reading resource: grouper.client.properties, from:
C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1\grouper.client.properties DEBUG:
WebService: connecting as user: 'mchyzer' DEBUG:
WebService: connecting to URL:
'http://localhost:8091/grouperWs/servicesRest/v1_4_000/groups' DEBUG:
WebService: logging request to: F:\temp\grouperClientWsDocuments\wsLog_2009_06\day_01\17_21_57_457_504_getMembers_request.log ################
REQUEST START (indented) ############### POST
/grouperWs/servicesRest/v1_4_000/groups HTTP/1.1 Connection:
close Authorization:
Basic xxxxxxxxxxxxxxxx User-Agent:
Jakarta Commons-HttpClient/3.1 Host:
localhost:8091 Content-Length:
216 Content-Type:
text/xml; charset=UTF-8 <WsRestGetMembersRequest>
<wsGroupLookups>
<WsGroupLookup>
<groupName>test:test2</groupName>
</WsGroupLookup>
</wsGroupLookups>
<subjectAttributeNames>
<string>name</string>
</subjectAttributeNames> </WsRestGetMembersRequest> ################
REQUEST END ############### DEBUG:
WebService: logging response to: F:\temp\grouperClientWsDocuments\wsLog_2009_06\day_01\17_21_57_457_504_getMembers_response.log ################
RESPONSE START (indented) ############### HTTP/1.1
200 OK Server:
Apache-Coyote/1.1 Set-Cookie:
JSESSIONID=xxxxxxxxxxxx; Path=/grouperWs X-Grouper-resultCode:
SUCCESS X-Grouper-success:
T X-Grouper-resultCode2:
NONE Content-Type:
text/xml Date:
Mon, 01 Jun 2009 21:21:58 GMT Connection:
close <WsGetMembersResults>
<subjectAttributeNames>
<string>name</string>
</subjectAttributeNames>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<resultMessage>Success for: clientVersion: v1_4_000, wsGroupLookups:
Array size: 1: [0]: WsGroupLookup[groupName=test:test2] ,
memberFilter: All, includeSubjectDetail: false, actAsSubject: null, fieldName:
null, subjectAttributeNames: Array size: 1: [0]: name ,
paramNames: ,
params: null</resultMessage>
<success>T</success>
</resultMetadata>
<responseMetadata>
<millis>703</millis>
<serverVersion>v1_4_002</serverVersion>
</responseMetadata>
<results>
<WsGetMembersResult>
<wsGroup>
<extension>test2</extension>
<displayExtension>test2</displayExtension>
<displayName>test:test2</displayName>
<name>test:test2</name>
<uuid>82ed6061-ac33-44df-b50d-137268ece283</uuid>
</wsGroup>
<wsSubjects>
<WsSubject>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>c80e2edf-dc46-42cb-8e39-9e952ae0cbb9</id>
<sourceId>g:gsa</sourceId>
<attributeValues>
<string>test:test1</string>
</attributeValues>
</WsSubject>
</wsSubjects>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<success>T</success>
</resultMetadata>
</WsGetMembersResult>
</results> </WsGetMembersResults> ################
RESPONSE END ############### DEBUG:
Output template: GroupIndex ${groupIndex}: success: ${resultMetadata.success}:
code: ${resultMetadata.resultCode} : group:
${wsGroup.name}: subjectIndex: ${subjectIndex}: ${wsSubject.id}, available
variables: wsGetMembersResults, grouperClientUtils, groupIndex,
wsGetMembersResult, wsGroup, resultMetadata, subjectIndex, wsSubject GroupIndex
0: success: T: code: SUCCESS: group: test:test2: subjectIndex: 0:
c80e2edf-dc46-42cb-8e39-9e952ae0cbb9 DEBUG:
Elapsed time: 1547ms C:\mchyzer\isc\dev\grouper_v1_4\grouperClient\dist\institution\grouperClient.institution-1.4.1> Thanks, Chris From: Paul Gazda [mailto:] I am searching for group members
using the GrouperClient 1.4.1 class GcGetMembers. I set
gcGetMembers.assignIncludeSubjectDetail(true), but never see a group name when
a group member is returned. I can see in a debugger that there is a WsSubject
attribute called “name”, but it is always null. The only thing
populated is the id attribute which contains the group uuid. Is there a way to
get the group name as well as the uuid? Paul Gazda |
- How to get group name returned in WsSubject?, Paul Gazda, 06/01/2009
- RE: How to get group name returned in WsSubject?, Chris Hyzer, 06/01/2009
- RE: How to get group name returned in WsSubject?, Paul Gazda, 06/01/2009
- RE: How to get group name returned in WsSubject?, Chris Hyzer, 06/01/2009
Archive powered by MHonArc 2.6.16.