微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

具有冲突名称的 wsimport 生成

如何解决具有冲突名称的 wsimport 生成

我使用了 How to generate classes from wsdl using Maven and wsimport? 中答案中的 maven 插件, 但我收到了以下一些错误(因为工作而清理):

wsdl 由多个定义如下的“消息”组成:

<wsdl:message name="Name_in">
    <wsdl:part element="xx:CommonName" name="NameReqType"/>
  </wsdl:message>

地点:

  • 'Name' 是一个对象名称
  • 'xx' 是类型,即 xlmns:xx
  • 'CommonName' 是每个主要对象使用的名称

[ERROR] A class/interface with the same name "com.package.CommonName" is already in use. Use a class customization to resolve this conflict. [ERROR] (Relevant to above error) another "ServiceClass" is generated from here.

并行文件夹中也有很多相关的xsd,结果如下

[ERROR] Two declarations cause a collision in the ObjectFactory class.
[ERROR] (Related to above error) This is the other declaration.

任何帮助将不胜感激,我对 wsimport 的使用不多。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。