次の方法で共有


Writing a PSI Extension for Project Server 2010

The blog articles How to make PSI Extensions in Project Server 2010 - Part I and  Part II show how to create and use a simple PSI extension that reads a list of timesheets for the current user, by calling both the GetCurrentUserUid method and the ReadTimesheetList method in the extension. The code in the articles requires using the undocumented Microsoft.Office.Project.Server.Interfaces.dll and Microsoft.Office.Project.Server.Schema.dll assemblies, creates WCF channels for the Resource and Timesheet services, and then returns an XML string of the results.

The blog articles show more information about using WCF development in Project Server than the Project 2010 SDK includes. For background information about why PSI extensions in Project Server 2010 are different than extensions in Project Server 2007, read those articles.

The PSI Extensions in Project Server 2010.docx article in the attachment (PSIExtension.zip) shows how to create and use a PSI extension that makes the same calls as in the previous blog, but with the following differences:

  • Use the Resource and Timesheet proxy service files, instead of the undocumented assemblies.
  • Configure the services programmatically, similar to the same way shown in Walkthrough: Developing PSI Applications Using WCF, instead of creating a WCF ChannelFactory.
  • Return a TimesheetListDataSet, instead of a string.
  • Use an app.config file for the client, as with any other PSI service, instead of creating a ChannelFactory.

The PSIExtension.zip attachment includes the draft article, complete code of the extension and a test application, and examples of the PSIExtensions.svc and web.config files for the PSI.

--Jim

PSIExtension.zip

Comments