The first step to building the .NET Web Services sample desktop application is to build the library that handles the communication between that client and Blackboard Learn. This library can also be used from within Microsoft™ Visual Studio® to build custom applications, without having to build the communication protocols. If you choose to build your own, you have access to all of the code used herein.

Prerequisites

Assumptions

This sample was written based on instructions for Microsoft™ Visual Studio® 2010 Express Edition. There is sample code specific to several versions of Visual Studio, so some steps may vary slightly. The most fluid item is the location of wsdl.exe. This seems to change depending upon the version of Microsoft™Windows® and the version of Visual Studio installed. The path to this file is required to generate the sample code used to build this library.

Build It

The sample code must be built from the command line. To access the command line in Microsoft Windows, click on the ‘Start’ menu, click run, type cmd and click ok. Once you are at the command prompt, navigate to the dotnetclient sub-directory where you unzipped the client.zip file.

In this directory, you will see a file called sampleGenClient.cmd. Edit this file in your favorite text editor. When this script is executed, it will reach out to your Blackboard instance and retrieve the wsdl for each of the available web services in order to generate the code. This requires access to the wsdl.exe executable that is part of the Microsoft Visual Studio Installation. This is set in the sampleGenClient.cmd file.

Locate the line in the file that reads:

set DOTNETBIN=

and set it to the appropriate path. Do not include wsdl.exe in the path. This will be appended by the script. This file may be located in several locations depending upon the version of Visual Studio and Windows. Some examples of where you might find this file are:

Windows

Visual Studio

WSDL.exe Location

Windows 7

Visual Studio 2010 Express

C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin

Windows Server 2008 R2

Visual Studio 2010 Express

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin

Once this edit has been made, save the file. Now from the command line, and in the dotnetclient directory, type:

sampleGenClient.cmd http://<blackboard learn domain>

You will see error messages similar to the one below. You can safely ignore these messages.Schema validation warning: Schema item 'element' named 'getServerVersion' from namespace 'http://util.ws.blackboard' is invalid. Namespace 'http://ws.platform.blackboard/xsd' is not available to be referenced in this schema. Schema validation warning: Schema item 'element' named 'getServerVersionResponse' from namespace 'http://util.ws.blackboard' is invalid. Namespace 'http://ws.platform.blackboard/xsd' is not available to be referenced in this schema. Schema validation warning: Schema item 'element' named ‘getDataSourcesResponse' from namespace 'http://util.ws.blackboard' is invalid. Namespace 'http://util.ws.blackboard/xsd' is not available to be referenced in this schema. Schema validation warning: Schema item 'element' named 'checkEntitlement' from namespace 'http://util.ws.blackboard' is invalid. Namespace 'http://ws.platform.blackboard/xsd' is not available to be referenced in this schema. Warning: Schema could not be validated. Class generation may fail or may produce incorrect results. Writing file 'C:\Users\shurrey\Blackboard\Developer Tools\Web Services\dotnetclient\BbWsClient\gen\UtilWS.cs'.

Once the sample code has been generated, the next step is to build the code into a re-usable library. To do this, you must first open Microsoft Visual Studio 2010 Express. Once the application is open, select File->Open from the menu and navigate to the .../dotnetclient/BbWsClient/BbWsClient2010.sln file and open.

Now simply build the project. To do this, right click the BbWsClient2010 project in the Solution Explorer and select ‘Build’ from the contextual menu. This will create the Dynamic Link Library (.dll) file as .../dotnetclient/BbWsClient/bin/Debug/BbWsClient.dll

The .dll file can be imported into other projects, or, as you will see in subsequent help topics, can be added to in order to create custom applications.