Spring WS WebServicesTemplate / Jaxb2Marshaller客户端查看原始xml? [英] Spring WS WebServicesTemplate/Jaxb2Marshaller client view raw xml?

查看:113
本文介绍了Spring WS WebServicesTemplate / Jaxb2Marshaller客户端查看原始xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用WebServicesTemplate和Jxb2Marshaller作为编组引擎查看Spring WS客户端的请求和响应?



我只是想记录xml ,不对原始xml执行任何操作。

解决方案

参见 spring-ws 文件:
http: @st $。标准Commons Logging接口:


要记录所有服务器端消息,只需设置 org.springframework.ws即可。 server.MessageTracing logger to level DEBUG或TRACE。在调试级别,仅记录有效负载根元素;在TRACE级别上,整个邮件内容。如果您只想记录已发送的消息,请使用 org.springframework.ws.server.MessageTracing.sent logger;或 org.springframework.ws.server.MessageTracing.received 记录收到的消息。



在客户端,存在类似的记录器: org.springframework.ws.client.MessageTracing.sent org.springframework.ws.client.MessageTracing.received



Is it possible to view the request and the response for a Spring WS client using WebServicesTemplate and Jxb2Marshaller as the marshaling engine?

I simply wan to to log the xml, not perform any actions upon the raw xml.

解决方案

See the spring-ws documentation: http://static.springsource.org/spring-ws/sites/2.0/reference/html/common.html#logging

You can log messages via the standard Commons Logging interface:

To log all server-side messages, simply set the org.springframework.ws.server.MessageTracing logger to level DEBUG or TRACE. On the debug level, only the payload root element is logged; on the TRACE level, the entire message content. If you only want to log sent messages, use the org.springframework.ws.server.MessageTracing.sent logger; or org.springframework.ws.server.MessageTracing.received to log received messages.

On the client-side, similar loggers exist: org.springframework.ws.client.MessageTracing.sent and org.springframework.ws.client.MessageTracing.received.

这篇关于Spring WS WebServicesTemplate / Jaxb2Marshaller客户端查看原始xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆