Sending XML functions using XMLA

XML functions can be sent to OLAP embedded in the XMLA SOAP request.

The XML is added to the Command tag.

The Tenant tag contains the name of the tenant to which the user and database belong. This tag provides support for connections in a single or multi-tenant environment.

Request

This Execute request shows the entire SOAP request for sending a SaveKernel function:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <SOAP-ENV:Header>
    <XA:Session xmlns:XA="urn:schemas-microsoft-com:xml-analysis" mustUnderstand="1" />
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
      <Command>
        <!-- Put the XML function into this Command tag -->
        <Alea:Document xmlns:Alea="http://www.misag.com">
          <Alea:Request RequestID="73" Class="Database" Method="SaveKernel" />
        </Alea:Document>
      </Command>
      <Properties>
        <PropertyList>
          <Catalog>...</Catalog>
          <Content>SchemaData</Content>
          <Format>Multidimensional</Format>
          <AxisFormat>TupleFormat</AxisFormat>
          <UserName>...</UserName>
          <Password>...</Password>
          <Tenant>...</Tenant>
        </PropertyList>
      </Properties>
    </Execute>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Answer

This is the entire SOAP answer:


<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soap:Header>
    <Session SessionId="..." xmlns="urn:schemas-microsoft-com:xml-analysis" />
  </soap:Header>
  <soap:Body>
    <ExecuteResponse xmlns="urn:schemas-microsoft-com:xml-analysis">
      <return>
        <root xmlns="urn:schemas-microsoft-com:xml-analysis:mddataset">
          <Alea:DocumentWrapper xmlns:Alea="http://www.misag.com">
            <Alea:Document xmlns:Alea="http://www.misag.com">
              <Alea:Request RequestID="73">
                <Alea:Return />
              </Alea:Request>
            </Alea:Document>
          </Alea:DocumentWrapper>
        </root>
      </return>
    </ExecuteResponse>
  </soap:Body>
</soap:Envelope>