Error while using Microsoft Analysis XMLA component

venk_r
venk_r used Ask the Experts™
on
I get the below error while compiling the c# code.The code uses XMLA component to create partitions in SSAS cubes.

Error      1      The type or namespace name 'Xmla' does not exist in the namespace 'Microsoft.AnalysisServices' (are you missing an assembly reference?)

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I am using SSAS 2008 version
As I know there is no xmla type or namespace in namespace Microsoft.AnalysisServices.

If you want to send an xmla-request to an AnalysisServer your code may look like the code in my attachment.





void SendExecute(AMO.Server aServer, System.Xml.XmlDocument aXmlDocResponse)
{           
    // Step 1: start the XML/A request.
    System.Xml.XmlWriter XmlWriter = aServer.StartXmlaRequest(AMO.XmlaRequestType.Execute);

    // Step 2: writze the XML/A reqeust
    XmlWriter.WriteStartElement("Envelope", "http://schemas.xmlsoap.org/soap/envelope/");
    XmlWriter.WriteStartElement("Header");
    // ...

    // Step 3: end the XML/A request and get the System.Xml.XmlReader for parsing the result from server.
    System.Xml.XmlReader XmlReader = aServer.EndXmlaRequest();

    // Step 4: read/parse the XML/A response from server.
    XmlReader.MoveToContent();
    aXmlDocResponse.Load(XmlReader);

    // Step 5: close the System.Xml.XmlReader, to release the connection for future use.
     XmlReader.Close();
}

Open in new window

Author

Commented:
thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial