Exploring the PerformancePoint Planning Webservice Part 1

In line with SOA architecture of many applications built today, PPS is no exception, both the Planning and Monitoring parts of PPS use a Web service’s to function.  For the moment we will explore using the planning web service with a web application in .NET 3.5.

There are 2 separate web services that are exposed, these are MetaDataManager.asmx and DataManager.asmx

MetaDataManagerWebServiceDataManagerWebService

So to begin we will create a web application in order to access the web services.  Most of the web methods cannot be invoked directly from a web browser as they do not accept primitive types.   Those that do work are the following:

MetadataManagerWebService:

  • Connect – Returns a Boolean result to test an active connection to the planning web service.
  • Disconnect – Disconnects from the planning service.
  • GetSystem (bool expandModelSitesContents) – Returns all information relating to the Server that the web service is called on, this contains a lot of information, and the relevant GUID’s for the applications and sites.

DataManagerWebService:

  • GetOverrideStatusChoices – returns the Work Unit Statuses that are available within the Planning system

Retrieving Data from the Web Service:

Let’s start with a really simple retrieval of data from the Web Service, and use the method in MetaDataManager called GetSystem.  This will form the building blocks of an application that can identify, Sites, ad models in a PPS deployment.

We need to add the web reference to the project, add both MetaDataManager.asmx and DataManager.asmx.

image

Now to test the connection lets set up the connection to the web service and call GetSystem, this should return all the information from the PPS Planning System installed on the server we are calling the web service from.

MetaDataManager.MetadataManagerWebService ppsMDM = new MetaDataManager.MetadataManagerWebService(); 
System.Net.CredentialCache myCredentials = new System.Net.CredentialCache(); 
NetworkCredential netCred = new NetworkCredential("frfrfr", "frfrr", "frfrfr"); 
myCredentials.Add(new Uri(ppsMDM.Url), "Basic", netCred); 
ppsMDM.Credentials = myCredentials; 

MetaDataManager.BizSystem bizSystem = ppsMDM.GetSystem(false);

This should not return an error, however upon further inspection you will find that the BizSystem object has a Dataset called applications, of which has no DataTables, not what we expect, especially on inspection of the XML Output that is returned from the Web service when executed in a browser. On closer inspection of the XML, it is obvious that the xml could never de-serialise into a simple DataSet… So what’s going on – how do we get the data?

<?xml version="1.0" encoding="utf-8" ?> 
      <BizSystem ...>
              <Name /> 
              <Description /> 
              <Applications>
                      <ArrayOfBizApplication>
                                 <BizApplication Id="65c3097d-8df4-4e88-a826-3d19332e2e0e" 
                                   Label="AdventureWorksCycles" 
                                    ParentId="5f4a9fe1-15a7-4215-8bbc-a9e6d14e4c3a" 
                                    >="">
                                      <Name>AdventureWorksCycles</Name> 
                                      <Description /> 
                                      <RootModelSite Id="a87d3d69-73df-48b3-82c6-a96398e552db" 
                                        Label="AWC" 
                                        ParentId="65c3097d-8df4-4e88-a826-3d19332e2e0e">
                                       <Name>AWC</Name> 
                                       <Description /> 
                                   </BizApplication>

                                   <BizApplication 
                                     Id="65c3097d-8df4-4e88-a826-3d19332e2e0e" 
                                     Label="Adatis" 
                                     ParentId="5f4a9fe1-15a7-4215-8bbc-a9e6d14e4c3a" 
                                     >="">
                                      <Name>Adatis</Name> 
                                      <Description /> 
                                      <RootModelSite  
                                        Id="a87d3d69-73df-48b3-82c6-a96398e552db" 
                                        Label="AWC" 
                                        ParentId="65c3097d-8df4-4e88-a826-3d19332e2e0e">
                                       <Name>ADATIS</Name> 
                                       <Description /> 
                                   </BizApplication>
                        </ArrayOfBizApplication>
              <Applications>

It appears that we need to write our own methods to de-serailise this object; this can be easily achieved, and gives us the ability to fully understand this object.

Leave a Reply

Your email address will not be published. Required fields are marked *