restrictions [in]
该参数属于 restrictions 数据类型,它使用户可以限制 result 中返回的数据。result 列是由 requesttype 参数中指定的行集定义的。某些 result 列可以用于筛选所返回的行。有关这些列以及可以被限制的列的信息,请参见 xml for analysis 行集中的行集表。要获取提供程序特定的架构行集的限制信息,请使用 discover_schema_rowsets 请求类型。
该参数必须包含在内,但可以为空。
properties [in]
该参数属于 properties 数据类型,它由 xml for analysis 属性的集合构成。每个属性都可以使用户控制 discover 方法的某一方面,如指定结果集、超时的返回格式,以及指定数据格式的区域设置。
要获取可用属性及其值,可以用 discover 方法并使用 discover_properties 请求类型。标准 xml for analysis 属性的详细信息将在 xml for analysis 属性中介绍。
列在 properties 参数中的属性没有顺序要求。该参数必须包含在内,但可以为空。
result [out]
该参数是必需的,它包含提供程序作为 rowset 对象返回的结果集。
结果集的列和内容由在 requesttype 和 restrictions 参数中指定的值决定。所返回结果集的列布局也由在 requesttype 中指定的值决定。有关与各 requesttype 值相对应的行集布局的详细信息,请参见 xml for analysis 行集。
有关 rowset 数据类型的详细信息,请参见 xml for analysis 中使用的数据类型。
示例
在下面的示例中,客户端发出 xml discover 调用,向 foodmart 2000 目录请求多维数据集列表:
<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>
<format>
tabular
</format>
</propertylist>
</properties>
</discover>
</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>
<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>
execute
execute 方法用于向服务器发出操作请求。其中包括涉及数据传输的请求,如检索或更新服务器上的数据。
名称空间
urn:schemas-microsoft-com:xml-analysis
soap 操作
"urn:schemas-microsoft-com:xml-analysis:execute"
语法
execute (
[in] command as command,
[in] properties as properties,
[out] result as resultset)
参数
command [in]
该参数是必需的,它属于 command 数据类型,由要执行的提供程序特定的语句组成。xml for analysis 多维提供程序必须支持 mdxml 语言,但也可以根据需要支持其它命令。
properties [in]