Coding Groove Web Services Applications with the Groove 2007 SDK (Part 1 of 2)

Summary:  Learn to develop Groove Web Services (GWS) applications by using the Microsoft Office Groove 2007 SDK and the CodePlex GWS Helpers Library. (2 printed pages)

Office Visual How To

Applies to:  Microsoft Office Groove 2007, Microsoft Visual Studio 2008

Supriyo "SB" Chatterjee, Microsoft MVP – Groove:Architecture

April 2009


Develop web services applications for Office Groove 2007 by using the Groove SDK and Visual Studio 2008. This article is Part 1 of a two-part series about how to build Groove Web Services applications by using the Groove SDK.

Code It

Download the Code Sample

Setting up the communications using the GrooveSettings Class.

// Class for setting Groove communications parameters
// See MSDN article  -
static class GrooveSettings
    /// <summary>
    /// Get the URL for Groove web services including the port
    /// </summary>
    public static string GrooveHost
    /// <summary>
    /// Get the LocalRequestKey for authentication
    /// </summary>
    public static string RequestKey
    /// <summary>
    /// Get the LocalResponseKey for authentication
    /// </summary>
    private static string ResponseKey

    /// <summary>
    /// Checks the returned response key
    /// </summary>
    public static void VerifyResponseKey(string returnedResponseKey)

Reading Accounts and Identities

The Groove Accounts Read2 call obtains all the installed accounts in the machine. Note the use of the GrooveSettings class to set the call parameters. In this demonstration, there are two accounts on the system.

// Set up the web service call for GrooveAccounts
GrooveAccounts.GrooveAccounts svc = new GrooveAccounts.GrooveAccounts();
svc.GrooveRequestHeaderValue = new GrooveAccounts.GrooveRequestHeader();
svc.GrooveRequestHeaderValue.GrooveRequestKey = GrooveSettings.RequestKey;
svc.Url = GrooveSettings.GrooveHost + "/GWS/Groove/2.0/Accounts/";

// Get all the accounts on the client machine
GrooveAccounts.Account2[] accounts = svc.Read2();

Groove Identities are obtained from each Account that is obtained in the above Accounts call.

// Load all identities
_identities = new List<GrooveAccounts.Identity2>();

foreach (GrooveAccounts.Identity2 identity in account.Identities)

Reading Spaces and Tools

Groove Spaces are obtained from each Identity that is obtained above.

// Set up the web service call for GrooveSpaces
GrooveSpaces.GrooveSpaces spc = new GrooveSpaces.GrooveSpaces();
spc.GrooveRequestHeaderValue = new GrooveSpaces.GrooveRequestHeader();
spc.GrooveRequestHeaderValue.GrooveRequestKey = GrooveSettings.RequestKey;
spc.GrooveRequestHeaderValue.GrooveIdentityURL = identity.URI;
spc.Url = GrooveSettings.GrooveHost + identity.Spaces;

// Get the list of spaces
GrooveSpaces.Space[] allSpaces = spc.Read("");

The Groove Tools from each Space are obtained from each Space. If the Groove user is a member of a space but the space is not installed locally on the system, the example does not attempt to get information about the tools. This information is available only for spaces that are installed locally.

if(space.Local) // only spaces that are local
    // Set up the web service call for GrooveTools
    GrooveTools.GrooveTools stl = new GrooveTools.GrooveTools();
    stl.GrooveRequestHeaderValue = new GrooveTools.GrooveRequestHeader();
    stl.GrooveRequestHeaderValue.GrooveRequestKey = GrooveSettings.RequestKey;
    stl.GrooveRequestHeaderValue.GrooveIdentityURL = space.IdentityURL;
    stl.Url = GrooveSettings.GrooveHost + space.Tools;
    GrooveTools.Tool[] tools = stl.Read();

Read It

Run the demonstration example by using the F5 Debug key. The application writes out the following in sequence:

  • Account Name

  • Identity Name

  • List of Spaces

  • List of Tools per Space

At the end of each loop (per Account), the applications writes out the above list for each account that is present in the client.

Compare this example with the code and output from the second part of the demonstration: Coding Web Services Applications with CodePlex GWS Helpers (Part 2 of 2)

See It

Coding Groove Web Services Applications (Part 1)

Watch the Video

Video Length: 00:05:07

File Size: 8.2 MB WMV

Explore It