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データ型で、実行するMDXステートメントで構成されています。
Properties [in]
このパラメータはParameterデータ型で、XMLAプロパティの集合から構成されます。各プロパティによって、ユーザーは接続に必要な情報の定義、結果セットの戻りフォーマットの指定、データのフォーマット用のロケール指定など、Executeメソッドの特定の側面を制御できます。
使用可能なプロパティとその値は、DiscoverメソッドでDISCOVER_PROPERTIES要求タイプを使用して取得できます。
Propertiesパラメータ内のプロパティには、必須の順序がありません。このパラメータは空でもかまいませんが、含まれている必要があります。
Result [out]
このパラメータにはプロバイダから戻されたResultsetの結果が含まれています。CommandパラメータとPropertiesパラメータの値によって、結果セットの形状が定義されます。形状を定義するプロパティが渡されない場合は、XMLAプロバイダはデフォルトの形状を使用できます。この種の指定によって定義される2つの結果セット・フォーマットとして、Tabular (タブ区切り)とMultidimensional (多次元)があり、Formatプロパティによってクライアントが指定します。OLAPデータは多次元フォーマットで提供されます(ただしタブ区切りフォーマットも使用できます)。プロバイダは追加の行セット・タイプをサポートしていることがあるため、特殊なタイプが必要なクライアントは要求できます。
例
Executeメソッドの呼出しで、<Statement>をMDX SELECTステートメントに設定した例:
<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 CrossJoin([Measures].CHILDREN , [Market].CHILDREN)
on columns, [Product].Members on rows
from Sample.Basic
</Statement>
</Command>
<Properties>
<PropertyList>
<DataSourceInfo>
Provider=Essbase;Data Source=localhost
</DataSourceInfo>
<Catalog>Sample</Catalog>
<Format>Multidimensional</Format>
<AxisFormat>TupleFormat</AxisFormat>
<Content>SchemaData</Content>
</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 xmlns="urn:schemas-microsoft-com:xml-analysis:mddataset">
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xars="urn:schemas-microsoft-com:xars">
...<!-The schema for the data goes here. -- >
</xsd:schema>
... <!-The data in MDDataSet format goes here. -- >
</root>
</m:return>
</m:ExecuteResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>