2011-04-11 69 views
0

請幫助我,我知道這是一個非常簡單的問題仍然需要幫助。 請參考follwing模式..參考找不到xsd

<?xml version="1.0" encoding="UTF-8"?> 
<schema attributeFormDefault="unqualified" elementFormDefault="qualified" 
     targetNamespace="http://xmlns.oracle.com/RegistrationUpload_jws/RegistrationUpload/Taskprocess" 
     xmlns="http://www.w3.org/2001/XMLSchema"> 
    <complexType name="officer" id="officer" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
      <sequence> 
       <element name="mainOfficer" type="string"/> 
       <element name="mainOfficerId" type="string"/> 
       <element name="coveringOfficer" type="string"/> 
       <element name="coveringOfficerId" type="string"/> 
       <element name="defaultOfficer" type="string"/> 
       <element name="defaultOfficerId" type="string"/> 
       <element name="matrixId" type="string"/> 
      </sequence> 
    </complexType> 
    <element name="process"> 
      <complexType> 
       <sequence> 
        <element name="input" id="officer" type="officer" nillable="false" 
          maxOccurs="1" minOccurs="0"/> 
       </sequence> 
      </complexType> 
    </element> 
    <element name="processResponse"> 
      <complexType> 
       <sequence> 
        <element name="result" type="string"/> 
       </sequence> 
      </complexType> 
    </element> 
</schema> 

我越來越沒有發現問題問詢處(使用JDeveloper)

+2

你能提供關於錯誤的更多信息嗎?你什麼時候得到它?任何機會你的XML文件不符合XSD? – Thomas 2011-04-11 13:00:06

+0

謝謝,我粘貼了整個XML文件內容..問題是我正在使用Jdeveloper創建BPEL流程。所以當我們創建BPEL時會自動創建xsd文件,那麼我的要求就是使輸入參數成爲複雜類型。所以我改變了xsd,發現這個錯誤....錯誤是'參考官員沒有找到'希望聽到你的... – Pedantic 2011-04-11 15:08:39

+0

你首先說問題的名字是「辦公室」,然後你說它是「官」。其實它是「軍官」。獲取這種錯誤的基本信息會讓人們更難以幫助你。請加倍努力。 – 2011-04-11 21:29:23

回答

1

我認爲這個問題是命名空間有關。文檔的默認名稱空間爲http://www.w3.org/2001/XMLSchema,這意味着您可以參考不帶前綴的類型的XML,如type="string"中所述。但是,類型officer位於目標名稱空間中,因此,當引用該類型時,必須使用名稱空間綁定來限定它。這增加了schema元素:

xmlns:tns="http://xmlns.oracle.com/RegistrationUpload_jws/RegistrationUpload/Taskprocess" 

,並使用TNS前綴指的是官式時:

<element name="input" type="tns:officer" nillable="false" ... /> 

(此外,使用id屬性爲奇數,特別是因爲你有重複內容)。

+0

謝謝,我也一樣,錯誤被刪除。但在元素'processResponse'和'process'的wsdl文件中還有一個額外的錯誤。我是否也需要在wsdl文件中進行更改? – Pedantic 2011-04-11 15:14:43

+0

很難說沒有更多的信息。 – 2011-04-11 15:23:32