Using SOAP to call PDS Methods

Using SOAP to call PDS Methods

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

A client application making PDS method calls uses the Simple Object Access Protocol (SOAP), a lightweight, XML-based protocol for exchanging information. You will need to install the SOAP Toolkit 2.0 (Service Pack 2) to enable your application to call the PDS. More information on SOAP and downloading the SOAP Toolkit can be found at the SOAP Developer Center on MSDN.

A client application invokes PDS method calls as described by a Web Services Description Language (WSDL) document. This file is named PDS.wsdl, and is located in the virtual directory root of your Microsoft Project Server installation. The WSDL file describes the SoapXMLRequest method, which is how client applications send their XML requests to the PDS. The following Microsoft Visual BasicĀ® code shows how to call the PDSInfo method using SOAP:

  Dim sURL As String, sCookie As String, sXML As String, sRetVal As String
  Dim Client As SoapClient
  
  sXML = "<Request><PDSInfo/></Request>"
  sURL = "http://servername/projectserver/PDS.wsdl"
  Set Client = New SoapClient
  Client.mssoapinit sURL
  sRetVal = Client.SoapXMLRequest(sCookie, sXML)
  MsgBox prompt:= sRetVal

The client first creates an instance of the SoapClient object. The client then calls the SoapClient object's mssoapinit method, specifying the URL of the PDS WSDL file. After initialization, the client calls the SoapXMLRequest method, passing in the Microsoft Project Server security cookie and the method XML request. The return value of the SoapXMLRequest method is the PDS method call's reply XML.

Note that the client must be successfully logged on to Microsoft Project Server to make PDS method calls. Each method call requires the Microsoft Project Server security cookie to be passed in. For more information, see "Programmatic Logon to the Microsoft Project Server."