【问题标题】:What is "DescriptionElement" must not be in the WSDL 2.0 namespace"?什么是“DescriptionElement”不能在 WSDL 2.0 命名空间中”?
【发布时间】:2017-03-16 12:17:40
【问题描述】:

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

严重:Woden[错误],0:0,WSDL520,扩展元素 "{http://www.w3.org/ns/wsdl}type" 在上下文中 “org.apache.woden.wsdl20.xml.DescriptionElement”不能在 WSDL 2.0 命名空间。 2017 年 3 月 16 日 12:43:12 EM org.apache.woden.internal.ErrorHandlerImpl 警告

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

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 wsdl2java wsdl-2.0


    【解决方案1】:

    XSD 和 WSDL 之间的链接应该正确建立。因此,描述部分需要改变和保证。 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"> 
    

    【讨论】:

      猜你喜欢
      • 2011-03-23
      • 1970-01-01
      • 2010-11-15
      • 2021-06-27
      • 2011-04-24
      相关资源
      最近更新 更多