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
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.
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.
Introduction to Data Wrangler in Microsoft Fabric
What is Data Wrangler? A key selling point of Microsoft Fabric is the Data Science
Jul
Autogen Power BI Model in Tabular Editor
In the realm of business intelligence, Power BI has emerged as a powerful tool for
Jul
Microsoft Healthcare Accelerator for Fabric
Microsoft released the Healthcare Data Solutions in Microsoft Fabric in Q1 2024. It was introduced
Jul
Unlock the Power of Colour: Make Your Power BI Reports Pop
Colour is a powerful visual tool that can enhance the appeal and readability of your
Jul
Python vs. PySpark: Navigating Data Analytics in Databricks – Part 2
Part 2: Exploring Advanced Functionalities in Databricks Welcome back to our Databricks journey! In this
May
GPT-4 with Vision vs Custom Vision in Anomaly Detection
Businesses today are generating data at an unprecedented rate. Automated processing of data is essential
May
Exploring DALL·E Capabilities
What is DALL·E? DALL·E is text-to-image generation system developed by OpenAI using deep learning methodologies.
May
Using Copilot Studio to Develop a HR Policy Bot
The next addition to Microsoft’s generative AI and large language model tools is Microsoft Copilot
Apr