SOAP WSDL Error: src-resolve.4.2: Error resolving component 'soapenc:Array.'
SOAP WSDL Error: src-resolve.4.2: Error resolving component 'soapenc:Array.'
下面是我遇到问题的 wsdl 片段。
这是有效的,但我收到验证错误。
src-resolve.4.2: 解析组件 'soapenc:Array.' 时出错检测到 'soapenc:Array' 在命名空间 'schemas.xmlsoap.org/soap/encoding/' 中;但来自此命名空间的组件不在可从架构文档中引用。
我将此添加到我的 wsdl 中的定义中:xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
<xsd:complexType name="getSalesTaxInformation_Array">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:sequence>
<xsd:element name="productTax" type="tns:getSalesTaxInformation"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
这个错误是什么意思,我该如何摆脱它?
经过一番挖掘,我明白了。在我将这些添加到我的架构元素中后,错误消失了。
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
我不知道我在哪里找到了解决方案,但这里有一些关于在 wsdl 中使用数组的信息。
下面是我遇到问题的 wsdl 片段。
这是有效的,但我收到验证错误。
src-resolve.4.2: 解析组件 'soapenc:Array.' 时出错检测到 'soapenc:Array' 在命名空间 'schemas.xmlsoap.org/soap/encoding/' 中;但来自此命名空间的组件不在可从架构文档中引用。
我将此添加到我的 wsdl 中的定义中:xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
<xsd:complexType name="getSalesTaxInformation_Array">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:sequence>
<xsd:element name="productTax" type="tns:getSalesTaxInformation"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
这个错误是什么意思,我该如何摆脱它?
经过一番挖掘,我明白了。在我将这些添加到我的架构元素中后,错误消失了。
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
<xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
我不知道我在哪里找到了解决方案,但这里有一些关于在 wsdl 中使用数组的信息。