简体   繁体   English

Jaxb从XSD生成类时删除后缀“类型”

[英]Jaxb Removing the suffix “Type” when generating classes from XSD

We just upgraded to the below Jaxb version and started noticing that it strips off the "Type" suffix when the classes are generated. 我们刚刚升级到下面的Jaxb版本,并开始注意到它在生成类时剥去了“Type”后缀。 This is causing issues as the schema we got from 3'rd party is now having two classes with the same name. 这导致了问题,因为我们从第3方获得的模式现在有两个具有相同名称的类。 Can someone tell us how to get around this and keep the "Type" suffix as is? 有人可以告诉我们如何绕过这个并保持“类型”后缀不变吗?

  jaxbVersion = '2.2.11'
  jaxwsVersion = '2.2.10'
  jaxwsrsVersion = '2.0.1'

Thanks 谢谢

Use the following schema bindings declaration: 使用以下架构绑定声明:

<schemaBindings>
  <nameXmlTransform>
    <typeName suffix="Type"/>
  </nameXmlTransform>
</schemaBindings>

See: 看到:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM