下面是服务可能为 xml for analysis 返回的 wsdl 的示例:
<?xml version='1.0' encoding='utf-8' ?>
<!-- 由 microsoft soap toolkit wsdl file generator(版本 1.1)于 02/08/01 生成 -->
<definitions name ='msxmlanalysis' targetnamespace =
'http://schemas.microsoft.com/xmla/msxmlanalysis/wsdl'
xmlns:wsdlns='http://schemas.microsoft.com/xmla/msxmlanalysis/wsdl'
xmlns:typens='http://schemas.microsoft.com/xmla/msxmlanalysis/type'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:xsd='http://www.w3.org/2000/10/xmlschema'
xmlns:stk='http://schemas.microsoft.com/soap-toolkit/wsdl-extension'
xmlns='http://schemas.xmlsoap.org/wsdl/'>
<types>
<schema targetnamespace='urn:schemas-microsoft-com:xml-analysis'
xmlns='http://www.w3.org/2000/10/xmlschema'>
</schema>
</types>
<message name='xmlanalysis.execute'>
<part name='command' type='xsd:xmldom'/>
<part name='properties' type='xsd:xmldom'/>
</message>
<message name='xmlanalysis.executeresponse'>
<part name='return' type='xsd:xmldom'/>
</message>
<message name='xmlanalysis.discover'>
<part name='requesttype' type='xsd:string'/>
<part name='restrictions' type='xsd:xmldom'/>
<part name='properties' type='xsd:xmldom'/>
</message>
<message name='xmlanalysis.discoverresponse'>
<part name='return' type='xsd:xmldom'/>
</message>
<porttype name='xmlanalysissoapport'>
<operation name='execute' parameterorder='command properties'>
<input message='wsdlns:xmlanalysis.execute' />
<output message='wsdlns:xmlanalysis.executeresponse' />
</operation>
<operation name='discover' parameterorder='requesttype restrictions
properties'>
<input message='wsdlns:xmlanalysis.discover' />
<output message='wsdlns:xmlanalysis.discoverresponse' />
</operation>
</porttype>
<binding name='xmlanalysissoapbinding' type='wsdlns:xmlanalysissoapport' >
<stk:binding preferredencoding='utf-8'/>
<soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http' />
<operation name='execute' >
<soap:operation soapaction='urn:schemas-microsoft-com:xml-analysis:execute' />
<input>
<soap:body use='encoded' namespace='urn:schemas-microsoft-com:xml-analysis'
encodingstyle='http://schemas.xmlsoap.org/soap/encoding/' />
</input>
<output>
<soap:body use='encoded' namespace='urn:schemas-microsoft-com:xml-analysis'
encodingstyle='http://schemas.xmlsoap.org/soap/encoding/' />
</output>
</operation>
<operation name='discover' >
<soap:operation soapaction='urn:schemas-microsoft-com:xml-analysis:discover' />
<input>
<soap:body use='encoded' namespace='urn:schemas-microsoft-com:xml-analysis'
encodingstyle='http://schemas.xmlsoap.org/soap/encoding/' />
</input>
<output>
<soap:body use='encoded' namespace='urn:schemas-microsoft-com:xml-analysis'
encodingstyle='http://schemas.xmlsoap.org/soap/encoding/' />
</output>
</operation>
</binding>
<service name='msxmlanalysis' >
<port name='xmlanalysissoapport' binding='wsdlns:xmlanalysissoapbinding' >
<soap:address location='http://localhost/xmla/msxisapi.dll' />
</port>
</service>
</definitions>
获取数据源
- (s) 客户端查找 olap 数据源,方法是使用从上面获得的 url 和方法信息发送 requesttype discover_datasources 的 discover 调用。在 restrictions 参数中,它为 providertype 指定 mdp(多维数据)。
- (i) 已发布数据源的列表在服务器上是一个 xml 文件,它由应用程序管理员来维护。xmlanalysis.asp 检索 xml 文档,并将它发送到客户端应用程序。
- (i) 客户端分析行集,并选择要使用的数据源。如果为数据源列出的 url 与初始 discover 方法所使用的第一个 url 不同,那么要使后面所有的 discover 和 execute 调用可以处理该数据源中的数据,必须使用第二个数据源特定的 url。
使用数据源
- (s) 客户机将 discover 命令发送到所选的 olap 数据源。要获得所有可用多维数据集列表,请使用 requesttype mdschema_cubes。限制包括用于搜索 foodmart 2000 的数据库的名称。连接提供程序所需的信息包含在 properties 参数中。