简体   繁体   English

从Java获得来自CXF服务的WS-Addressing数据

[英]Get WS-Addressing data from CXF service from Java

I have a SOAP based web service running using Apache CXF. 我有一个使用Apache CXF运行的基于SOAP的Web服务。 I have WS-Addressing configured in my Spring configuration and everything is working fine. 我在Spring配置中配置了WS-Addressing,并且一切正常。 Now, i need to get access to the WS-Addressing values in my web service method...basically i want to insert the ws-addressing messageId in a database. 现在,我需要访问Web服务方法中的WS-Addressing值...基本上我想在数据库中插入ws-addressing messageId。

I do not see anyway to get the WS-Addressing data in my code. 无论如何,我看不到在我的代码中获取WS-Addressing数据的信息。 Anyone have an idea? 有人有主意吗?

You can get the current CXF message via something like: 您可以通过以下方式获取当前的CXF消息:

PhaseInterceptorChain.getCurrentMessage();

the AddressingProperties object is stored on there someplace. AddressingProperties对象存储在某个位置。 For incoming on the server side, I think it would be the key "javax.xml.ws.addressing.context.inbound". 对于服务器端的传入,我认为这将是关键“ javax.xml.ws.addressing.context.inbound”。

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

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