Using the Project Data Service
The sample applications that accompany this article work with both Microsoft Office Project Server 2003 and Microsoft Project Server 2002. The applications provide examples of how to log on to Project Server and call the Project Data Service (PDS) with SOAP. The PDS Test and PDSTest.NET utilities are generic applications that can call the PDS native or extension methods. The sample code helps a developer see how to call the PDS by using Microsoft Visual Basic 6 and the SOAP toolkit, as well as by using Microsoft Visual C#, Microsoft .NET, and the .NET Framework.
Download The Project Server 2003 PDS Reference (PDSReference.exe) is available from the Microsoft Download Center. The file includes the complete PDS reference, with the Visual Basic sample PDSTest and the C# sample PDSTest.NET test applications.
This article assumes that you are familiar with using Microsoft Visual Basic 6.0 and SOAP for the PDS Test Utility, and that you are familiar with C# and the .NET Framework for the PDSTest.NET sample.
Using the PDS Test Utility
The PDS Test utility is the Visual Basic 6 version of the utility that calls the PDS via SOAP. Requirements to use the sample are Microsoft Visual Studio 6.0 and the SOAP Toolkit 3.0.
To point the application to your Project Server, edit the PDSTest.ini file in the text editor of your choice and change the value for PCURL under the LOCAL group to the URL of your Project Server installation.
PDSTest.ini also contains the groups of PDS calls that are displayed in the user interface of the application. You can edit PDSTest.ini to include new groups of PDS calls to make it easier to send those requests to the PDS.
To run the PDS Test Utility:
- Open the PDSTest.vbp file using Visual Basic 6.0.
- Edit the PCURL of the PDSTest.ini file so the PDS Test Utility will use your Project Server URL.
- On the Run menu, click Start. The PDS Test Utility appears.
- In the XML Requests field, select the PDSCalls, ProjectCalls, or ResourceCalls group.
- The PDS Test Utility displays the XML requests. You can edit the default XML requests that the PDS Test Utility displays by editing the appropriate sections in the PDSTest.ini file.
- Click one of the XML requests in the group (the default PDSTest.ini file has only one request in each group). The request shows in the lower text box, where you can edit the request. The PDS Test Utility does not save edited requests in PDSTest.ini.
- Click Execute.
PDSTest.NET is the C# version of the utility that you can use to call the PDS through SOAP. Visual Studio .NET (version 2002 or 2003) and the .NET Framework (version 1.0 or 1.1) are required to use this sample.
The PDSTest.xml file contains the XML requests that you can select in the PDSTest.NET application. Edit the Request blocks in PDSTest.xml with your text editor to add or change requests. You can add as many method blocks as you want.
<methods> <method> <Request> <PDSInfo></PDSInfo> </Request> </method> <method> <Request> <ProjectsStatus></ProjectsStatus> </Request> </method> <method> <Request> <ResourcesStatus></ResourcesStatus> </Request> </method> </methods>
To run PDSTest.NET:
To examine or modify the PDSTest.NET source, open the PDSTest.Net.sln file in Visual C# .NET. You can run the application within Visual Studio: click Start on the Debug menu and follow the steps below.
To run the PDSTest.NET executable, double-click PDSTest.NET.exe in the pdsTest.NET\Release directory.
- Enter your Project Server URL in the URL text box. For example, enter:
http://servername/projectserver or https://servername/projectserver
- If you want to save the URL in the application configuration file PDSTest.NET.exe.config, click SaveURL.
Note SaveURL works only when you run the executable file, since it modifies PDSTest.NET.exe.config outside of Visual Studio.
- If you are using Project Server authentication, enter your Project Server user name and password. Or, check Use Trusted Connection to log on Project Server using Windows authentication.
- In the drop-down list box, select PDSInfo, ProjectsStatus or ResourcesStatus. These are the default requests in the file PDSTest.xml.
- PDSTest.NET displays the full XML request you selected in the drop-down list box. You can edit the request in the text box; PDSTest.NET does not save edited requests.
- Click Execute.