从 CXF 生成的存根中获取附件
我们正在从 AXIS1 迁移到 CXF,并使用 CXF 提供的 wsdltojava ANT 实用程序生成存根。但是,我们无法从 Webservicecall 的响应中获取附件,因为这些附件没有直接嵌入到响应中。早期的实现是使用 AXIS api 的标准方法 getAttachments()。 请帮忙
We are migrating from AXIS1 to CXF and generating stub using the wsdltojava ANT utility provided by CXF. However we are unable to getattachments from a response of Webservicecall as these attachments are not directly embedded in the response. The earlier implementation was using the standard method getAttachments() of the AXIS api.
Please help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
现在可能已经找到答案了,但对于其他人来说,关键是服务代理可以转换为 javax.xml.ws.Binding,然后您可以获得 ResponseContext (地图)和附件通过 org.apache.cxf.message.Message.ATTACHMENTS 键:
Probably found the answer by now, but for anyone else the key is the service proxy can be cast to a
javax.xml.ws.Binding
and then you can get theResponseContext
(a map) and attachments via theorg.apache.cxf.message.Message.ATTACHMENTS
key: