如何在WebSphere中拦截SOAPMessage

发布于 2024-12-16 11:35:31 字数 419 浏览 0 评论 0原文

你能帮我解决这个问题吗?

我有一个问题要挣扎。在最终用户收到来自 Web 服务的响应之前,我应该对该消息进行签名,即提取当前的 SOAP 消息并调用签名 Web 服务。完成后,我将其发送到 JAX-WS 处理程序链。到目前为止我们已经使用了 JAX-WS 处理程序。问题是 WebSphere 有时拒绝拾取并调用处理程序。我的意思是,真的。我从各个角度都试过了,但还是不行。我想出了一个在模块中进行签名的想法。我知道这不是一个好主意,但在签名程序一劳永逸后我会想到更好的办法。主要问题是我不知道如何在模块中注入 SOAPMessageContext,因为 WebSphere 会自动为 JAX-WS 处理程序注入 SOAPMessageContext。我既没有找到使用 ibm api 检索当前 SOAPMessageContext 的 api 引用,也无法以任何其他方式设置消息。隧道尽头有灯光为我服务吗?

Can you help me out on this one?

I have a problem to struggle with. Before end user receives a response from web-service, I should sign the message, that is I extract the current SOAP message and invoke signing web-service. After I'm done, I just send it up the JAX-WS handlers chain. We have used JAX-WS handlers so far. The problem is that WebSphere sometimes refuses to pick up and invoke the handler. I mean, really. I've worked every angle and this just does not work. I've come up with an idea to do the signing in the module. I know it is not a good idea but I will think of something better after the signing procedure works once and for all. The major problem is that I do not know how to inject SOAPMessageContext in the module since WebSphere do it for JAX-WS handler automatically. I have neither not found the api reference to retrieve current SOAPMessageContext with ibm api, nor am I able to set the message in any other way. Is there a light at the end of the tonnel for me?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空城缀染半城烟沙 2024-12-23 11:35:31

在 JAX-WS 服务中,可以获取请求的消息上下文,但无法在服务本身内部操作 SOAP 响应。这只有在处理程序中才有可能。

我记得在最近的一些 WAS 版本中存在一个问题,即 JAX-WS 处理程序对 SOAP 消息所做的修改会丢失。您确定 WebSphere 确实没有调用您的处理程序,还是可能调用了处理程序但对 SOAP 消息的修改丢失了?

In a JAX-WS service it is possible to get the message context for the request, but it is not possible to manipulate the SOAP response inside the service itself. That is only possible in a handler.

I remember that in some of the recent WAS versions there was an issue where modifications to the SOAP message done by a JAX-WS handler are lost. Are you sure that WebSphere really doesn't invoke your handler, or could it be that the handler is invoked but that the modifications to the SOAP message are lost?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文