Skip to Content.
Sympa Menu

grouper-users - WS replaceAllExisting behavior

Subject: Grouper Users - Open Discussion List

List archive

WS replaceAllExisting behavior


Chronological Thread 
  • From: Colin Hudler <>
  • To: Grouper Users Mailing List <>
  • Subject: WS replaceAllExisting behavior
  • Date: Wed, 21 Jan 2009 14:03:22 -0600

Greetings,

My question is about this short grouper session, where I set
replaceAllExisting to 'T', and it removes members from my list that were
already in the group, even though they are in the PUT xml.

Please let me know if that is expected behavior. Please see my attached
session, where I hope the problem is made clear.
restclient http://localhost/web/servicesRest/v1_4_000

/* -------- GET CURRENT GROUP MEMBERS (NONE) -------- */
irb:02> get "/groups/uc:delegated:nbs:testing/members"
=>
/* ------- RESPONSE --------- */
"<WsGetMembersLiteResult>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<resultMessage>Success for: clientVersion: v1_4_000, wsGroupLookups:
Array size: 1: [0]: WsGroupLookup[groupName=uc:delegated:nbs:testing]\n\n,
memberFilter: All, includeSubjectDetail: false, actAsSubject:
WsSubjectLookup[], fieldName: null, subjectAttributeNames: null\n,
paramNames: \n, params: null</resultMessage>
<success>T</success>
</resultMetadata>
<responseMetadata>
<millis>3249</millis>
<serverVersion>v1_4_000</serverVersion>
</responseMetadata>
<wsGroup>
<extension>testing</extension>
<displayExtension>testing</displayExtension>
<description>bacon</description>
<displayName>The University of
Chicago:Delegated:NBS:testing</displayName>
<name>uc:delegated:nbs:testing</name>
<uuid>147c9ba8-58d1-4517-b3c2-cc6d2f9dc85a</uuid>
</wsGroup>
</WsGetMembersLiteResult>"


/* --------- ADD TWO MEMBERS ------- */
irb:03> put "/groups/uc:delegated:nbs:testing/members", "
<WsRestAddMemberRequest>
<subjectLookups>
<WsSubjectLookup>
<subjectIdentifier>chudler</subjectIdentifier>
</WsSubjectLookup>
<WsSubjectLookup>
<subjectIdentifier>rdb</subjectIdentifier>
</WsSubjectLookup></subjectLookups>
<replaceAllExisting>T</replaceAllExisting>
</WsRestAddMemberRequest>", :content_type => 'text/xml'
=> "
/* ------ RESPONSE ------ */
<WsAddMemberResults>
<results>
<WsAddMemberResult>
<wsSubject>
<identifierLookup>chudler</identifierLookup>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>21882177X</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>chudler</string>
<string>Colin Hudler</string>
</attributeValues>
</wsSubject>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<success>T</success>
</resultMetadata>
</WsAddMemberResult>
<WsAddMemberResult>
<wsSubject>
<identifierLookup>rdb</identifierLookup>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>60045314K</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>rdb</string>
<string>Robert D Bartlett</string>
</attributeValues>
</wsSubject>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<success>T</success>
</resultMetadata>
</WsAddMemberResult>
</results>
<wsGroupAssigned>
<extension>testing</extension>
<displayExtension>testing</displayExtension>
<description>bacon</description>
<displayName>The University of Chicago:Delegated:NBS:testing</displayName>
<name>uc:delegated:nbs:testing</name>
<uuid>147c9ba8-58d1-4517-b3c2-cc6d2f9dc85a</uuid>
</wsGroupAssigned>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<resultMessage>Success for: clientVersion: v1_4_000, wsGroupLookup:
WsGroupLookup[groupName=uc:delegated:nbs:testing], subjectLookups: Array
size: 2: [0]: WsSubjectLookup[subjectIdentifier=chudler]\n[1]:
WsSubjectLookup[subjectIdenti...\n, replaceAllExisting: true, actAsSubject:
null, fieldName: null, txType: NONE, includeGroupDetail: false,
includeSubjectDetail: false, subjectAttributeNames: null\n, params:
null</resultMessage>
<success>T</success>
</resultMetadata>
<subjectAttributeNames>
<string>id</string>
<string>login</string>
<string>name</string>
</subjectAttributeNames>
<responseMetadata>
<millis>9496</millis>
<serverVersion>v1_4_000</serverVersion>
</responseMetadata>
</WsAddMemberResults>"

/* -------- GET MEMBERSHIP AGAIN. CONFIRM THAT IT HAS OUR TWO NEW MEMBERS
----- */
irb:04> get "/groups/uc:delegated:nbs:testing/members"
/* ------- RESPONSE -------- */
=> "
<WsGetMembersLiteResult>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<resultMessage>Success for: clientVersion: v1_4_000, wsGroupLookups:
Array size: 1: [0]: WsGroupLookup[groupName=uc:delegated:nbs:testing]\n\n,
memberFilter: All, includeSubjectDetail: false, actAsSubject:
WsSubjectLookup[], fieldName: null, subjectAttributeNames: null\n,
paramNames: \n, params: null</resultMessage>
<success>T</success>
</resultMetadata>
<responseMetadata>
<millis>3165</millis>
<serverVersion>v1_4_000</serverVersion>
</responseMetadata>
<wsGroup>
<extension>testing</extension>
<displayExtension>testing</displayExtension>
<description>bacon</description>
<displayName>The University of Chicago:Delegated:NBS:testing</displayName>
<name>uc:delegated:nbs:testing</name>
<uuid>147c9ba8-58d1-4517-b3c2-cc6d2f9dc85a</uuid>
</wsGroup>
<wsSubjects>
<WsSubject>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>21882177X</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>chudler</string>
<string>Colin Hudler</string>
</attributeValues>
</WsSubject>
<WsSubject>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>60045314K</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>rdb</string>
<string>Robert D Bartlett</string>
</attributeValues>
</WsSubject>
</wsSubjects>
</WsGetMembersLiteResult>"

/* ------- ADD MEMBER REQUEST WITH TWO CURRENT MEMBERS PLUS NEW MEMBER. SET
replaceAllExisting = T -------------- */
irb:05> put "/groups/uc:delegated:nbs:testing/members", "
<WsRestAddMemberRequest>
<subjectLookups>
<WsSubjectLookup>
<subjectIdentifier>chudler</subjectIdentifier>
</WsSubjectLookup>
<WsSubjectLookup>
<subjectIdentifier>rdb</subjectIdentifier>
</WsSubjectLookup>
<WsSubjectLookup>
<subjectIdentifier>tbarton</subjectIdentifier>
</WsSubjectLookup>
</subjectLookups>
<replaceAllExisting>T</replaceAllExisting>
</WsRestAddMemberRequest>", :content_type => 'text/xml'
=> "
/* ------- RESPONSE. THIS INCLUDES ALL THREE MEMBERS --------- */
<WsAddMemberResults>
<results>
<WsAddMemberResult>
<wsSubject>
<identifierLookup>chudler</identifierLookup>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>21882177X</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>chudler</string>
<string>Colin Hudler</string>
</attributeValues>
</wsSubject>
<resultMetadata>
<resultCode>SUCCESS_ALREADY_EXISTED</resultCode>
<success>T</success>
</resultMetadata>
</WsAddMemberResult>
<WsAddMemberResult>
<wsSubject>
<identifierLookup>rdb</identifierLookup>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>60045314K</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>rdb</string>
<string>Robert D Bartlett</string>
</attributeValues>
</wsSubject>
<resultMetadata>
<resultCode>SUCCESS_ALREADY_EXISTED</resultCode>
<success>T</success>
</resultMetadata>
</WsAddMemberResult>
<WsAddMemberResult>
<wsSubject>
<identifierLookup>tbarton</identifierLookup>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>01191359N</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>tbarton</string>
<string>Thomas Barton</string>
</attributeValues>
</wsSubject>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<success>T</success>
</resultMetadata>
</WsAddMemberResult>
</results>
<wsGroupAssigned>
<extension>testing</extension>
<displayExtension>testing</displayExtension>
<description>bacon</description>
<displayName>The University of Chicago:Delegated:NBS:testing</displayName>
<name>uc:delegated:nbs:testing</name>
<uuid>147c9ba8-58d1-4517-b3c2-cc6d2f9dc85a</uuid>
</wsGroupAssigned>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<resultMessage>Success for: clientVersion: v1_4_000, wsGroupLookup:
WsGroupLookup[groupName=uc:delegated:nbs:testing], subjectLookups: Array
size: 3: [0]: WsSubjectLookup[subjectIdentifier=chudler]\n[1]:
WsSubjectLookup[subjectIdenti...\n, replaceAllExisting: true, actAsSubject:
null, fieldName: null, txType: NONE, includeGroupDetail: false,
includeSubjectDetail: false, subjectAttributeNames: null\n, params:
null</resultMessage>
<success>T</success>
</resultMetadata>
<subjectAttributeNames>
<string>id</string>
<string>login</string>
<string>name</string>
</subjectAttributeNames>
<responseMetadata>
<millis>12250</millis>
<serverVersion>v1_4_000</serverVersion>
</responseMetadata>
</WsAddMemberResults>"

/* ------ NOW I ASK WS FOR GROUP MEMBERS AGAIN ------- */
irb:06> get "/groups/uc:delegated:nbs:testing/members"
=> "
/* ------- RESPONSE. DOES NOT INCLUDE TWO OF THE MEMBERS ----- */
<WsGetMembersLiteResult>
<resultMetadata>
<resultCode>SUCCESS</resultCode>
<resultMessage>Success for: clientVersion: v1_4_000, wsGroupLookups:
Array size: 1: [0]: WsGroupLookup[groupName=uc:delegated:nbs:testing]\n\n,
memberFilter: All, includeSubjectDetail: false, actAsSubject:
WsSubjectLookup[], fieldName: null, subjectAttributeNames: null\n,
paramNames: \n, params: null</resultMessage>
<success>T</success>
</resultMetadata>
<responseMetadata>
<millis>2948</millis>
<serverVersion>v1_4_000</serverVersion>
</responseMetadata>
<wsGroup>
<extension>testing</extension>
<displayExtension>testing</displayExtension>
<description>bacon</description>
<displayName>The University of Chicago:Delegated:NBS:testing</displayName>
<name>uc:delegated:nbs:testing</name>
<uuid>147c9ba8-58d1-4517-b3c2-cc6d2f9dc85a</uuid>
</wsGroup>
<wsSubjects>
<WsSubject>
<resultCode>SUCCESS</resultCode>
<success>T</success>
<id>01191359N</id>
<sourceId>ucmcdb</sourceId>
<attributeValues>
<null/>
<string>tbarton</string>
<string>Thomas Barton</string>
</attributeValues>
</WsSubject>
</wsSubjects>
</WsGetMembersLiteResult>"

/* ----- WHERE DID THE OTHER TWO MEMBERS GO? ----- */



Archive powered by MHonArc 2.6.16.

Top of Page