0

私を助けてください、私はこれが非常に単純な問題であることを知っていますまだ助けが必要です。以下のスキーマを参照してください。

<?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を使用)

4

1 に答える 1

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 属性の使用は奇妙です。)

于 2011-04-11T15:08:18.770 に答える