XML for Analysis 规范[19]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 angelgavin 的 blog

  • 下面是为此调用从客户端发送的 xml 的示例:
    soapaction: "urn:schemas-microsoft-com:xml-analysis:discover"
    <soap-env:envelope 
     xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" 
     xmlns:xsd="http://www.w3.org/2001/xmlschema">
     <soap-env:body>
      <discover xmlns="urn:schemas-microsoft-com:xml-analysis" 
      soap-env:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/">
       <requesttype>mdschema_cubes</requesttype>
        <restrictions>
           <restrictionlist>
          <catalog_name>
           foodmart 2000
          </catalog_name>
         </restrictionlist>
        </restrictions>
       <properties>
        <propertylist>
         <datasourceinfo>
          provider=msolap;data source=local;
         </datasourceinfo>
         <catalog>
          foodmart 2000
         </catalog>
        </propertylist>
       </properties>
      </discover>
     </soap-env:body>
    </soap-env:envelope>
    
  • (i) xml for analysis 提供程序处理该请求并将它发送到 olap 数据源。当收到可用的多维数据集数据后,提供程序将它打包成 xml 并将它发送回提出请求的客户端应用程序。

  • 下面是从服务器发回的带有数据的 xml 示例:
    <?xml version="1.0"?>
    <soap-env:envelope
     xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
     soap-env:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/">
     <soap-env:body>
      <discoverresponse xmlns="urn:schemas-microsoft-com:xml-analysis">
       <return>
        <root>
         <xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema">
          <!-- 结果的 xml 架构定义出现在这里 -->
          ...
         </xsd:schema>
         <row>
          <catalog_name>foodmart 2000</catalog_name>
          <cube_name>sales</cube_name>
          ...
         </row>
         <row>
          <catalog_name>foodmart 2000</catalog_name>
          <cube_name>warehouse</cube_name>
          ...
         </row>
         ...
        </root>
       </return>
      </discoverresponse>
     </soap-env:body>
    </soap-env:envelope>
    
  • (s) 客户端选择一个多维数据集,然后发送一个包含 <statement> 元素的 execute,而 <statement> 元素包含一个 mdx select 语句:“select measures.members on columns from sales”。连接信息再次在 properties 参数中提供。
    soapaction: "urn:schemas-microsoft-com:xml-analysis:execute"
    <soap-env:envelope 
     xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" 
     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" 
     xmlns:xsd="http://www.w3.org/2001/xmlschema">
     <soap-env:body>
      <execute xmlns="urn:schemas-microsoft-com:xml-analysis" 
      soap-env:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/">
       <command>
    <statement>
    select [measures].members on columns from sales
    </statement>
    </command>
       <properties>
        <propertylist>
         <datasourceinfo>
          provider=msolap;data source=local;
         </datasourceinfo>
         <catalog>
          foodmart 2000
         </catalog>
         <format>
          multidimensional
         </format>
           <axisformat>
             tupleformat
          </axisformat>
        </propertylist>
       </properties>
      </execute>
     </soap-env:body>
    </soap-env:envelope>
    
  • (i) xml for analysis 提供程序分析请求并将它发送到要填充的数据源。

  • 本文关键:XML for Analysis 规范
     

    本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

    go top