Admin.ReadServerVersion Method
Gets the Project Server version major, minor, build, and revision numbers.
Namespace: WebSvcAdmin
Assembly: ProjectServerWebServices (in ProjectServerWebServices.dll)
Syntax
'Declaration
<SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/Admin/ReadServerVersion", RequestNamespace := "http://schemas.microsoft.com/office/project/server/webservices/Admin/", _
ResponseNamespace := "http://schemas.microsoft.com/office/project/server/webservices/Admin/", _
Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ReadServerVersion As DataSet
'Usage
Dim instance As Admin
Dim returnValue As DataSet
returnValue = instance.ReadServerVersion()
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/office/project/server/webservices/Admin/ReadServerVersion", RequestNamespace = "http://schemas.microsoft.com/office/project/server/webservices/Admin/",
ResponseNamespace = "http://schemas.microsoft.com/office/project/server/webservices/Admin/",
Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public DataSet ReadServerVersion()
Return Value
Type: System.Data.DataSet
A DataSet with a single table named ServerVersion and one row with the column names WADMIN_VERSION_MAJOR, WADMIN_VERSION_MINOR, WADMIN_VERSION_BUILD, and WADMIN_VERSION_REVISION.
Remarks
Project Server Permissions
Permission |
Description |
---|---|
Log on to Project Server. Global permission. |
Examples
The ProjectServerVersion sample method returns a string that combines all four fields in the table.
using System;
using System.Data;
. . .
public string ProjectServerVersion(AdminWebSvc.Admin admin)
{
string major, minor, build, revision;
string version = "";
DataSet dsInfo = admin.ReadServerVersion();
DataRow row = dsInfo.Tables["ServerVersion"].Rows[0];
major = row["WADMIN_VERSION_MAJOR"].ToString();
minor = row["WADMIN_VERSION_MINOR"].ToString();
build = row["WADMIN_VERSION_BUILD"].ToString();
revision = row["WADMIN_VERSION_REVISION"].ToString();
build = build.Insert(build.Length - 4, ".");
version = major + "." +
minor + "." +
build + ", rev. " +
revision;
return version;
}
In the example, the PSI Admin Web service namespace is AdminWebSvc. The admin parameter is a class variable defined in the calling class, as follows:
public static AdminWebSvc.Admin admin = new WebSvcAdmin.Admin();
. . .
string ver = ProjectServerVersion(admin);
For example, ProjectServerVersion returns the following string for a pre-Beta 2 build: 12.0.4017.1000, rev. 8