Ошибка xml WADL: тип не найден. - PullRequest
       36

Ошибка xml WADL: тип не найден.

0 голосов
/ 30 августа 2018

У меня есть файл WADL, который я использую в SAP Data Services. Я получаю ошибку ниже:

Вот сообщение об ошибке:

(14.2) 08-30-18 11:11:25 (E) (25632:18800) PAR-010136: The adapter XML for function <Output_1(GET/test1/output)> contains parsing errors in the object: <XML Schema>: <Error importing XML Schema from file <adapter_schema_out.xsd>: <XML parser failed: Error <type ':root' not found> at line <9>, char <32> in <<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
<xsd:element name="Output_1_Output"> 
 <xsd:complexType> 
 <xsd:sequence> 
 <xsd:element ref="root"/> 
</xsd:sequence> 
 </xsd:complexType> 
 </xsd:element> 
 </xsd:schema>>, file <<xsd:schema 
                                                       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 
<xsd:element name="Output_1_Output"> 
<xsd:complexType> 
 <xsd:sequence> 
 <xsd:element ref="root"/> 
 </xsd:sequence> 
 </xsd:complexType> 
</xsd:element> 
</xsd:schema>>.>. Validate your XML Schema using external schema validators (found at w3.org).>

А вот соответствующий файл:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://wadl.dev.java.net/2009/02">
  <doc xml:lang="en" title="https://api.test.com"/>
  <grammar>
<xs:schema  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="root">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="_links">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="self">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element type="xs:string" name="href"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="next">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element type="xs:string" name="href"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="previous">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element type="xs:string" name="href"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
        <xs:element type="xs:byte" name="count"/>
        <xs:element name="results">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="list-item" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="_links">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="self">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element type="xs:string" name="href"/>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element type="xs:string" name="_display"/>
                    <xs:element type="xs:string" name="code"/>
                    <xs:element type="xs:string" name="name"/>
                    <xs:element type="xs:string" name="dataset"/>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
  </grammar>
  <resources base="https://api.test.com">
    <resource path="gebieden/Output/" id="Output">
      <doc xml:lang="en" title="Output"/>
      <param name="format" type="xs:string" required="false" default="" style="query" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
      <method name="GET" id="Output_1">
        <doc xml:lang="en" title="Output_1"/>
        <request/>
        <response status="200">
          <representation mediaType="application/xml; charset=utf-8" element="root" xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
        </response>
      </method>
    </resource>
  </resources>
</application>

Может ли кто-нибудь помочь с этим сообщением об ошибке?

...