Export (0) Print
Expand All

Using SOAP to call PDS Methods

Office 2003

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 3.0 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.

Note You can write a client application using Microsoft Visual Basic 6 and the SOAP Toolkit. You can also use Microsoft Visual Basic .NET or Microsoft Visual C#, Microsoft .NET, and the .NET Framework for built-in support to issue SOAP calls to the PDS using the System.Web.Services namespace. See Using the Project Data Service for a description and download of sample Visual Basic 6 and C# client applications.

You can use HTTP Post instead of SOAP to communicate with the PDS, although it is usually not necessary. In some situations the Service for Enterprise Data Maintenance (EDM) requires HTTP Post. See Configuring the Service for EDM for more information.

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 Office Project Server 2003 installation. The WSDL file describes the SoapXMLRequest method, which is how client applications send their XML requests to the PDS. The following Visual Basic 6 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 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 The client must be successfully logged on to Project Server to make PDS method calls. Each method call requires the Project Server security cookie (the sCookie variable in the sample code) to be passed in. For more information, see Programmatic Logon to Project Server.

IIS Data Size Limits

To handle very large XML requests or replies, you may need to configure IIS. For POST operations to an Active Server Pages (ASP) page, IIS has default limits on the buffer size that depend on the IIS version. The default limit in IIS 4.0 is 2 MB; in IIS 5.0 the default was reduced to 128 KB as a security measure, and in IIS 6.0 the default is 256 KB.

To configure the buffer size in IIS 4.0 or 5.0, see the Knowledge Base article 260694, Description of the MaxClientRequestBuffer Registry Value.

IIS 6.0, in Microsoft Windows Server 2003, uses a combination of registry settings and XML configuration and schema files called the Metabase for fine-grained control. To configure the cache size in IIS 6.0, see the MaxCachedFileSize parameter in the IIS Help topic Global Registry Entries. For application-level control of the data buffer size, see the Metabase properties AspMaxRequestEntityAllowed and AspBufferingLimit.



© 2014 Microsoft