Spring WS WebServicesTemplate / Jaxb2Marshaller客户端查看原始xml? [英] Spring WS WebServicesTemplate/Jaxb2Marshaller client view raw 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 theorg.springframework.ws.server.MessageTracing.sent
logger; ororg.springframework.ws.server.MessageTracing.received
to log received messages.On the client-side, similar loggers exist:
org.springframework.ws.client.MessageTracing.sent
andorg.springframework.ws.client.MessageTracing.received
.
这篇关于Spring WS WebServicesTemplate / Jaxb2Marshaller客户端查看原始xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!