什么是 "DescriptionElement" 不得位于 WSDL 2.0 名称空间中”?

What is "DescriptionElement" must not be in the WSDL 2.0 namespace"?

当我尝试在 Netbeans 中将 WSDL 和 XSD 转换为 Java 时出现此错误。

SEVERE: Woden[Error],0:0,WSDL520,Extension element "{http://www.w3.org/ns/wsdl}type" in the context of "org.apache.woden.wsdl20.xml.DescriptionElement" must not be in the WSDL 2.0 namespace. mar 16, 2017 12:43:12 EM org.apache.woden.internal.ErrorHandlerImpl warning

每个文件的描述部分如下:

WSDL 文件

<?xml version="1.0" encoding="utf-8" ?> 
<description
    targetNamespace="http://www.spads.lfv.se/2017/service/afip"
    xmlns="http://www.w3.org/ns/wsdl"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wsdl="http://www.w3.org/ns/wsdl" 
    xmlns:tns="http://www.spads.lfv.se/2017/service/wsdl/publisher"
    xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
    xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
    xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions"
    xmlns:inboundOutboundFlight="http://www.spads.lfv.se/2017/service/flightElements"
    xmlns:FID="http://www.spads.lfv.se/2017/service/FlightID">  

XSD 文件

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.spads.lfv.se/2017/service/flightElements"
           xmlns:inboundOutboundFlight = "http://www.spads.lfv.se/2017/service/flightElements"> 

XSD 和 WSDL 之间的 link 应该正确建立。因此,描述部分需要更改和保证。 Altova 软件非常有助于生成可用于创建其他操作的简单 WSDL 文件。

Altova software

此外,描述应采用以下语法:

WSDL 文件

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:description
    targetNamespace="http://new.webservice.namespace"
    xmlns:wsdl="http://www.w3.org/ns/wsdl"
    xmlns:wsoap="http://www.w3.org/ns/wsdl/soap"
    xmlns:whttp="http://www.w3.org/ns/wsdl/http"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://new.webservice.namespace"
    xmlns:inboundOutboundFlight="http://www.spads.lfv.se/2017/service/flightElements"
    xmlns:wsdlx="http://www.w3.org/ns/wsdl-extensions">
<wsdl:types>
    <xs:import namespace="http://www.spads.lfv.se/2017/service/flightElements" schemaLocation="AirportFlightInformationElements.xsd"/>
</wsdl:types>

XSD 文件

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://www.spads.lfv.se/2017/service/flightElements">