[Building Sakai] Webservices add user

Sam Chow samchow at ln.edu.hk
Sun Jun 6 18:17:15 PDT 2010


Dear Joe,

Many Thanks!

Best Regards,
Sam
  ----- Original Message ----- 
  From: Jon Wheat 
  To: Steve Swinsburg ; samchow 
  Cc: sakai-dev at collab.sakaiproject.org 
  Sent: Friday, June 04, 2010 8:39 PM
  Subject: Re: [Building Sakai] Webservices add user


  Sam,
  I've had this happen when playing around with a new script to do various soap calls.
  The success message you're getting could be success that the soap call itself ran properly, Not necessarily that the function you're calling ran successfully.  Confusing, I know, but I learned this the hard way.

  Here's a perl example from one of my scripts to get the actual result of the soap function you're calling - this may help you see if its truly working and doing what you want it to.

  my $resultcode = $soap2->addMemberToSiteWithRole($session,$SAKAI_SITE_ID,$GOBTPAC_EXTERNAL_USER,$participant_role)->result;;

  you can see I've added ->result to the end and set the entire thing to a variable.
  print $resultcode to the screen to see if it was successful.  I think a 1 is success anything else (null) is a failure.

  Two other things to note -
  +the $SAKAI_SITE_ID is the actual ID 'hash' of a site without the "/site/" part.  (unlike a couple other soap calls that require the /site/ prepended to the site_id)
  +the $participant_role is case sensitive - so "student" won't work - it must be "Student" or "Instructor"

  good luck.
  -Jon


  >>> samchow <samchow at ln.edu.hk> 6/3/2010 9:44 PM >>>
  Dear Steve,

  I have try to login win a user from ldap directory, it is success. And i
  try to use webserivce to add this user to a site, it return success, but in
  fact, cannot see this user in the site info. 

  Thanks.

  Best Regards,
  Sam Chow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100607/7a2cf645/attachment.html 


More information about the sakai-dev mailing list