XML for Analysis specification

xiaoxiao2021-03-06  115

Comprehensive summary

XML for Analysis is a XML API based on Simple Object Access Protocol, SOAP. Standardization.

Currently, under traditional data access technologies (such as OLE DB and ODBC) conditions, the client components that are closely coupled to the data provider server must be installed on the client computer to enable the application to access data from the data provider. Tightly coupled client components can establish correlations based on the following: specific hardware platforms, specific operating systems, specific interface models, specific programming languages, and specific matchs of the client and server component versions.

Relevant requirements for installing client components and related to close coupling structures are not suitable for the Internet environment, because the environment is loosely combined, stateless, cross-platform and language-independent. To provide a Reliable data access to a web application, Internet, mobile devices, and cross-platform desktop systems require a standard method, which does not require to download components to the client.

Scalable Markup Language (XML) is a language that can be accessed everywhere. What happens if you don't have to call a dedicated client component interface, you can call the method without the client component and pass the data through XML HTTP messages. What happens if the application developer can build a client component without considering the close coupling of a server component or application? If you have written in any programming language and you can run on any platform, you can access data from any location on the web without having to consider the specific platform support, or even consider the specific provider version, what is the situation? ? This specification will answer these questions through XML for Analysis.

XML for Analysis extends the concept of OLE DB, which provides standardized general data access to all standard data sources on the Web without deploying client components that provide COM interfaces. XML for Analysis is specifically optimized for web because it greatly reduces the reciprocation of the server and specifically for client requests that use stateless clients, thereby greatly improves the scalability and strongness of the data source.

This specification defines two methods: discover and execute, both methods use and send XML to discover and control stateless data.

This specification is established above HTTP, XML, and SOAP and other open Internet standards, not subject to any specific language or technology. OLE DB is also discussed in this specification, making applications developers that have been familiar with OLE DB can understand the mapping and implementation methods of XML for Analysis. These involved content provide background information for the OLE DB definitions extended by this specification.

reader

The target readers of this specification are application developers and think they are familiar with the following:

XML Knowledge SOAP Knowledge Understanding Online Analysis (OLAP) and data mining has experience using OLE DB and OLE DB for OLAP

For more information on these knowledge, see Appendix E.

aim of design

The main purposes of this specification include:

To provide a standard data access provider (available to Internet or intranet, providing multidimensional data) to provide standard data access API optimization stateless structure, no web client components, round-trip calls for minimal support for any tool, programming language, technology, hardware platform Or devices, unrelated implementation of technology, establish and repeat the successful OLE DB design concept on the open Internet standard (such as SOAP, XML, and HTTP), allowing the OLE DB for OLAP application and OLE DB provider Easily use XML for Analysis to efficiently use standard data sources (such as relational OLAP and data mining) Design summary

Designed with an XML-based API-based API, the API is called XML for Analysis, which defines two usually accessible methods: discover and execute. Since XML takes into account loosely coupled clients and server structures, both methods are processed and transmitted in XML format. The API is optimized for the Internet. In the Internet, the round trip calls of the server are costly expensive on time and resources, and the status connection of the data will limit the number of users on the server.

Discover is used to get information and metadata from the web service. This information can include data for a range of available data sources and providers about a particular data source. The property is used to define and describe which data obtained. Client applications may require multiple types of information, and discover allows you to specify this information through regular ways. This universal interface and use allows for use, without having to rewrite existing functions.

Execute is used to perform multi-dimensional expressions (MDX) or other provider specific commands for specific XML for Analysis data sources. The following illustration shows a possible implementation process of the N-layer application.

After obtaining the URL of the server where the resilient web service, the client will use the SOAP and HTTP protocol to send discover and execute call to the server. The server instantiates the XML for Analysis provider to process discover and execute calls. The XML for Analysis provides the program extracts data, packaged into XML, and then sends the requested data as XML to the client.

Discover and Execute methods enable users to determine what they can query on a particular server and submit the command to be executed thereby. The following example demonstrates how the Internet application or web service uses these methods.

Part 1 - XML ​​for Analysis

Introduction to XML for Analysis

XML for Analysis specifies SOAP-based XML communication API, which supports analyzing data exchange between clients and servers on any platform.

method

The following method provides a standard way for the basic information on the XML application access server. Since these methods are called using the SOAP protocol, they accept input and send output in XML format. By default, these methods are stateless, so the server context will terminate at the end of any command. For information on how to make status calls, see the status of stateful support in XML for Analysis.

Simplify the interface model has two methods. DiscoR method obtains information, and the execute method sends an operation request to the server. The XML namespaces of these methods are "URN: Schemas-Microsoft-COM: XML-Analysis".

In each method call, the connection information is provided through the connection attribute.

Discover

The Discover method can be used to retrieve information, such as available data source lists on the server or detailed information on specific data sources. The data retrieved by the Discover method depends on the parameter value passed to it. Name space

URN: Schemas-Microsoft-COM: XML-Analysis

SOAP operation

"URN: Schemas-Microsoft-COM: XML-Analysis: Discover"

grammar

Discover

[in] RequestType as enumstring,

[in] Restrictions as restrictions,

Properties as Properties,

[OUT] Result As Rowset

parameter

RequestType [in]

This parameter is required, which consists of the RequestTypes enumeration value, which determines the type of information to return. The discover method uses the RequestTypes enumeration to determine the structure and content of the rowset returned in the Result parameter. The format of the Restrictions parameter, and the generated XML result set also depends on the value specified in this parameter. The enumeration can be extended to support provider specific enumeration strings.

Each RequestTypes enumeration value corresponds to a return rowset. See the XML For Analysis line set for rowsetting. It is necessary to support the following clearly named RequestTypes enumeration values.

Enumeration Value Description DiscoR_DataSources returns a list of XML for Analysis available on a server or web service. (For example, see XML For Analysis implementation process step instructions.) Discover_properties Returns a list of information and values ​​for the requested attribute, which is supported by the specified data source (provider). Discover_schema_rowsets returns a name, value, and other information of all supported RequestTypes enumeration values ​​(including the values ​​listed here), as well as any other provider specific enumeration value. Discover_enumerators returns a list of names, data types, and enumerators supported by a particular data source provider. Discover_keywords returns a rowset that contains a list of keywords that contains the provider. Discover_literals Returns the direct amount of information supported by the data source provider. SCHEMA ROWSET Constant Returns the OLE DB architecture routine of the XML format in the case of a corresponding constant (such as MDSChema_cubes) corresponding to one of the schema row set names defined by the OLE DB. Note: The provider may also extend OLDB by providing other provision specific architectural rows. Table Data Provider (TDP) and Metary Data Provider (MDP) The architectural row set is columns in the Discover_schema_rowsets Rowset.

Restrictions [in]

This parameter belongs to the Restrictions data type, which allows users to limit the data returned in the Result. The Result column is defined by the rowset specified in the RequestType parameter. Some Result columns can be used to filter the returned rows. For information on these columns and columns that can be restricted, see the line set table in the XML for Analysis line. To get restrictions on the provider specific architectural rows, use the discover_schema_rowsets request type.

This parameter must be included, but it can be empty.

Properties [in]

This parameter belongs to the Properties data type, which is composed of a collection of XML for Analysis properties. Each attribute can host a single aspect of the account to control the discover method, such as the specified result set, the timeout return format, and the area settings specified in the data format. To get available properties and their values, you can use the discover method and use the discover_properties request type. The details of the standard XML for Analysis property will be described in the XML for Analysis property.

The attributes listed in the Properties parameter have no order requirements. This parameter must be included, but it can be empty.

Result [OUT]

This parameter is required, which contains the provider returned by the provider as the RowSet object.

The columns and contents of the result set are determined by the values ​​specified in the RequestType and Restrictions parameters. The column layout of the returned result set is also determined by the value specified in RequestType. For more information on the line set layout corresponding to each requestType value, see the XML for Analysis Row.

For more information on the RowSet data type, see the data type used in XML for Analysis.

Example

In the example below, the client issues an XML Discover call to request a multi-dimensional dataset list to the Foodmart 2000 directory:

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

MDSchema_cubes

Foodmart 2000

Provider = msolap; data source = local;

Foodmart 2000

Tabular

The provider returns the following results to the client:

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

...

Foodmart 2000

Sales

...

Foodmart 2000

warehouse

...

...

EXECUTE

The Execute method is used to issue an operation request to the server. These include requests involving data transmission, such as retrieving or updating data on the server.

Name space

URN: Schemas-Microsoft-COM: XML-Analysis

SOAP operation

"URN: Schemas-Microsoft-Com: Xml-Analysis: Execute"

grammar

EXECUTE

[in] Command As Command,

Properties as Properties,

[OUT] Result As ResultSet)

parameter

Command [in]

This parameter is required, it belongs to the Command data type, consists of a specific statement to be executed. The XML for Analysis multi-dimensional provider must support MDXML language, but other commands can also be supported as needed.

Properties [in]

This parameter belongs to the Properties data type, which consists of a collection of XML for Analysis properties. Each attribute allows the user to control an aspect of the execute method, such as the information required to define the connection, and the return format of the result set or the area settings in the specified data format.

To get available properties and their values, you can use the discover method and use the discover_properties request type. The details of the standard XML for Analysis property will be described in the XML for Analysis property.

The attributes listed in the Properties parameter have no order requirements. This parameter must be included, but it can be empty.

Result [OUT]

This parameter contains the ResultSet result returned by the provider. The value in the Command parameter and the Properties parameter will define the shape of the result set. If any shape definition attribute is not passed, the XML for Analysis provider will use the default shape.

The two result set formulations defined in this specification are table formats and multi-dimensionally, which is in line with the format specified by the client through the Format property. OLAP data uses a multidimensional format (although you can also use the table format). The provider may also support other line set types to understand these special types of clients can request them.

Example

The following is an example of an Execute method called, its set to the OLAP MDX SELECT statement:

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/>

SELECT [MEASURES] .members on column from sales

Provider = Essbase; Data Source = local;

Foodmart 2000

Multidimensional

ClusterFormat

This is a brief response to the aforementioned method:

SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelop/"

SOAP-ENV: EncodingStyle =

"http://schemas.xmlsoap.org/soap/encoding/">

XMLns: m = "URN: Schemas-Microsoft-COM: XML-Analysis">

"http://schemas.xmlsoap.org/soap/encoding/">

XMLns: XARS = "URN: Schemas-Microsoft-COM: XARS">

...

...

Data types used in XML for Analysis

The following list is described in the alphabetical order, and the XML For Analysis data type is described and the data type using the standard XML data type is labeled. For more information on the type of XML architecture, see http://www.w3.org/tr/xmlschema-2/.

Boolean

Boolean type uses standard XML Boolean data types.

The XML Boolean data type uses 1 to TRUE (true), using 0 to represent false (fake).

Decimal

The DECIMAL type described herein uses a standard XML decimal data type.

Integer

The INTEGER type described herein refers to the type of XML integer data type. ENUMSTRING

The EnumString data type is a given enumerator (Enum) defined a set of named constants. Enumstring uses standard XML string data types. The specific values ​​for each named constant are specified by the enumerator definition.

MDDataSet

The MDDataSet format is one of the formats that the EXECUTE method can return. This format is used for cobras. The OLAP data is used to indicate the Rowset (or Data Set) of the OLAP, which is described herein. The xml namespace of the MDDataSet data type is "URN: Schemas-Microsoft-COM: XML-Analysis: MDDataSet".

For basic information about the OLE DB for OLAP data set structure, see the MDDataSet data type to the mapping of OLE DB. For examples of the complete XML schema definition (XSD) of MDDataSet, see Appendix D.

This specification defines the following XML structure for OLAP results. MDDataSet consists of three main parts:

OLAPINFO: Defines the structure of the result, lists and explains the coordinate axes and cell axes that will be used: data containing the coordinate axes defined in the OLAPINFO structure: The data contained in the cell defined in the OLAPINFO structure

The provider can add additional annotations in the structure as long as you do not change the behavior and meaning of the schema defined here. This open content architecture model allows new elements and features from other namespaces, but do not allow the semantics of the defined elements and features.

Olapinfo

To define structures, first uses the element (note is a plural form AxES) to define the coordinate axis. The coordinate axis consists of a set of elements (note is singular form AXIS), the alias of these elements is serialized, such as Name = "Axis0". Then, the dimensional hierarchy is listed along with its attribute definition. In the subsequent example, standard member properties are represented by elements, including uname, caption, lname, and lnum, as well as non-standard DisplayInfo elements. For the Store hierarchy, the additional (non-standard) of the membership property of the space character will be described with [Store]. [SQFT].

The last item defined by the OLAPINFO structure is the attribute of the cell (column definition). This allows the cell to contain other properties. The properties in this example are Value, FmtValue, and custom properties formatstring.

...

Hierarchyinfo standard elements

The following standard elements are the elements required by the element. MDSCHEMA references refers to the definition of the OLE DB for OLAP architecture.

Elemental Description Uname From OLE DB Metal Rows of MEMBER_UNIQUE_NAME Attributes CAPTION from the MEMBER_CAPTION attribute of the OLE DB Coordinate Row Setting the LNUM from the OLE DB Roller Row Setting Level_Number Attributes from the OLE DB

Cellinfo standard elements

The following is the standard element of the element. The particular query can return these standard elements depending on the query itself. Element Description Value Value Value Properties of OLE DB Cell Properties FMTValue Formatted_Value Properties from OLE DB Units Properties Forecolor from OLE DB cell properties BackColor from OLE DB cell properties Back_Color properties

Use default values ​​in CellInfo and AxisInfo

The provider can selectively specify the default value for a single member or cell property in the AxisInfo or Cellinfo section. If the same attribute always has or often has the same value, the size of the result can be reduced.

The element can be selectively specified as a sub-element of a member attribute element or a cell properties element to represent the default value of the attribute. For example, if the provider is to specify the default value for the Store Sqft, you can specify:

5000

Thus, if there is no member attribute or cell properties in the result, the value of the member attribute or the cell property is the declared default value. In the following results, there is no output of the element, the value of is 5000 (the default value defined above):

[store]. [Ca]

CA

[store]. [State]

2

If the element exists, but no value, this means an empty string result (""), as shown in the following example:

Usually, if the attribute is null, it will be ignored. However, if the default value has been defined for the property, if you want to specify a null value for the property, you should use the empty characteristics in the XML architect specification, as shown below:

Axes

Under axes, the AXIS item will start from scratch and listed in the order in the data set. The AxisFormat property setting determines the format of each AXIS element. All XML for Analysis providers must support the following values ​​of attribute AxisFormat:

Clusterformat TupleFormat CustomFormat

The provider can selectively support the CustomFormat value as a separate format. If the client requests CustomFormat, the provider can return to one of the TupleFormat and Clusterformat formats based on the judgment. Although the provider must support all three values ​​described above, the client can request the format it needs; so the client can choose not to use all three available formats.

Why do you have different formats?

The TupleFormat and ClusterFormat settings of the AxisFormat property provide two different representation of the group. The MDDataSet defines the way two specified tuples that give programs: specify it as a multi-dimensional group or specify it as a Cartesian product. This allows client applications to choose between simplicity and reduced space requirements. The coordinate axis represents a group set, which has the same dimension. This set can be used in different ways, and different methods have different advantages. For example, the following four-dollar sets can be represented as a two-dimensional group collection or two-dimensional set of Cartesian product.

1999199920002000ActualBudgetActualBudget

The following rows expressed the quad quaternies as a two-dimensional group collection:

{(1999, Actual), (1999, Budget), (2000, Actual), (2000, budget)}

The following row expands the quad set of sets as two-dimensional set of Cartesian products:

{1999, 2000} x {actual, budget}

Both representations have advantages and disadvantages. The two-dimensional group is easy to use by the client tool. One-dimensional set of Cartesian product is small, and retains the set of multidimensional essence.

The following table lists the operations that can be used to define and describe the coordinate axis structure and members.

Operating Instructions MEMBER MEMBER SINAL INTRE TUPLE TUPLE from Different Dimensional Hierarchy Parts Vector Members From Member Objects from Tie Tie Structure Tuples Tuples with the same dimension group Objects Collection Union Sets Joint CrossProduct set flute Carl product

According to the previous example, these operations will convert the two-dimensional group and one-dimensional set of Cartesian product into the following form.

Two-dimensional group

Tuples

TUPLE (Member (1999), MEMBER (Actual),

TUPLE (MEMBER (1999), MEMBER (BUDGET),

TUPLE (MEMBER (2000), MEMBER (Actual),

TUPLE (MEMBER (2000), MEMBER (BUDGET))

)

One-dimensional set of Descartes

Crossproduct

MEMBERS (Member (1999), Member (2000)),

MEMBERS (MEMBER (Actual), MEMBER (BUDGET)

)

The XML representations of these operations follow these rules (where the member_properties value refers to the member attribute list defined in the corresponding AxisInfo section):

MEMBER: MEMBER_PROPERTIES

TUPLE: MEMBER_LIST

Set: member_list

Set: tuple_list

Set: set_list

Set: set_list

MEMBER_LIST: MEMBER [MEMBER ...]

Tuple_list: tuple [tuple ...]

SET_LIST: SET [SET ...]

As shown above, use different operations, the same set can have different representations. The client can request a specific representation method using the AxisFormat property.

TupleFormat

In TupleFormat, the coordinate axis is represented as a set of groups. The following operations must be used in the specified order:

In addition, the element must have the hierarchy feature of the designated member hierarchy.

The following example shows TupleFormat.

199919992000ActualBudgetBudget

[Time]. [1999]

?

[SCENARIO]. [Actual]

?

[Time]. [1999]

?

[SCENARIO]. [Budget]

?

[Time]. [2000]

?

[SCENARIO]. [Budget]

?

...

ClusterFormat

In ClusterFormat, the coordinate axis is represented as a set of clusters. Each cluster represents a cross product from different dimensional hierarchy. The provider will define your own specific cluster algorithm. The following operations must be used in the specified order:

To represent an object as a cluster, the element must have a Size feature, which indicates the number of meta groups generated in a single MEMBER multiplication in CrossProduct. The element must have a hierarchy feature that specifies the name of the dimensional structure of all members.

Cross product may contain members from a single dimensional hierarchy.

The following example describes two clusters:

19991999200020002001ActualBudgetAutAlBudgetBudgetCluster 1Cluster 2

[Time]. [1999]

?

[Time]. [2000]

?

[SCENARIO]. [Actual]

?

[SCENARIO]. [Budget]

?

[Time]. [2001]

?

[SCENARIO]. [Budget]

?

?

Customformat

CustomFormat allows the provider to generate a coordinate axis in a valid combination of the operations defined in any of the above sections, but there is a limit:

Only , , , and elements can appear as the first child of the coordinate axis. element under the element must contain the hierarchy feature, indicating the name of the hierarchy of the member. element must contain the hierarchy characteristic, indicating the hierarchical name of all members of the concentration.

CustomFormat enhances the flexibility and functionality of providing programs, thereby optimizing the coordinate axis.

This section is an example that the demo provider will select the return content for CustomFormat.

Wawacaumbrella (umbrella) Umbrella (Umbrella) Sunglasses (Sun glasses) Sunglasses (sunglasses) ActualBudgetAlBudget

The provider can choose to generate the following representation to the CustomFormat result. In this case, the tuple set is multiplied by the member set.

Crossproduct

Tuples

TUPLE (MEMBER (WA), MEMBER (Umbrella),

MEMBER (MEMBER (CA), MEMBER (Sunglasses)),

MEMBERS (MEMBER (Actual), MEMBER (BUDGET))

)

The above theoretical formula can be expressed as the following form using XML:

[store]. [Wa]

...

[product]. [Umbrella]

...

[store]. [Ca]

...

[product]. [Sunglasses]

...

[category]. [Actual]

...

[category]. [Budget]

...

CellData

The AxES section is followed by the CellData section, which contains the properties value of each cell. The mandatory Cellordinal characteristic represents the number of cells. For N cells, Cellordinal numbers are from 0 to N-1. If all cell properties are default (if the default value is not specified, the default value is null), there is no cell element. Note that the type of element must be specified in the CellData section, and for other standard properties, since the type is defined in the architecture, there is no need to specify the type.

16890

16,890.00

Standard

50

50

Standard

36175.2

$ 36,175.20

currency

The coordinate axis reference of the cell can be calculated according to Cellordinal. Conceptually, the number of cells in the data set is like this data set, where P is the number of coordinate axes. Each unit is arranged in the order of behavior. The figure below is the formula of the calculation unit sequence.

We will apply the above formula to the result set shown in the table below. The query requires four values ​​on the column, and there are two states and four quarters of cross multiplication on the line. In the following data set, the Cellordinal attribute of the data set part of the data set in the box is displayed {9, 10, 11, 13, 14, 15, 17, 18, 19}. This is because the cells are arranged in the order of behavior, and their start position is zero Cellordinal in the left upper corner cell.

Next, we will apply the above formula to cell {CA, Q3, and Store Cost}. The coordinate axis k = 0 has UK = 4 members, while the coordinate axis k = 1 has UK = 8 yuan groups. P is the total number of coordinate axes in the query, here is equal to 2. S0 is the initial sum of I = 0 to 1. For i = 0, the {Store Cost} is 1 in the coordinate axis 0. For i = 1, {CA, Q3} is 2.

For i = 0, EI = 1, so for i = 0, and is 1 * 1 = 1, for i = 1, and is 2 (tuple number) * 4 (value of EI, according to 1 * 4) ), Or 8, so, is 1 8 = 9, the number of the cells.

The full XML output of the above data set is displayed in Appendix D.

Command

The Command data type is an XML document type. In this version of the XML for Analysis specification, the Command data type consists only of the tag, which belongs to the type string, contains the text of the command statement. For example, the element with an MDX statement can be like the following:

Select MeasureS.Members on Column from Sales

In the subsequent version of the specification, the XML document for the Command data type will exceed the single element defined in this document.

The XML for Analysis specification requires multidimensional providers to support MDXML languages. The MDXML language will be based on MDX; current MDXML is only composed of elements. For multidimensional providers, the element must contain the MDX language statement. Enhanced versions after MDXML will add other elements to existing elements. The element will continue to support the MDX statement as a type string, even if it is extended, it supports other XML elements.

In addition to the enhanced version after MDXML, the MDX language itself is scalable so that the provider can extend the language to support other functions provided in the basic language set. For more information on MDXML, see the relationship between MDX and MDXML.

PROPERTIES

The Properties data type represents a collection of XML for Analysis properties. Each attribute is defined by the XML element, and the attribute value is the data contained in the XML element. The name of the XML element corresponds to the name of the attribute. Each provider can extend attribute sets, but the provider-specific attribute name must be a rigorous XML tag.

Example:

Provider = msolap; data source = local;

Foodmart 2000

Multidimensional

Restrictions

The Restrictions Data Type indicates the collection of restrictions to be applied during the execution of the discover method. The RESTRICTION Name Specifies the name of the restricted row column. Restriction value defines the data of the column.

Each provider can add a new architectural rowset, but to make the column can be restricted, the name must comply with the XML format integrity constraint.

The following example limits the column names in the MDSChema_cubes schema row:

Foodmart 2000

...

You can use multiple values ​​to limit the column when needed. Each value is represented by element. Example:

dbliteral_quote_prefix

dbliteral_quote_suffix

DBLITERAL_ESCAPE_UNDERSCORE_PREFIX

dbliteral_escape_underscore_suffix

...

Resultset

The ResultSet data type is a self-explanatory XML result set. It will include the data type of the XML for Analysis Format.

By default, the XML architecture is returned with the result set. This situation can be used to change this, as described in the XML for Analysis property.

Rowset

The XML architecture embedded in the row defines the specific structure of the ROWSET to return data types. The general structure of the XML for Analysis row is similar to the format of the Microsoft® SQL ServerTM 2000 rowset acquired through the For XML RAW clause, but it is an element-centered, not a property center, and allows the use of hierarchies. data.

XML does not allow the name of the specific character as elements and features. XML for Analysis supports encoding this XML constraint in the definition in SQL Server 2000. For column names containing invalid XML name characters (according to XML 1.0 specification), the invalid Unicode character will be encoded using the corresponding hexadecimal value. These values ​​are expressed as _xhhhh_, where HHHH represents the four hexadecimal UCS-2 code of the character, the high position is before. For example, the name "ORDER DETAILS" is encoded as Order_x0020_Details, where space characters are replaced by the corresponding hexadecimal code. The encoding will make the extensible style language (XSL) conversion difficult. To support the rapid lookup of column names that actually not coded, SQL: Field features can be added to the XML rowsetting architecture, each characteristic, accounts for a column. This feature is in the "URN: Schemas-Microsoft-COM: XML-SQL" namespace.

Example:

For planar data, the appearance of the XML for Analysis line set format is shown in the following example. Column name (query) is defined in the architecture as an element name. Each row is surrounded by a pair of tags:

Click here to browse

For hierarchical data (or nested line sets), such as data returned by the OLE DB query that performs data mining, the XML For Analysis row set format is shown in the following example. The structure of the row has not changed, but the data-specific architecture will define an element subtype containing nested data. In this case, the nested element is .

Click here to browse

String

The String type corresponds to the standard XML string data type.

Unsignedint

The unsignedint data type corresponds to the XML unsigned integer architecture type.

XML for Analysis

The structure of the information returned in the result parameter of the discover method is determined in accordance with the line set column layout detailed in this section.

All columns described in the following banks are required, and these columns must be returned in the order shown. However, you can add other columns (users who need these columns should be ignored) to the end, and some columns can contain empty data.

The following sections will be described. Each section contains a table, which provides the following information about each column.

Column Title Content Column Name Output The name of the column column column. Description of the data type of the type column. For more information on the data types supported by XML for Analysis, see the data type used in XML for Analysis. A brief description of the use of the column. Restrictions indicate whether to limit the returned rows (the method is through the restrictions parameter containing the discover method). "Yes" means that the column is used as the Restrictions item to filter the results in this field. Whether it can indicate whether or not the empty string is allowed when the data must be returned or when the column is not applicable. "Yes" means that it is allowed to be empty, and the data is optional. "No" means that the data is required.

Discover_DataSource

This method returns a discover_datasource in the Result parameter when the discover_datasources enumeration value in the RequestType parameter is called. Such a request type returns a list of published data sources from the URL of the application web server (in an implementation specific way), allowing the client to select the data source to connect. Column Name Type Description Limits Whether you can empty the name of the DataSourceNameString data source, such as Foodmart 2000. Whether the DataSourceDescriptionstring data source is entered by the publisher. No Yes URLString Displays a unique path to the location of the XML for Analysis method as the data source. Yes DataSourceInfostring contains a string that connects to all other information required for the data source. This string can include the INITIAL CATALOG attribute of the provider or other information. Example: "Provider = msolap; data source = local;" No is the name of the provider after the ProviderNameString data source. Example: "msdasql" is

Column Name (Continued) Type (continued) Description (continued) Whether it can be empty (continued) The data type supported by the ProvIDertypeArray provider. One or more of the following types can be included. An example is included after this watch.

TDP: Table Data Provider. MDP: Multidimensional data provider. DMP: Data Mining Provider. The DMP provider implements the OLE DB for Data Mining specification. whether

Column Name (Continued) Type (continued) Description (continued) Whether it can be empty (continued) AuthenticationModeenumString specification for security mode types used by the data source. Its value can be one of the following:

Unauthenticated: You don't have to send a user ID or password. Authenticated: The user ID and password must be included in the information that the connection requirements. Integrated: Data Source Use the infrastructure to determine authorization, such as the integration security provided by Microsoft Internet Information Services (IIS). whether

Each type supported by the provider has a corresponding element in the ProvIDertype array. For example, a provider that supports TDP, MDP, and DMP will generate the following arrays:

Discover_properties row

This method returns a discover_properties rowset in the Result parameter when you use the Discover_Properties enumeration value in the RequestType parameter. This type of request will return information about the standard properties supported by the XML for Analysis provider and providers specific properties. The provider does not support attributes are not listed in the return result.

Column Name Type Description Limits whether you can use the name of the empty PropertyNameString property. Yes, when the array is paired, the article describescriptionString's instructions for this property, the text can be localized. No is the xml data type of the PropertyTypeString property. NOPETYACCESSTYPEENUMSTRING access method. This value can be READ, WRITE or READWRITE. No isRequiredBoolean requires that attributes are true, no requirements are false. No is the current value of the valueString property. No Yes discover_schema_rowsets row

When the discover method is called in the RequestType parameter, it returns a discover_schema_rowsets in the Result parameter. This type of request will retrieve a list of all RequestTypes enumeration values ​​supported by the provider.

Column Name Type Description Limits Whether you can empty the name / request name. It will return values ​​in the RequestTypes enumeration, including all other types supported by providers. The provider will define the routine structure for other types. Whether the RestrictionsArray provides a restriction array supported by the program. Example is behind this table. NOTIONSTRIPTIONSTRING's instructions for the architecture, which can be localized. no Yes

For providers that support three restrictions on the DBSChema_members schema rowset, the results returned in the limit may be similar to the following examples. The element is the column name in the architecture.

The following table gives the OLE DB architectural routine required by the XML For Analysis table data provider and the multi-dimensional data provider. In some cases, some columns in the architecture row (the columns required by the OLE DB for OLAP provider) are optional for the XML for Analysis provider. In the following table, these optional architectural rows are labeled as an asterisk (*); the alternative column is listed later in this table.

OLE DB Architecture Rows Required Provider Description DBSChema_catalogstdp, MDP, DMP can be used to provide a directory DBSChema_columnstdp, DMP parallel DBSChema_Provider_TypestDP, DMP pair DBSChema_tablestDP, DMP Enumeration dbschema_tables_infotdp, DMP in the table, DMP, MDSchema_Actionsmdp on the table, MDSChema_Actionsmdp, MDSChema_cubesmdp, MDSchema_cubesmdp, MDSchema_Dimensions MDSChem, MDSChema_functions * MDP for all cube Supported MDX functions MDSchema_hieraceiES * MDP MDSchema_MeasureSMDP for all dimensional hierarchies MDSchema_Members * MDPChema_members * MDP for all dimensions of all dimensions of all dimensions of All Members of all dimensions * MDP Enumeration MDSChema_setsmdp for user-defined attributes that can be used for cells and members can be used in the catalog.

The architecture row set with an asterisk (*) has such a column: These columns are essential for the OLE DB for OLAP provider, but for the XML For Analysis provider, it is optional. . These options are listed in the table below. OLE DB schema rowset OLE DB required but for XML for Analysis Provider for optional column MDSCHEMA_FUNCTIONSORIGIN, INTERFACE_NAMEMDSCHEMA_HIERARCHIESSTRUCTUREMDSCHEMA_MEMBERSLEVEL_UNIQUE_NAME, LEVEL_NUMBER, PARENT_LEVELMDSCHEMA_PROPERTIESLEVEL_UNIQUE_NAME

The XML For Analysis MDP provider does not require OLE DB for OLAP's MDSchema_levels schema rowset, although the provider can selectively support it. Thus, the columns that reference other architectural row concentration becomes optional, as described above. This is because different multi-dimensional providers are different when using the term "level" (some providers are numbered from top to bottom, while others are numbered from below). In the release from this specification, more levels of architectural rows are added.

Discover_enumerators row

When the discover method is called when using the Discover_Enumerators enumeration value in the RequestType parameter, it returns a discover_enumerators rowset in the Result parameter. This request type will query the enumerator supported by the provider, including data types and values. By supporting such requests, the provider will publish all enumerations that it can identify.

Each enumerator has multiple elements, each element corresponds to a value in the enumeration. It is said that this situation is flat, and the name of the enumerator may be repeated for each element belonging to the same enumeration.

Column Name Type Description Limits whether you can include a series of enumerators that contain a series of values. Yes, when the array is dedicated to whether the enumdescriptionstring of EnumDescriptionString is localized. NO is the data type of the EnumTypeString enumeration value. No ElementNameString Enumerator The name of a value element. Example: TDP Does ElementDescriptionString The description of the element (optional) can be localized. NO is the value of the ElementValueString element. Example: 01 No Yes

Discover_keywords

When the discover method is called in the discover_keywords enumeration value in the RequestType parameter, it returns a discover_keywords rowset in the Result parameter. This type of request will list the keywords that provide programs.

Each returned keyword is a line in the discover_keywords line.

Column Name Type Description Limits Whether you can use a list of all keywords preserved by an empty KeywordString provider. Example: AND Yes, when the array is deserved?

Discover_literals

When the Discover method is called in the RequestType parameter, it returns a discover_literals rowset in the Result parameter. This type of request will query the provider of information about supported direct quantity, including data types and values.

The direct quantity of each returned is a line in the discover_literals.

Column Name Type Description Limits Whether you can use the direct amount of the direct volumeNameString line. Example: DBLITERAL_LIKE_PERCENT Yes, when the array is denoted whether LiteralValUString contains the actual directivity. For example, if LiteralName is DBLITERAL_LIKE_PERCENT and matches zero or more characters in the Like clause, the value of the column will be "%". Whether or not LiteralInvalidCharsString is inactive in the direct volume. For example, if the table name cannot contain numeric characters, this string should be "0123456789". No Yes LiteralInvalidStartingCharsString can't be used as a direct number of characters. If the first character of the direct volume can be any valid character, this string should be empty. No is the maximum number of characters of LiteralMaxLengthinteger direct volume. If there is no maximum character limit or the maximum number of characters is limited, its value is -1. No Yes XML for Analysis property

This section describes the properties required by XML for Analysis.

The name of the list of content Name properties. The data type of the TYPE property. For more information on data types in this specification, see the data type used in XML for Analysis. Read / write behavior of R / W attributes. The default value of the default value. Usage You can use a method of attribute (if applicable,). Note Basic descriptions of attribute behavior.

The table below shows the specific information of each attribute.

Name Type R / W Default Usage Description AxisFormateNumeRATIONW Execute Method Requirements The MDDataSet axis format: TupleFormat, Clusterformat, CustomFormat. The Beginrange * INTW-1Execute method corresponds to the integer value of Cellordinal, which is used to limit the MDDataSet returned to a specific range of cells. Use the endrange property. If not specified, all cells are returned in the row. Value -1 indicates that it is not specified.

Name (Continued) Type (continued) R / W Default (continued) Usage (continued) CatalogStringR / Wymine Strings Discover Method Execute Method Specifies the initial directory or database to be connected. ContenTenumStringWSchemadataDiscover method Execute method A enumerator that specifies the type of data returned by the result set. None: Allows the structure of the command command, but does not execute the command. Similar to the use of prepare to check the grammar, and so on. Schema: Contains an XML architecture associated with the requested query (used to specify column information, etc.). DATA: Only the requested data. Schemadata: Returns the architecture information and data. DataSourceInfostringR / W Air Strings Discover Method The Execute method contains a string of provider specific information that needs to be accessed.

Name (Continued) Type (continued) R / W Default (continued) Usage (continued) The endRange * INTW-1Execute method corresponds to the integer value of Cellordinal, which is used to limit the MDDataSet returned to a specific range of units. grid. Combined with the Beginrange property. If not specified, all cells are returned in the row. Value -1 indicates that it is not specified. FormateNumStringW For the discover method, the discover method is Tabular; for the EXECUTE method, the MultidImensionalDiscover method is used to determine the enumerator of the returning result set format. These values ​​include: Tabular: Plane line set or hierarchical row. Similar to XML RAW format in SQL. For the OLE DB for Data Mining command, the Format property should be set to Tabular. Multidimensional: Indicates that the result set will use the MDDataSet format (only for the Execute method).

Name (Continued) Type (continued) R / W Default (continued) Usage (continued) LocaleIdentifierunSignedIntr / W No discover method Execute method It is used to read or set the digital area setting identifier for this request. The default value is related to the provider. To get a full hex language identifier list, search for "Language Identifiers" in MSDN® Library, which is http://www.msdn.microsoft.com (English). MDXSUPPORTENUMSTRINGRCOREDISCOVER Method Description MDX support level enumeration. In the initial version, CORE is the only value in the enumeration. In the later release, other values ​​will be defined for this. The PasswordStringw Air String Discover Method The EXECUTE method client can be used to provide a string of any password information required for the connection. ProviderNameStringR The name of the XML for Analysis provider XML for Analysis provides the name of the DISCOVER method. Providerversionstringr Empty String Discover Method XML for Analysis Provider (Implementation) version number. The version value should be 4 partial format, each partial separated by a decimal point.

Name (Continued) Type (continued) R / W Default (continued) Usage (continued) Description (continued) StateSupporTenumStringR No discover method is used to specify the properties of the status support level in the provider. For information on the status in XML for Analysis, see Support in XML for Analysis. The enumeration value includes at least: none - a session or stateful operation is not supported. Sessions - Provider support session. TimeoutunSignedIntr / W Unended discover method Execute method Time-time value in seconds unit is used to specify the amount of time waiting for success. The UserNameStringR / Wymine string discover method The Execute method contains a string of the username required.

* The range value of cell coordinates starts with 0 (zero). -1 indicates that all values ​​are not defined or in a range.

The following table contains examples of range values ​​and their behavior. Usually, the following conditions must be true to return results set: Beginrange <= endrange. If Beginrange> EndRange, this range is invalid and the result will not return. BeginrangeEndRange behavior -1-1 all cells or rows. This is the default behavior. 0-1 From the first (ie, 0) to all cells or rows of the undefined (ie, the dataset end). 15-1 Returns the cell or line from the cell from the end of the data set. -10 As the first cell of the first item in the range (or all), and the end is the 0th element. 1550 Return ranges to OLAP cells 15 to 50 (including these two cells). Beginrange <= EndRange. 21 Will not return cells due to the scope invalid (the start value is greater than the end value). Beginrange> EndRange.

Error handling in XML for Analysis

The wrong type is different, and the way the processing is different. The following types of errors may occur:

Performing a method call failure How to perform method calls success, but with an error or warning execution method call success, but the result is included in the result

The implementation method call failed to report through the SOAP Fault message. When this happens, "Results" will not return. If the method is incorrect or warning when the method is completed, these errors and warnings will return to the client with "Results".

MDDataSet Error Example

Errors related to "Results" or data related errors in the appropriate position of the result set. The "MDDataSet" in the data type used in XML for Analysis contains the MDDataSet data type. Below is an example of the result of the error in the MDDataSet:

...

2148497527

Security Error.

SOAP error example

The SOAP error code related to this specification is started with "XMLFoRaNALYSIS", followed by a period and hexadecimal HR result code. For example, the error code "0x80000005" will be formatted as "XMLFoRYSIS.0x800000000".

For more information on SOAP error format, see http://www.w3.org/tr/soap/#_ref477795996 (English).

The following table shows the XML for Analysis error code information included in the "Details" section of the SOAP response. The error characteristics in the detailed information section listed as SOAP errors.

Column Name Type Description If you can indicate the return code that the method successfully or not. Note: The hexadecimal value must be converted to the unsignedint value. No DescriptionString generates an error text and instructions returned by the error. It is the name of the component that generates the error component. Is helpFileString descriptions of the wrong help file or the topic path or URL. Yes

Below is a SOAP error example of a failed method called:

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/" SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

XmlanalysisIrror.0x80000005

XML for Analysis provider error

XML for Analysis Provider

ErrorCode = "2147483653"

Description = "An unexpected error."

Source = "XML for Analysis Provider"

Helpfile = ""

/>

In XML for Analysis

By default, XML for Analysis is stateless. (No status is a case, that is, the server does not remember the logo or context of the client after completing the method. In order to support state (that is, the server reserves the client ID and context between the two method calls), providing the provider provides support for sessions. For a series of statements that should be implemented together, the session is very useful. One of the examples is to create a calculated member that will be used in successive queries.

Providing programs support for sessions is optional. The client can test support by checking the value of the XML for Analysis property StateSupport with the Discover method. Make the minimum value that occurs as sessions. For more information on the StateSupport property, see the XML for Analysis property.

Typically, sessions follow the behavior specified in the OLE DB specification, as follows:

The session defines the range of transactions and command context. Multiple commands can be performed in the context of a single session. Support for transactions in the XML for Analysis context is processed by providing a provider specific command sent by an Execute method.

XML for Analysis defines a method of supporting status (sessions) in a web environment, which is similar to the method used by Distributed Authoring and Versioning, Dav) protocols to achieve in loose coupling environments. locking. This specification can be similar to DAV for various reasons (such as timeout or connection errors). This also means that the Web service must identify and prepare each group of commands that have been interrupted and must be restarted.

SOAP specification is recommended to use SOAP headers to build a new protocol at the top of SOAP messages. The following table lists the SOAP header elements and features defined by XML for Analysis as initialization, maintenance, and closing sessions.

SOAP header Description BeginSession request provider creates a new session. The provider should respond to part of the session header in the SOAP response by constructing a new session and returning the session ID as part of the SOAP response. The sessionID value area contains a session ID. In the rest of the session, this ID must be used each method call. The provider sends this tag in the SOAP response, and the client must also send this feature in each Session header element. SESSION must be called for each method to occur in a session, and this header must be used and must include a session ID in the value area of ​​the header. EndSession To terminate the session, use this header. The session ID must be included in the value zone. The following example shows how to support sessions:

To start a session, add the BegInSession header in SOAP to an outbound XML for Analysis method from the client. The value area is initially blank, because the session ID is still not known.

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

XMLns: XA = "URN: Schemas-Microsoft-COM: XML-Analysis"

XSI: Type = "xsd: int"

Mustunderstand = "1" />

...................................................... ->

SOAP response messages from the provider use the XML for Analysis header tag including the session ID in the return header area.

XMLns: XA = "URN: Schemas-Microsoft-COM: XML-Analysis"

SessionID = "581" />

For each method call in the session, you must add a session header that contains the session ID returned by the provider.

XMLns: XA = "URN: Schemas-Microsoft-COM: XML-Analysis"

Mustunderstand = "1"

SessionID = "581" />

When the session is complete, use the tag, which contains the value of the relevant session ID.

XMLns: XA = "URN: Schemas-Microsoft-COM: XML-Analysis"

XSI: Type = "xsd: int"

Mustunderstand = "1"

SessionID = "581" />

The session ID does not guarantee that the session is still valid. If the session expires (such as session timeout or connection loss), the provider can choose to end or fall back to the session. In this way, the client's end of the session ID will fail and report an error indicating that the session is invalid. The client will handle this situation and must be prepared from head to resend session method calls. Use XML for Analysis for data mining

The Execute method of XML for Analysis supports the execution of data mining commands. Data mining command supports related to the provider. If the result is returned in the form of MDDataSet or Tabular, the data mining command can also be supported by the Execute interface. To support Tabular results, at least the data mining provider is required.

For example, there is a big difference between OLE DB for Data Mining information through XML for Analysis API and from a relational data source. The result of the OLE DB for Data Mining command is a flat line set of plane rows or layers. For the OLE DB for Data Mining command, the Format property should be set to Tabular.

The XML for Analysis provider does not necessarily support the OLE DB for Data Mining specific command. Support OLE DB for Data Mining will identify themselves by setting one of the array elements in the provodertype to DMP.

Part II - Appendix

This section includes other subjects and related information to help you understand and implement this specification.

Appendix A: Realizing Precautions

This appendix discusses the considerations of implementation.

XML for Analysis implementation process step-by-step description

In order to better illustrate how to use the XML for Analysis API, this section provides a step-by-step description of the client / server interaction. It includes how to get a list of data source.

The steps in this step will detail how the client communicates with the server to obtain a data source list and use one of the data sources to run an OLAP query.

The following annotation indicates which steps indicate the specification, which steps are implemented examples:

(I) This step is an example implemented. (S) The steps shown are a project implemented in accordance with this specification.

Find an XML for Analysis service

(I) The client application discovers a server URL that supports Web services. This URL can be found by browsing the general description, the Universal Description, the Discovery, And Integration, UDDI. (I) The client sends a request to the URL to identify whether it supports the XML for Analysis Web service (such as use Discore Protocol, Disco). (I) Disco returns the URL of the WSDL file for the XML for Analysis Web service (such as XMlanalysis.wsdl). (I) the client sends a request to the WSDL file. (I) The web server sends back XMlanalysis.wsdl, which defines the method of support: Discover and Execute. (I) The client confirms the same method with the server through the WSDL. (I) The WSDL file contains URLs that should be used for the XML for Analysis Web service (such as XMlanalysis.asp). Below is an example of the WSDL that the service may return to XML for Analysis:

'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/'>

XMLns = 'http://www.w3.org/2000/10/xmlschema'>

EncodingStyle = 'http: //schemas.xmlsoap.org/soap/encoding/' />

EncodingStyle = 'http: //schemas.xmlsoap.org/soap/encoding/' />

EncodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/' />

EncodingStyle = 'http: //schemas.xmlsoap.org/soap/encoding/' />

Get data source

(S) The client finds the OLAP data source, and the method is to send RequestType Discover_DataSources using the URL and method information obtained above. In the Restrictions parameter, it specifies MDP (multidimensional data) for the proviDertype. (I) The list of published data sources is an XML file on the server, which is maintained by the application administrator. XMlanalysis.asp retrieves an XML document and sends it to the client application. (I) the client analyzes the rows and selects the data source to use. If the URL listed for the data source is different from the first URL used by the initial discover method, then the following DISCOVER and EXECUTE calls can handle data in the data source, and must use the second data source specific URL .

Use data source

(S) The client sends the discover command to the selected OLAP data source. To get a list of available cubes, use RequestType Mdschema_cubes. Restrictions include the name of the database for searching for Foodmart 2000. The information required for the connection provider is included in the Properties parameter. Here is an example of XML sent from the client to this: SOAPACTION: "URN: Schemas-Microsoft-COM: XML-Analysis: Discover"

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

XMLns: xsi = "http://www.w3.org/2001/xmlschema-instance"

XMLns: xsd = "http://www.w3.org/2001/xmlschema">

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

MDSchema_cubes

Foodmart 2000

Provider = msolap; data source = local;

Foodmart 2000

(I) XML For Analysis provider processes the request and sends it to the OLAP data source. When the available cube data is received, the provider packs it into XML and sends it back to the requested client application. Below is an XML example of data from the server from the server:

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

...

Foodmart 2000

Sales

...

Foodmart 2000

warehouse

...

...

(S) The client selects a cube, then send an Execute that contains the element, and the element contains a MDX SELECT statement: "Select MeasureS.members On Column from Sales". The connection information is again provided in the Properties parameter. SOAPACTION: "URN: Schemas-Microsoft-COM: XML-Analysis: Execute"

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

XMLns: xsi = "http://www.w3.org/2001/xmlschema-instance"

XMLns: xsd = "http://www.w3.org/2001/xmlschema">

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

SELECT [MEASURES] .members on column from sales

Provider = msolap; data source = local;

Foodmart 2000

Multidimensional

TupleFormat

(I) XML for Analysis provider analysis request and sends it to the data source to be filled. (I) After returning the data set, the provider packs it into XML and sends it back to the requesting client application, as shown in the following example: >>>>>

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

SOAP-ENV: EncodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">

...

(I) The client receives the result set and performs all other tasks required by the user. For example, a client application can formulate the result set into XSL and display the data to a table that can be browsed on the web page. Client applications can also write result sets to local caches to minimize the number of round trips when the user refreshes the displayed data.

XML for Analysis and non-web applications

The XML for Analysis API is optimized for web applications. However, this does not hinder the application of the LAN. The following applications can take advantage of this XML-based API:

Requires client / server applications with technical flexibility between clients and servers You can increase server capacity clients with client / server applications for multiple operating systems.

Appendix B: SOAP Quick List

Simple Object Access Protocol (SOAP) is an industry standard that uses XML to expand how data and commands. Given that SOAP is an integral part of this specification, this section will provide background information and define SOAP terms.

Web service

From a broad sense, the web service is an application: it is provided as a service that can be integrated with other Web services using the Internet standard. It is a resource that can be addressed by the URL, and the information can be returned to the client that requires this information in a programming manner.

The web service has a black box function that can be reused without the implementation of a service. The Web service provides a well-defined interface that is called a contract for describing the services provided. Web services can use SOAP to specify the format of its messages.

SOAP

SOAP is a lightweight protocol for exchange information in a dispersed distributed environment. As an XML-based protocol, it consists of three parts:

A set of encoding rules defined for the architecture (content and processing mode of the message), an instance of the data type defined by the application definition represents the convention for remote procedure calls and responses.

Below is an example of a SOAP request:

Click here to browse

The corresponding data response may be as follows:

Click here to browse

Web Services Description Language (Web Services Description Language, WSDL)

With the standardization of communication protocols and message formats in the web community, the possibility and importance of communications in structured methods are also increasing. Web Services Description Language (WSDL) describes the network service into a collection of communication endpoints with message exchange functions by defining XML syntax, thereby meeting this need. The WSDL service is defined as a distributed system to provide documentation and can be used as an automated method of detailed information involved in application communication.

The WSDL document defines the service as a collection of network endpoints or network ports. In WSDL, the abstraction definition of endpoints and messages has been separated from their specific network deployment or data format binding. This allows you to reuse the abstract definition:

Message - Abstract Description Port Type of the Switched Data - Abstract Collection of Operations

A specific protocol and data format specification for a particular port type constitute a reusable binding. One port is defined by associating a network address and a reusable binding; a port collection defines a service. For a link to get WSDL complete information, see Appendix E.

Appendix C: Mapping from XML for Analysis to OLE DB

Since XML for Analysis is built from definitions in OLE DB, you can get detailed information by referring to the OLE DB specification of the field.

Function mapping

The following table maps OLE DB and OLE DB for OLAP to equivalent XML for Analysis operations. Since some operations do not apply, not all OLE DB functions have XML for Analysis mapping. For example, methods of navigation methods (they are used to handle collected rows) are not applicable because the client will process this operation.

OLE DB interfaces and commands XML implementation IColumnsInfo :: GetColumnInfoExecute methods: Properties: Content = SchemaICommandPrepare :: PrepareExecute methods: Properties: Content = None (for verification only command) ICommandProperties :: GetPropertiesDiscover method: RequestType: DISCOVER_PROPERTIESICommandProperties :: SetPropertiesExecute methods: Properties: Note: The property must have read / write permissions. ICommandText :: setcommandtextexecute method: Command parameter. Idbinfo :: getKeywordsDiscover method: RequestType: discover_keywordsidbinfo :: getLitralAlInfodiscover method: RequestType: Discover_litrals

OLE DB interfaces and commands (continued) XML achieve (continued) IDBProperties :: GetPropertiesDiscover method: RequestType: DISCOVER_PROPERTIESIDBProperties :: GetPropertyInfoDiscover method: RequestType: DISCOVER_PROPERTIESIDBProperties :: SetPropertiesExecute methods: Properties: Note: The properties must have read / Write permissions. IGetDataSource :: GetDataSourceDiscover Method: RequestType: DISCOVER_DATASOURCESIMDDataset :: FreeAxisInfo IMDDataset :: GetAxisRowset IMDDataset :: GetCellData IMDDataset :: GetSpecification (. Non-direct mapped) to obtain a set of metadata structures row (e.g. row and column information), using the method Discover : Properties: Content = SchemaIMDRangeRowset :: GetRangeRowset (indirect map.) Execute method: Commands: Properties: BeginRange = EndRange = ISessionProperties :: GetPropertiesDiscover method: RequestType: Discover_properties (session is implicit) iSessionProperties :: setPropertiesExecute method: Properties: Note: The property must have read / write permissions. Property mapping

The following table lists some commonly used OLE DB properties and its equivalent XML for Analysis properties.

OLE DB attribute XML implementation DBPROP_INIT_PROVIDERSTRING (DBPROPSET_DBINIT Attribute Set) DataSourceInfo Properties DBProp_CommandTimeOutDbProp_init_timeout dbprop_init_generaltimeout (dbpropset_dbinit property set) Timeout property

RequestTypes mapping

The table below shows the Mapping of the RequestTypes enumeration value to OLE DB.

OLE DB mapping XML for Analysis request type and NA DISCOVER_DATASOURCESIDBProperties :: GetPropertyInfo IDBProperties :: GetProperties function DISCOVER_PROPERTIESIDBSchemaRowset :: GetSchemasDISCOVER_SCHEMA_ROWSETS NA DISCOVER_ENUMERATORSIDBInfo :: GetKeywordsDISCOVER_KEYWORDSIDBInfo :: GetLiteralInfoDISCOVER_LITERALSOLE DB schema name and the line defined in the standard OLE DB "Appendix B: Architecture Listed in Rows.

Data type mapping of OLE DB to XML

To facilitate reference, the following table maps the OLE DB data type to the published XML schema type.

For more information and definitions for the XML schema type, see http://www.w3.org/tr/xmlschema-2/ (English). To view the XML schema structure, see the W3C's Web site. OLE DB types XML schema type DBTYPE_I1byteDBTYPE_I2shortDBTYPE_I4intDBTYPE_I8longDBTYPE_UI1unsignedByteDBTYPE_UI2unsignedShortDBTYPE_UI4unsignedIntDBTYPE_UI8unsignedLongDBTYPE_R4floatDBTYPE_R8doubleDBTYPE_BOOLbooleanDBTYPE_CYdecimalDBTYPE_ERRORstringDBTYPE_DECIMALdecimalDBTYPE_NUMERICdecimalDBTYPE_DATEdateDBTYPE_DBTIMESTAMPtimeDBTYPE_GUIDstringDBTYPE_BYTESbinaryDBTYPE_STRstringDBTYPE_WSTRstringDBTYPE_BSTRstringDBTYPE_VARIANTstring

MDDataSet data type to OLE DB mapping

Here is the MDDataSet XML for Analysis data type to OLE DB mapping and other reference information.

OLE DB Implementation XML for Analysis Implementation OLE DB for OLAP Dataset Type Access MDDataSet Data Types via iMDDataSet Interface

Relationship between MDX and MDXML

Multidimensional Expressions, MDX is the multi-dimensional expression language defined in the OLE DB for OLAP specification. The MDXML language is an XML package version of the MDX language. As the initial version of this specification, the only XML element of MDXML is the element. For multi-dimensional providers, the element includes an MDX language statement (the front portion of this specification has been described). In future versions, MDXML will be extended to include other elements and functions. The extension of MDXML will be based on MDX language, and you can continue to use this language in XML for Analysis through elements.

The MDX language itself is scalable, so the provider can add an extension to the language to support other functions provided in the basic locale. The future version of this specification will define a MDX-based MDXML language.

The MDX language specification is part of the OLE DB For OLAP specification, which can be found in the appendix E to find some of the OLE DB for OLAP.

Appendix D: MDDataSet example

Below is a complete example of a MDDataSet reply result set (where axisformat = tupleformat). First, the XSD portion is provided, followed by the MDDataSet results.

Click here to browse

The MDDataSet query results are shown below.

Click here to browse

Appendix E: Links to the referenced technology and standards

This section provides links to the details of the techniques referred to in this specification. The various techniques are arranged in alphabetical order.

DAV

Information about Distributed Authoring and Versioning, DAV: http://msdn.microsoft.com/library/periodic/period99/dav.htm http://msdn.microsoft.com/library/periodic //period99/dav.htm (English)

For information on the specification, see the IETF WebDav Working Group Web site: http://www.ics.uci.edu/pub/ietf/webdav/ (English) .NET

Information about .NET architecture: http://msdn.microsoft.com/net/ (English)

OLE DB specification

Information about OLE DB and Microsoft Data Access Components (MDAC): http://www.microsoft.com/data/oledb/default.htm (English)

Specification and Data Access Software Development Kit (Data Access Software Development Kit, SDK) Download: http://msdn.microsoft.com/library/psdk/dasdk/mdac3sc7.htm (English)

OLE DB for Data Mining

http://www.microsoft.com/data/oledb/dm.htm (English)

OLE DB for OLAP

Information about OLE DB for OLAP, as well as Ole DB for OLAP specifications: http://www.microsoft.com/data/oledb/olap/default.htm (English)

WSDL

About Web Services Description Language (WSDL) - Alternative Language of SDL - information: http://msdn.microsoft.com/xml/general/wsdl.asp (English)

SOAP

Microsoft information about the SOAP protocol: http://msdn.microsoft.com/xml/general/soapTemplate.asp (English)

WORLD WIDE Web Consortium (W3C) specification for SOAP: http://www.w3.org/tr/SOAP/ (English)

Microsoft SQL Server

For more information on the SQL Server 2000 XML RAW line set format, search "XML, RAW" in the SQL Server online series.

For more information on XML encoding, search "XML encoding" in SQL Server online book.

UDDI

General Description, Universal Description, Discovery and Integration, UDDIs (including white paper and technical specifications): http://www.uddi.com (English)

Xml

Extensible Markup Language (XML): http://www.w3.org/xml/Electric

For information on XML in the Microsoft site, navigate to: http://msdn.microsoft.com/xml/default.asp (English)

转载请注明原文地址:https://www.9cbs.com/read-126684.html

New Post(0)