Groove Web Services GrooveMembers.Create
I'm developing a proof-of-concept website site in C # that will take URL query strings, map them to a Groove workspace, and then invite the user to that space if they don't have one. I have a Groove Data Bridge connection, find a workspace, read a piece of workspace items working just fine.
I came across a stumbling block in an auto-invite. I am running this as a free-standing "bridge" website, so I am trying to run it exclusively from the web server. I have a Groove ID for the person I want to invite from the database as a string:
CurrUserIdentity = grooveIdentity: // nzkth68eqzgktrb9sbr ....
But I can't seem to figure out how to turn the string into a real GrooveMember.Member that will then be invited. What's the easiest way to invite in this case?
a source to share
Finally I found:
GrooveMembers.GrooveMembers AddMember = new GrooveMembers.GrooveMembers();
AddMember.GrooveRequestHeaderValue = new GrooveMembers.GrooveRequestHeader();
AddMember.GrooveRequestHeaderValue.GrooveRequestKey = someString; //Whatever used in your envronment
AddMember.GrooveRequestHeaderValue.GrooveIdentityURL = id.URI; //URI of the local Groove identity or the Groove Data Bridge
AddMember.Url = someOtherString /*Local web string or remote host*/ + space.Members;//A property of the space you are inviting the tuser into
GrooveMembers.Member[] Members = AddMember.Read();//actually connects to the service
GrooveMembers.Member newMember = new GrooveMembers.Member();
newMember.URI = userIdentity;//A string stripped from the database and TRIMmed
newMember.Name = userFullName;//A string also pulled from the database DisplayNeme\GrooveDomain
string userContact = "/GWS/Groove/2.0/Contacts/" + userIdentity.Replace("://", "/");
newMember.Contact = userContact;// A string formatted by replacing :// with / adding "/GWS/Groove/2.0/Contacts/" to the front of the Groove Identity
newMember.Role = "$Telespace.Member";
AddMember.Create(newMember);
GrooveMembers.GrooveMembers AddMember = new GrooveMembers.GrooveMembers();
AddMember.GrooveRequestHeaderValue = new GrooveMembers.GrooveRequestHeader();
AddMember.GrooveRequestHeaderValue.GrooveRequestKey = someString; //Whatever used in your envronment
AddMember.GrooveRequestHeaderValue.GrooveIdentityURL = id.URI; //URI of the local Groove identity or the Groove Data Bridge
AddMember.Url = someOtherString [Local web string or remote host] + space.Members [A property of the space you are inviting the tuser into];
GrooveMembers.Member[] Members = AddMember.Read();//actually connects to the service
GrooveMembers.Member newMember = new GrooveMembers.Member();
newMember.URI = userIdentity;//A string stripped from the database and TRIMmed
newMember.Name = userFullName;//A string also pulled from the database DisplayNeme\GrooveDomain
string userContact = "/GWS/Groove/2.0/Contacts/" + userIdentity.Replace("://", "/");
newMember.Contact = userContact;// A string formatted by replacing :// with / adding "/GWS/Groove/2.0/Contacts/" to the front of the Groove Identity
newMember.Role = "$Telespace.Member";
AddMember.Create(newMember);
a source to share
Groove Web Services V12 Reference Library can provide a more managed API to accomplish this task - http://gwsv12helpers.codeplex.com/
a source to share