当我尝试在Netbeans中将WSDL和XSD转换为Java时出现此错误。
SEVERE:Woden [错误],0:0,WSDL520,扩展元素 " {http://www.w3.org/ns/wsdl}键入"在上下文中 " 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">
答案 0 :(得分:0)
应正确建立XSD和WSDL之间的链接。因此,需要改变和保证描述部分。 Altova软件非常有助于生成可用于创建其他操作的简单WSDL文件。
此外,描述应该在下面的语法中:
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">