使用 xjc 简单绑定模式关闭复数名称
我有一个 XSD,我不想更改它来解决我将在下面描述的问题。使用当前形式的 XSD,我遇到了没有生成 @XmlRootlement
的常见问题,并使用了 简单绑定模式解决方案被许多人指出来添加此注释。
不幸的是,这导致生成的代码中的一些对象名称变得复数(即列表/集合对象现在变成汽车而不是汽车或驴而不是驴),这是不可取的,因为我使用这些对象来绑定 CXF 中的传入请求。有没有办法使用简单绑定模式但禁用复数形式?
I have an XSD that I'd like to not change to solve the problem I'll describe below. With the XSD in it's current form, I ran into the common problem of no @XmlRootlement
being generated, and used the simple binding mode solution pointed out by many to get this annotation added.
Unfortunately, this has caused some object names in the generated code to become pluralized (i.e. list/collection objects now become cars instead of car or donkies instead of donkey) which is not desirable as I'm using these objects to binding incoming requests in CXF. Is there anyway to use the simple binding mode but disable the pluralization?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论