该参数属于 properties 数据类型,它由 xml for analysis 属性的集合组成。每个属性都允许用户控制 execute 方法的某一方面,如定义连接所要求的信息、指定结果集的返回格式或指定数据格式的区域设置。
要获取可用属性及其值,可以用 discover 方法并使用 discover_properties 请求类型。标准 xml for analysis 属性的详细信息将在 xml for analysis 属性中介绍。
列在 properties 参数中的属性没有顺序要求。该参数必须包含在内,但可以为空。
result [out]
该参数包含提供程序所返回的 resultset 结果。command 参数和 properties 参数中的值将定义结果集的形状。如果没有传递任何形状定义属性,xml for analysis 提供程序将使用默认形状。
本规范所定义的两种结果集格式为表格式 (tabular) 和多维式 (multidimensional),符合客户端通过 format 属性指定的格式。olap 数据使用多维格式(虽然也可以使用表格格式)。提供程序可能还支持其它行集类型,了解这些特殊类型的客户端可以对它们进行请求。
示例
以下是一个 execute 方法调用的示例,其 <statement> 设置为 olap mdx select 语句:
<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=essbase;data source=local;
</datasourceinfo>
<catalog>foodmart 2000</catalog>
<format>multidimensional</format>
<axisformat>clusterformat</axisformat>
</propertylist>
</properties>
</execute>
</soap-env:body>
</soap-env:envelope>
这是对前述方法调用的简要响应:
<?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>
<m:executeresponse
xmlns:m="urn:schemas-microsoft-com:xml-analysis">
<m:return soap-env:encodingstyle=
"http://schemas.xmlsoap.org/soap/encoding/">
<root>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/xmlschema"
xmlns:xars="urn:schemas-microsoft-com:xars">
...<!—数据的架构出现在这里。-- >
</xsd:schema>
... <!—mddataset 格式的数据出现在这里。-- >
</root>
</m:return>
</m:executeresponse>
</soap-env:body>
</soap-env:envelope>
xml for analysis 中使用的数据类型
以下按字母顺序排列的列表对 xml for analysis 数据类型进行了说明并对使用标准 xml 数据类型的数据类型进行了标注。有关 xml 架构类型的详细信息,请参见 http://www.w3.org/tr/xmlschema-2/。
boolean
boolean 型使用标准 xml 布尔型数据类型。
xml 布尔型数据类型用 1 表示 true(真),用 0 表示 false(假)。
decimal
本文所述的 decimal 型使用标准 xml 十进制数据类型。
integer
本文所述的 integer 型是指标准 xml 整数数据类型。
enumstring
enumstring 数据类型为给定的枚举器 (enum) 定义一组已命名常量。enumstring 使用标准 xml 字符串数据类型。每个已命名常量的具体值都是用枚举器定义指定的。
mddataset
mddataset 格式是 execute 方法的 result 参数可以返回的格式之一。该格式用于多维数据。用 xml 表示 olap 数据要求针对 olap 的行集(或数据集),本文对其进行了说明。mddataset 数据类型的 xml 名称空间为 "urn:schemas-microsoft-com:xml-analysis:mddataset".
有关 ole db for olap 数据集结构的基本信息,请参见 mddataset 数据类型到 ole db 的映射。有关 mddataset 的完整 xml 架构定义 (xsd) 的示例,请参见附录 d。
本规范为 olap 结果定义以下 xml 结构。mddataset 由三个主要部分组成:
- olapinfo:定义结果的结构,列出并说明将使用的坐标轴和单元格
- axes:包含在 olapinfo 结构中定义的坐标轴的数据