无法在 eclipse 中解析 WSDL 中的定义,可能是 eclipse 导入错误?

Cannot resolve definition within WSDL in eclipse, possible eclipse import error?

最初将完成的项目加载到 Eclipse 中进行更改后,我在包含的 WSDL 中的 3 个组件上收到错误。

错误

"src-resolve: Cannot resolve the name 'tns:AEExceptionBO' to a(n) 'type >definition' component."


三要素
*submitCallFault1_submitCallFault
*getOutageStatusFault1_getOutageStatusFault
*getOutageCircuitFault1_getOutageCircuitFault

据我所知,当前存在的导入(wsdl 的第 8 行)应该正确加载 xsd 文件,项目中不存在其他错误。有谁知道为什么 eclipse 不能处理这个 wsdl?

WSDL(相关部分)

<wsdl:definitions name="AEAdmsAecServiceDelegate"
    targetNamespace="http://www.orgname.com/esd/adms/aecall/V1"
    xmlns:tns="http://www.orgname.com/esd/adms/aecall/V1" 
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <wsdl:types>
        <xsd:schema targetNamespace="http://www.orgname.com/esd/adms/aecall/V1">
            <xsd:import namespace="http://www.orgname.com/esd/aeservices/lib/V1"
                schemaLocation="wsdl/AEAdmsAecService/AEExceptionBO.xsd" />
            <xsd:element name="submitCallFault1_submitCallFault"
                nillable="true" type="bons0:AEExceptionBO" />
            <xsd:element name="getOutageStatusFault1_getOutageStatusFault"
                nillable="true" type="bons0:AEExceptionBO" />
            <xsd:element name="getOutageCircuitFault1_getOutageCircuitFault"
                nillable="true" type="bons0:AEExceptionBO" />
         </xsd:schema targetNamespace>

XSD(在子目录中,由 WSDL 导入)

<xsd:schema targetNamespace="http://www.orgname.com/esd/aeservices/lib/V1"
    xmlns:bons0="http://www.orgname.com/esd/aeservices/lib/V1"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:include schemaLocation="NameValueBO.xsd" />
    <xsd:complexType name="AEExceptionBO">
        <xsd:sequence>
            <xsd:element minOccurs="1" name="appName" type="xsd:string" />
            <xsd:element minOccurs="0" name="moduleName" type="xsd:string" />
            <xsd:element minOccurs="1" name="errorCode" type="xsd:string">
            </xsd:element>
            <xsd:element minOccurs="1" name="message" type="xsd:string" />
            <xsd:element minOccurs="1" name="exceptionTime" type="xsd:dateTime">
            </xsd:element>
            <xsd:element maxOccurs="unbounded" minOccurs="0" name="nameValues"
                type="bons0:NameValueBO">
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>
</xsd:schema>

已省略 WSDL 和其他加载的 xsd 文件的不相关部分。

通常,这可能是由于将多个架构导入同一命名空间引起的。我注意到 WSDL 架构位于 http://www.orgname.com/esd/aeservices/lib/V1targetNamespace 中,但它下面的第一个操作是将另一个 xsd 导入到同一名称空间中。我认为这里发生的事情是 eclipse 可能采用其中之一,然后未能在该名称空间中找到正确的类型定义。

考虑消除这两个名称空间的冲突,以便每个文件使用一个名称空间。 Read this related question -- 这可能有助于理解这里。 Import 应该用于引入另一个命名空间,而 include 应该用于使几个不同的文件一起共同定义一个命名空间。