XML for Analysis (XMLA) Overview
XML for Analysis (XMLA) is a SOAP‑based protocol that enables client applications to communicate with Microsoft SQL Server Analysis Services (SSAS) and Azure Analysis Services. XMLA provides a standard way to send commands, retrieve metadata, and exchange data in a format that is both human‑readable and machine‑processable.
Architecture
XMLA sits on top of the HTTP transport layer, using either http or https. A typical XMLA exchange consists of the following components:
- Client – Sends an XMLA request.
- XMLA Endpoint – The web service URL (e.g.,
https://servername/olap/msmdpump.dll). - SSAS Engine – Processes the command and returns the response.
Request / Response
XMLA messages are wrapped in SOAP envelopes. Below is a simplified request example that executes an MDX query.
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Header/>
<Body>
<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
<Command>
<Statement>
SELECT [Measures].[Sales Amount] ON COLUMNS,
[Date].[Calendar].[Calendar Year].Members ON ROWS
FROM [Adventure Works]
</Statement>
</Command>
<Properties>
<PropertyList>
<Format>Tabular</Format>
<Content>Data</Content>
</PropertyList>
</Properties>
</Execute>
</Body>
</Envelope>
The corresponding response contains the result set in either Tabular or Multidimensional format.
Sample XMLA Session
This example demonstrates creating a session, executing a query, and closing the session.
// Create Session
POST https://servername/olap/msmdpump.dll
Content-Type: text/xml
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
<RequestType>DISCOVER_SESSIONS</RequestType>
<Restrictions/>
<Properties>
<PropertyList/>
</Properties>
</Discover>
</Body>
</Envelope>
Security
XMLA supports the following authentication mechanisms:
| Method | Description |
|---|---|
| Windows Integrated Authentication | Leverages Kerberos or NTLM. |
| Basic Authentication | Username and password encoded in the HTTP header. |
| OAuth (Azure) | Access tokens for Azure Analysis Services. |