Excel,无法连接到XMLA Webservice

时间:2013-04-08 12:27:28

标签: database excel connection xmla discover

我尝试在Excel中创建与XMLA Web服务的连接。我正在使用Analysis Services连接助手。我用web服务URL和凭证填充第一个掩码。然后我在服务器上获得10个DISCOVER_PROPERTIES和一个DISCOVER_SCHEMA_ROWSETS请求。在最后一次DISCOVER_SCHEMA_ROWSETS之后,我在excel中收到通知(无错误对话框),数据连接助手无法在给定数据源中找到数据库列表。我可以在哪里获得有关错误的更多信息?我很感激任何帮助!

DISCOVER_SCHEMA_ROWSETS消息:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Header>
    <Session xmlns="urn:schemas-microsoft-com:xml-analysis" SessionId="D5C7494A-14DC-47F4-B9A5-AC6A487BCC38"/>
  </soap:Header>
  <soap:Body>
    <Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
      <RequestType>DISCOVER_SCHEMA_ROWSETS</RequestType>
      <Restrictions>
        <RestrictionList/>
      </Restrictions>
      <Properties>
        <PropertyList>
          <LocaleIdentifier>1031</LocaleIdentifier>
        </PropertyList>
      </Properties>
    </Discover>
  </soap:Body>
</soap:Envelope>

和DiscoverResponse:

<?xml version="1.0" encoding="UTF-8" ?>
<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 xmlns="urn:schemas-microsoft-com:xml-analysis:rowset">
          <xsd:schema xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:xml-sql" elementFormDefault="qualified">
            <xsd:element name="root">
              <xsd:complexType>
                <xsd:sequence minOccurs="0" maxOccurs="unbounded">
                  <xsd:element name="row" type="row"/>
                </xsd:sequence>
              </xsd:complexType>
            </xsd:element>
            <xsd:complexType name="row">
              <xsd:sequence maxOccurs="unbounded" minOccurs="0">
                <xsd:element name="SchemaName" type="xsd:string" minOccurs="0" maxOccurs="1" sql:field="SchemaName"/>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:schema>
          <row>
            <SchemaName>DISCOVER_DATASOURCES</SchemaName>
          </row>
          <row>
            <SchemaName>DISCOVER_PROPERTIES</SchemaName>
          </row>
          <row>
            <SchemaName>DISCOVER_SCHEMA_ROWSETS</SchemaName>
          </row>
          <row>
            <SchemaName>DISCOVER_ENUMERATORS</SchemaName>
          </row>
          <row>
            <SchemaName>DISCOVER_KEYWORDS</SchemaName>
          </row>
          <row>
            <SchemaName>DISCOVER_LITERALS</SchemaName>
          </row>
          <row>
            <SchemaName>DBSCHEMA_CATALOGS</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_CUBES</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_DIMENSIONS</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_MEASURES</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_HIERARCHIES</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_LEVELS</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_MEMBERS</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_PROPERTIES</SchemaName>
          </row>
          <row>
            <SchemaName>DBSCHEMA_COLUMNS</SchemaName>
          </row>
          <row>
            <SchemaName>DBSCHEMA_PROVIDER_TYPES</SchemaName>
          </row>
          <row>
            <SchemaName>DBSCHEMA_TABLES</SchemaName>
          </row>
          <row>
            <SchemaName>DBSCHEMA_TABLES_INFO</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_ACTIONS</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_FUNCTIONS</SchemaName>
          </row>
          <row>
            <SchemaName>MDSCHEMA_SETS</SchemaName>
          </row>
        </root>
      </return>
    </DiscoverResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

1 个答案:

答案 0 :(得分:0)

首先将webservice的URL放在浏览器中,看看它是否有效。

您可以下载在VBA界面中提供插件的Microsoft Office XP Web Services Toolkit。 addin允许您为webservice指定路径并为您创建类。您可以使用此类并调用Web服务中的函数。