XMLA & ASP.NET -
08-13-2003
, 11:14 AM
Hi,
I am trying the below code to gain access to Analysis Services, but I
can't seem to get a result back, it always errors with Object
Reference not set, which indicates that the XML is not being set. My
set up seems to be ok, my datasources.xml is configured correctly,
XMLA only accepts POST and I can access the Analysis Services via the
management console.
Any ideas???
// Create the Xml for Analysis proxy class
MsXmlAnalysis xa = new MsXmlAnalysis();
xa.Credentials = System.Net.CredentialCache.DefaultCredentials;
//server url
xa.Url = "http://localhost/xmla/msxisapi.dll";
XmlDocument restrictDom = new XmlDocument();
XmlDocument propDom = new XmlDocument();
restrictDom.LoadXml("<RestrictionList></RestrictionList>");
propDom.LoadXml("<PropertyList></PropertyList>");
XmlElement xelem3;
// Call the execute method
xelem3 = (XmlElement)xa.Discover("DISCOVER_DATASOURCES", (XmlElement
restrictDom.FirstChild, (XmlElement)propDom.FirstChild);
//it will return the resulted xml
return "<ROOT>" + xelem3.InnerXml + "</ROOT>"; |