Export (0) Print
Expand All

Coding Web Services Applications with CodePlex GWS Helpers (Part 2 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. (1 printed page)

Office Visual How To

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

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

April 2009

Overview

The CodePlex GWS Helper library, used in conjunction with the Groove SDK and Visual Studio 2008, makes it easier to develop web services applications for Office Groove 2007. This article is Part 2 of a two-part series about how to build Groove Web Services applications. Part 1 showed how to develop a Groove application by using the Groove SDK.

By using the CodePlex GWS Helper library, you can reduce the complexity of your application in comparison to the application that you would create by using the Groove SDK without the Helper library.

Code It

Download the Code Sample

Setting up the application context – primarily to setup the Groove communication parameters that are used by all following GWS calls.

GrooveWebServicesV12Helpers.Context Context = new GrooveWebServicesV12Helpers.Context();

Reading Accounts, Identities, Spaces, and Tools

The Groove Accounts call obtains all the installed accounts in the machine. Note the use of the Context object obtained from the call above. In this demonstration, there are two accounts on the system.

Groove Identities are obtained from each Account. Groove Spaces are obtained from each Identity and Groove Tools 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.

GrooveWebServicesV12Helpers.Account[] Accounts = GrooveWebServicesV12Helpers.Account.GetAccounts(Context);
GrooveWebServicesV12Helpers.Identity[] Identities = Account.Identities;
GrooveWebServicesV12Helpers.Space[] Spaces = Identity.StandardSpaces;
if (Space.IsLocal)
{ ...
    GrooveWebServicesV12Helpers.Tool[] Tools = Space.Tools;
}

In contrast, the following lines of code from Part 1 read only the accounts. These lines provide the same functionality as one line of the preceding code.

// 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();
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 another account present in the client.

Compare this example with the code and output from the first part of this demonstration: Coding Groove Web Services Applications with the Groove 2007 SDK (Part 1 of 2)

See It

Coding Groove Web Services Applications (Part 2)

Watch the Video

Video Length: 00:04:52

File Size: 8.6 MB WMV

Explore It

Community Additions

ADD
Show:
© 2015 Microsoft