web-services - 如何在 Web 服务出站网关中的请求回调后记录消息
问题描述
你能帮我在完成网络服务调用之前和请求回调之后如何打印请求消息吗
<int:chain input-channel="tmsoapInChannel" output-channel="dest-channel">
<ws:header-enricher>
<ws:soap-action value="http://bnst.l/tm/TWebService/vrrrectieRequest"/>
</ws:header-enricher>
<ws:outbound-gateway uri="http://bnst.l/tm/TWebService" request-callback="WSAHeaderCallback"/>
</int:chain>
<int:logging-channel-adapter id="loggit" log-full-message="true" channel="justLog" />
我已经实现了 doWithMessage,并想看看消息是什么。
解决方案
最好通过ClientInterceptor
. 但是,Spring WS 项目中已经为您提供了内置功能:https ://docs.spring.io/spring-ws/docs/3.0.1.RELEASE/reference/#logging
或者从 中借用一个想法,在 中PayloadLoggingInterceptor
实现类似的逻辑ClientInterceptor
。
推荐阅读
- javascript - 无法从 React Native App 的项目文件夹中导入 .js 文件
- c - 从回调(mqtt)访问配置
- python - 从文件中删除多个新行到 1 个新行
- python - 从 CSV 文件中提取包含另一个 CSV 文件中的任何值的行
- php - 数组中的语法错误
- reactjs - Expo Camera 仅使用 React Navigation 打开一次
- c++ - QLayout 和离散小部件表示 - 如何?
- php - Symfony,学说:加载通过表单更改的实体的旧值
- json - Flutter JSON 序列化错误
- python - arrayname.astype('bool') vs dtype = 'bool'