【发布时间】:2015-03-24 01:09:32
【问题描述】:
我正在尝试通过 [[Visual Studio 2010 Shell for SQL Server 2012 SSIS]] 添加 Web 服务任务。
我在同一个文件夹中有 wsdl 文件和 xsd 文件。当我尝试引用下面的 wsdl 文件时,我从 Visual Studio 收到错误:
W3C XML Schema 的根元素应为 <schema>,其命名空间应为“http://www.w3.org/2001/XMLSchema”。
这是 13,000 行 wsdl 文件的前几行:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.cisco.com/AXLAPIService/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:xsd1="http://www.cisco.com/AXL/API/8.0" targetNamespace="http://www.cisco.com/AXLAPIService/">
<import location="AXLSoap.xsd" namespace="http://www.cisco.com/AXL/API/8.0"/>
<message name="addSipProfileIn">
<part element="xsd1:addSipProfile" name="axlParams"/>
</message>
AXLSoap.xsd 的前几行:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.cisco.com/AXL/API/8.0" xmlns:axlapi="http://www.cisco.com/AXL/API/8.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified" version="8.0">
<xsd:complexType name='XSipProfile'>
<xsd:sequence minOccurs='0'>
<xsd:element maxOccurs='1' nillable='false' name='name' minOccurs='1' type='axlapi:String50'></xsd:element>
【问题讨论】:
-
AXLSoap.xsd 的前几行是什么样的?
-
JLRishe:刚刚添加了 AXLSoap.xsd 开头行
-
另外 - 与 wsdl.exe 工具一起使用时,相同的 xml/xsd 会生成完美的 .cs 代理代码。当通过该代码调用该服务时,该服务会给出预期的结果。只是 SSIS 的 Visual Studio 2010 shell 出现了上述错误。
-
我发现了这个记录在案的错误,但提供的示例对我来说太复杂了。 http://support.microsoft.com/kb/820122?wa=wsignin1.0 我几乎可以肯定我的错误可能与错误有关,因为即使我将 wsdl 的
元素中的 location 属性更改为随机文件名,我也会得到相同的错误。有什么想法吗??
标签: xml visual-studio ssis wsdl schema