JAXB-AXIS,当请求 xml 被解组时,JAXB 创建 JAXBElement;创建对象而不是 Foo 对象

发布于 2024-12-01 03:47:25 字数 264 浏览 0 评论 0原文

在对主题进行搜索后,我发现通过为 JAXB 绑定设置generateElementProperty = false我们可以避免这种情况。但所有解决方案都显示了如何在绑定文件中设置此属性,并使用 xjc 命令,这意味着当我从架构文件创建 JAVA beans 时。但我想知道如何通过 API 设置属性,甚至是 APIS 在解组我的请求 xml 以创建请求对象(JAXBElement 对象而不是 Foo 对象)时读取的绑定文件(JAXBElement 对象而不是 Foo 对象).....

谢谢 湿婆

After doing a search abt the topic, i came to know by setting generateElementProperty=false for JAXB bindings we can avoid this. But all the solutions shows how to set this property in a binding file and using the xjc command meaning when i create JAVA beans from schema file. But i want to know how can i set the property through API's or even a binding file which the APIS will read while unmarshalling my request xmls to create the request object(JAXBElement object instead of Foo Object).....

Thanks
Siva

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文