【发布时间】:2016-04-11 08:06:34
【问题描述】:
我已经制作了一个 WSDL 文件,我打算用它创建自顶向下的 Web 服务。不幸的是,Eclipse 抛出了这个错误:
"A problem occurred while running the WSDL validator for namespace http://schemas.xmlsoap.org/wsdl/"
我进行了一些研究,看起来这是因为一些 Eclipse wsdl-validation 错误,here 解释说
那里有人声称他用补丁修复了这个错误,我已经应用了它,但是错误仍然存在,我开始认为我的 wsdl 文件本身存在一些问题。
WebService 应该获取一个 ID 列表(列)并根据这些 ID 返回一个 2 列表数据。
你能帮我看看有什么问题吗?
面向 Web 开发人员的 Eclipse Java EE IDE。 版本:Mars.2 版本 (4.5.2) 版本号:20160218-0600 WTP 1.2.1.20150819-2220
这是 WSDL 文件:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="reb.ecm.ws.RebUtilsService"
xmlns="reb.ecm.ws.RebUtilsService"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:complexType name='DPList'>
<xsd:element
minOccurs='0'
maxOccurs='unbounded'
name='DP'
type='DP'/>
</xsd:complexType>
<xsd:complexType name='DP'>
<xsd:all>
<xsd:element
minOccurs='0'
maxOccurs='1'
name='DPID'
type='xsd:int'/>
</xsd:all>
</xsd:complexType>
<xsd:complexType name='WSInfoList'>
<xsd:element
minOccurs='0'
maxOccurs='unbounded'
name='WSInfoItem'
type='WSInfoItem'/>
</xsd:complexType>
<xsd:complexType name='WSInfoItem'>
<xsd:all>
<xsd:element
minOccurs='0'
maxOccurs='1'
name='DPID'
type='xsd:int'/>
</xsd:all>
<xsd:all>
<xsd:element
minOccurs='0'
maxOccurs='1'
name='WSID'
type='xsd:int'/>
</xsd:all>
</xsd:complexType>
</wsdl:types>
<wsdl:message name="inMessage">
<wsdl:part name="DPList" type="DPList" />
</wsdl:message>
<wsdl:message name="outMessage">
<wsdl:part name="WSInfoList" type="WSInfoList" />
</wsdl:message>
<wsdl:portType name="RebUtilsServicePortType">
<wsdl:operation name="GetActualWSIDbyDPID" >
<wsdl:input message="inMessage" />
<wsdl:output message="outMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="RebUtilsServiceHTTPBinding"
type="RebUtilsServicePortType">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetActualWSIDbyDPID">
<wsdlsoap:operation soapAction=""/>
<wsdl:input>
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output>
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="RebUtilsServicePorts">
<wsdl:port binding="RebUtilsServiceHTTPBinding" name="RebUtilsService">
<wsdlsoap:address
location="http://localhost:9084/RebUtilsService/RebUtilsServicePorts"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
更新:Eclipse 没有问题。至少前面提到的补丁修复了一些问题。
【问题讨论】:
-
您能告诉我们您使用的是哪个版本的eclipse吗?另外请从 Eclipse Marketplace 安装 Eclipse WSDL 验证插件并尝试重新生成您的客户端代码?
-
面向 Web 开发人员的 Eclipse Java EE IDE。版本:Mars.2 Release (4.5.2) Build id:20160218-0600 WTP 1.2.1.20150819-2220
-
您能否发布一个指向 WSDL 验证插件的链接,因为我在运行 Eclipse 市场时遇到了问题,因为我的组织中的代理设置。
-
在您的架构定义中显示一些错误,您能发布您的架构吗?
-
没有架构,我已经在
中输入了我需要的所有内容。我认为这样就足够了。
标签: java eclipse web-services soap wsdl