Because calling web services remotely is not an officially supported scenario for PerformancePoint Services development, there's no related information in the SDK. The SDK uses the BIMonitoringServiceApplicationProxy and SPDataStore objects to perform authoring and processing tasks from code running within the SharePoint environment. However, should you choose to author content remotely through the web service, here is some information that you may find useful.

About PPSAuthoringService

The PPSAuthoringService web service (was PmService in PerformancePoint 2007) contains web methods you can use to create, get, update, and delete first class objects (FCOs) and to retrieve metadata from data sources.

Note: PPSAuthoring only provides a few options for retrieving result data. The GenerateView and GenerateViewDirect methods return scorecard data, and the GetPreviewDataSet method retrieves a specified number of rows from a tabular data source.

The default URL for PPSAuthoringService is http[s]://[server]/[site collection path]/_vti_bin/pps/PPSAuthoringService.asmx, and its underlying class is BIMonitoringAuthoringService. Example: http://PPS14Demo/BICenter/_vti_bin/pps/PPSAuthoringService.asmx

Note: PerformancePoint Services exposes two other web services at the site-collection level: PPSRenderingService and PPSDecompRenderingService. PPSRenderingService, which was named RenderingService in PerformancePoint 2007, supports JavaScript Object Notation (JSON) only.

There are two ways that you can make client-side calls to PPSAuthoringService.

· Use the BIMonitoringAuthoringServiceProxy object. This option requires access to the Microsoft.PerformancePoint.Scorecards.Client DLL, but it provides better object-level support—and therefore a simpler programming model—for remotely authoring and processing FCOs (scorecards, reports, filters, KPIs, indicators, and dashboard page definitions (but not the dashboards that are deployed to SharePoint)). See the "Using BIMonitoringAuthoringServiceProxy" and "Using the GetListItems Method to Retrieve FCOs" sections below for code examples.

· Use the auto-generated proxy code generated from the WSDL. This option does not require access to any PerformancePoint Services DLLs, but it typically requires more complicated coding. See the "Using the WSDL proxy code" section below for a code example.

Using BIMonitoringAuthoringServiceProxy

BIMonitoringAuthoringServiceProxy sits between PerformancePoint Dashboard Designer and the PPSAuthoringService web service. Dashboard Designer uses BIMonitoringAuthoringServiceProxy for the SOAP/XML communication with PPSAuthoringService.

To use BIMonitoringAuthoringServiceProxy in your web application, you must add a reference to the Microsoft.PerformancePoint.Scorecards.Client DLL and a using directive to the Microsoft.PerformancePoint.Scorecards namespace. The DLL is installed with Dashboard Designer and with the application server. To locate the DLL on the client, run Dashboard Designer, open Task Manager, and in the Process tab, right-click DashboardDesigner.exe and select Open File Location. See PerformancePoint Services DLLs Used in Development Scenarios for more information about finding server DLLs.

The following code example shows how to instantiate a BIMonitoringAuthoringServiceProxy object and create a report using the .NET Framework 3.5.
// Instantiate a BIMonitoringAuthoringServiceProxy object.
IBIMonitoringAuthoring authoring = BIMonitoringAuthoringServiceProxy.CreateInstance("http://localhost/_vti_bin/PPS/PPSAuthoringService.asmx");
// Define the server-relative URL for the new report.
string listUrl = "/BI Center/Lists/PerformancePoint%20Content/";
// Define report properties.
ReportView newReport = ReportView.CreateNew();
// Define report properties. SubTypeId and Name are required.
newReport.SubTypeId = ReportViewNames.Url;
newReport.Name.Text = "Auto-generated Report";
newReport.Description.Text = "Report created with BIMonitoringAuthoringServiceProxy";
newReport.Owner.Login = "";
// Url reports store a URL in the CustomData property.
newReport.CustomData = "http://www.bing.com/search?q=performancepoint+services+2010&form=QBRE HTTP/1.1";
// Create the report.
authoring.CreateReportView(listUrl, newReport);

Note: You must define the Name property when you create an FCO; otherwise, you receive the error "Server was unable to process request. You do not have permissions to create a report in this list."

Using the GetListItems Method to Retrieve FCOs

PerformancePoint 2007 included web methods to retrieve collections of FCOs (such as GetDashboards to retrieve the dashboard collection). In PerformancePoint 2010, you use the GetListItems method to retrieve all FCOs stored in a PerformancePoint Content or PerformancePoint Data Connections list. Then, you can filter for FCOs of a particular type, as shown in the following extension method that retrieves all dashboards. You must instantiate BIMonitoringAuthoringServiceProxy (shown in the previous example) before you can call this method using the .NET Framework 3.5.

public static class IBIMonitoringAuthoringExtensions
{
public static List<Dashboard> GetDashboards(this IBIMonitoringAuthoring authoring, string listUrl)
{
var dashboards = new List<Dashboard>();
foreach(var item in authoring.GetListItems(listUrl))
{
if (item is Dashboard)
{
dashboards.Add(item as Dashboard);
}
}
return dashboards;
}
}

Using the WSDL Proxy Code

The following code example shows how to use the WDSL proxy to initialize an instance of a BIMonitoringAuthoringService object, create a report, and create and assign the name, description, and owner properties for the report. In the example, "PPSAS" represents the web reference set to PPSAuthoringService.

Note: After you create a web service proxy from the command line or in Visual Studio using the WSDL, you must manually remove three lines of code from the proxy object model. Otherwise, you get the following errors if you try to call the web service: "Unable to generate a temporary class" and "Cannot convert type" MemberTransform or Member. Steps to resolve these errors are described in the "Remove Three Lines of Code Before Calling the Web Service" section after the code example.

// Initialize a new instance of the Web service.
PPSAS.BIMonitoringAuthoringService authService = new PPSAS.BIMonitoringAuthoringService();
// Use the credentials of the logged-on user.
authService.Credentials = System.Net.CredentialCache.DefaultCredentials;
// Define the server-relative URL for the new report.
string listUrl = "/BI Center/Lists/PerformancePoint%20Content";
// Define report properties.
PPSAS.ReportView newReport = new PPSAS.ReportView
{
// Define the required SubTypeId property.
SubTypeId = "Url",
// Url reports store a URL in the CustomData property.
CustomData = "http://bing.com/search?q=performancepoint+services+2010&form=QBRE HTTP/1.1"
};
#region BpmProperties
// Define the report Properties property, which is a collection of three BpmProperty objects.
// Define Element_Name. This property is required.
PPSAS.BpmPropertyText bpmName = new PPSAS.BpmPropertyText
{
Description = "Description of the Name property.",
DisplayName = "Name",
Required = false,
Visible = true,
// This is the display name for the report.
Text = "Autogenerated Report",
// The UniqueName property must be defined exactly as shown.
UniqueName = "8dd07d4d87794510afdb1f07664359bc_Element_Name"
};
// Define Element_Description.
PPSAS.BpmPropertyLongText bpmDescription = new PPSAS.BpmPropertyLongText
{
Description = "Description of the Description property.",
DisplayName = "Description",
Required = false,
Visible = true,
// This text displays on the Properties tab in Dashboard Designer and
// in the PerformancePoint Content list.
Text = "Report created with the WSDL.",
// The UniqueName property must be defined exactly as shown.
UniqueName = "8dd07d4d87794510afdb1f07664359bc_Element_Description"
};
// Define Element_Owner.
PPSAS.BpmPropertyUser bpmOwner = new PPSAS.BpmPropertyUser
{
Description = "Description of the Person Responsible property.",
DisplayName = "Person Responsible",
Required = false,
Visible = true,
// This text displays on the Properties tab in Dashboard Designer and
// in the PerformancePoint Content list.
Login = "",
// The UniqueName property must be defined exactly as shown.
UniqueName = "8dd07d4d87794510afdb1f07664359bc_Element_Owner"
};
// Create a BpmProperty collection and add the new properties.
PPSAS.BpmProperty[] bpmProperties = new PPSAS.BpmProperty[3];
bpmProperties[0] = bpmName;
bpmProperties[1] = bpmDescription;
bpmProperties[2] = bpmOwner;
// Assign the properties to the new report.
newReport.Properties = bpmProperties;
#endregion
// Create the report.
authService.CreateReportView(listUrl, newReport);

Remove Three Lines of Code Before Calling the Web Service (WSDL only)

1. In the Solution Explorer pane in Visual Studio, double-click the PPSAuthoringService web service reference to display the auto-generated proxy objects in the Object Browser tab.

2. Expand the web service namespace and double-click the PropertyBag class. Remove the following lines from the Values property definition:

[System.Xml.Serialization.XmlArrayItemAttribute(typeof(Member), NestingLevel=1)]

[System.Xml.Serialization.XmlArrayItemAttribute(typeof(MemberTransform), NestingLevel=1)]

[System.Xml.Serialization.XmlArrayItemAttribute(typeof(string), NestingLevel=1)]

3. Rebuild your project.

This workaround applies to proxies that you create from the command line and proxies that Visual Studio automatically generates for web references or service references that are added to projects.

Josh Unger, Tim Morgan, Diane Diaz

Related information

PerformancePoint Services Scorecard Data Collection Sample (calls PPSAuthoringService using BIMonitoringAuthoringServiceProxy)

SPDataStore Class (contains code examples for FCO CRUD methods)

BIMonitoringServiceApplicationProxy Class

Code Sample: Custom Report, Filter, and Tabular Data Source Objects

Development Scenarios with PerformancePoint Services

[MS-PPSAS]: PerformancePoint Services Authoring Service Protocol Specification