2017-03-16 40 views
0

当我尝试WSDL和XSD转换成Java Netbeans中我有这样的错误什么是“DescriptionElement”绝不能在WSDL 2.0命名空间“

重度:?沃登[错误],0: 0,WSDL520,扩展元素 “{}类型”在 的上下文中“org.apache.woden.wsdl20.xml.DescriptionElement”不能位于 WSDL 2.0名称空间。mar 16,2017 05:50:20 EM org.apache.woden.internal.ErrorHandlerImpl警告

说明每一个文件N部分低于:

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"> 

回答

0

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">