2015-05-08 57 views
1

最初將完成的項目加載到eclipse中進行更改後,我在包含的WSDL中的3個組件上收到錯誤。

在eclipse中無法解析WSDL中的定義,可能的eclipse導入錯誤?

錯誤

「SRC-決心:無法解析名稱 'TNS:AEExceptionBO'。到(n)的 '類型>定義' 組件」


三個要素
* submitCallFault1_submitCallFault
* getOutageStatusFault1_getOutageStatusFault
* getOutageCircuitFault1_getOutageCircuitFault

至於我可以告訴大家,目前存在的進口(WSDL的8號線)應該加載XSD文件正確,項目中不存在其他錯誤。有誰知道爲什麼日食不能處理這個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文件的不相關部分已省略。

回答

1

通常情況下,這可能是由於將多個模式導入相同的命名空間造成的。我注意到WSDL模式位於http://www.orgname.com/esd/aeservices/lib/V1targetNamespace中,但其後的第一個操作是將其他xsd導入到相同的名稱空間中。我認爲這裏發生的事情是,eclipse可能正在採取一種或另一種方式,然後無法在該名稱空間中找到正確的類型定義。

考慮解除這兩個名稱空間的衝突,以便爲每個文件使用一個名稱空間。 Read this related question - 這可能有助於理解這裏。導入應該用於引入另一個名稱空間,並且include應該用於使幾個不同的文件一起共同定義一個名稱空間。

相關問題