grouper-users - Re: [grouper-users] 'edit start and end date' with WS
Subject: Grouper Users - Open Discussion List
List archive
- From: Francesco Malvezzi <>
- To: Chris Hyzer <>,
- Subject: Re: [grouper-users] 'edit start and end date' with WS
- Date: Fri, 20 Apr 2012 13:58:35 +0200
- Unimore-x-sa-score: -1.2
Il 18/04/2012 15:25, Chris Hyzer ha scritto:
> See if there is a membership, then call addMember with a disabled date...
> does that work for you?
yes, it works: just for the records,
$ curl -k --header "Content-Type:text/xml" --data @addmember.xml -K
.addmember
$ cat .addmember
url =
"https://grouper.unimore.it/grouper-ws/servicesRest/xml/v2_1_000/groups/unimore%3Aplains%3Acesia/members"
user = "GrouperSystem:secret"
$ cat addmember.xml
<WsRestAddMemberRequest>
<disabledTime>2012/04/29 12:30:00.000</disabledTime>
<subjectLookups>
<WsSubjectLookup>
<subjectId>malvezzi</subjectId>
</WsSubjectLookup>
</subjectLookups>
<replaceAllExisting>F</replaceAllExisting>
<actAsSubjectLookup>
<subjectId>GrouperSystem</subjectId>
</actAsSubjectLookup>
</WsRestAddMemberRequest>
thank you,
Francesco
>
> Thanks,
> Chris
> ________________________________________
> From:
>
>
> []
> on behalf of Francesco Malvezzi
> []
> Sent: Wednesday, April 18, 2012 8:48 AM
> To: grouper-users
> Subject: [grouper-users] 'edit start and end date' with WS
>
> Hi all,
>
> We are now planning to make a bulk edit of many members' start and end date.
>
> While the procedure with gsh works:
>
> GrouperSession.startRootSession();
> subj = findSubject("a_member");
> sess = GrouperSession.start(subj);
> member = MemberFinder.findBySubject(sess, subj, false);
> group = GroupFinder.findByName(sess, "a_stem:a_group");
> membership = group.getImmediateMembership(Group.getDefaultList(),
> member, true, true);
> membership.setDisabledTime(GrouperUtil.toTimestamp("2014/11/02"));
> membership.update();
>
> We are not able to find a way to replicate with ws. At this moment the
> stopper is the membership query.
>
> Following the documentation at:
> https://spaces.internet2.edu/display/Grouper/Get+Memberships
>
> with:
> curl -k -K .curlrc
> cat .curlrc
> url =
> "https://grouper.unimore.it/grouper-ws/servicesRest/xml/v2_1_000/groups/a_stem:a_group/memberships"
> user = "GrouperSystem:secret"
>
> I always receive:
>
> <WsGetMembershipsResults><resultMetadata><resultCode>SUCCESS</resultCode><resultMessage>Found
> 0 results involving 0 groups and 0
> subjects</resultMessage><success>T</success></resultMetadata><responseMetadata><resultWarnings></resultWarnings><millis>999</millis><serverVersion>2.1.0</serverVersion></responseMetadata></WsGetMembershipsResults>
>
> With a suspicious log entry:
> 2012-04-18 14:44:46,309: [TP-Processor12] INFO EventLog.info(141) - <
> GrouperSystem - 155.185.253.69 > -
> [8a84becf890547d6afa0287df65e75bd,'GrouperSystem','application']
> session: start (1ms)
> 2012-04-18 14:44:46,312: [TP-Processor12] WARN
> WsStemLookup.retrieveStemIfNeeded(193) - < GrouperSystem -
> 155.185.253.69 > - Invalid query: WsStemLookup[
> stemFindResult=INVALID_QUERY]
>
> So, my question is: which is the preferred path of WS queries to update
> start and end date for a member?
>
> Than: where could I look to fix the membership WS? (please note the
> groups WS works fine).
>
> Thank you for your time,
>
> Francesco
>
>
- [grouper-users] 'edit start and end date' with WS, Francesco Malvezzi, 04/18/2012
- RE: [grouper-users] 'edit start and end date' with WS, Chris Hyzer, 04/18/2012
- Re: [grouper-users] 'edit start and end date' with WS, Francesco Malvezzi, 04/20/2012
- RE: [grouper-users] 'edit start and end date' with WS, Chris Hyzer, 04/18/2012
Archive powered by MHonArc 2.6.16.