2011-04-11 135 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