【发布时间】:2014-05-12 15:20:37
【问题描述】:
我正在尝试使用“wsimport”为这个 WebService 生成一个 Java SOAP 客户端:
https://mutalyzer.nl/services/?wsdl
我收到一个错误,因为有两个名为“transcriptInfo”和“TranscriptInfo”的节点:
[错误] 同名“nl.mutalyzer._2_0.services.TranscriptInfo”的类/接口已在使用中。使用类自定义来解决此冲突。 https://mutalyzer.nl/services/?wsdl的第 2 行
我用了wsimport参数-B-XautoNameResolution还是不行:
[错误] 两个声明导致 ObjectFactory 类中的冲突。 第 2 行 ...
我正在尝试进行类自定义。我正在使用一个名为“nameCorrections.xml”的绑定文件,其中包含:
<jaxws:bindings
wsdlLocation="https://mutalyzer.nl/services/?wsdl"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:jaxws="http://java.sun.com/xml/ns/jaxws">
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:schema/xs:complexType[@name='transcriptInfo']">
<jaxws:class name="TranscriptInfoByNM"/>
</jaxws:bindings>
</jaxws:bindings>
它不工作,当我运行时:
wsimport -b nameCorrections.xml http...(WDSL URL,我不能发布两个以上的链接)
我收到了这个错误:
[警告] s4s-elt-invalid-content.1:“transcriptInfo”的内容无效。元素“绑定”无效、放错位置或过于频繁地出现。 线 ? htt.... 我究竟做错了什么?
【问题讨论】: