开发者

Is there a way to view the actual XML produced and received by the xmlrpc-c library?

开发者 https://www.devze.com 2022-12-13 01:21 出处:网络
I\'ve got a system where some C++ code (using xmlrpc-c) talks to a Java servlet 开发者_StackOverflow社区which uses the Apache XML-RPC library.

I've got a system where some C++ code (using xmlrpc-c) talks to a Java servlet 开发者_StackOverflow社区which uses the Apache XML-RPC library.

I've got a problem that would be a whole lot easier to resolve if I could view the actual XML being sent back and forth. Is there some way to turn on logging of the wire protocol XML in either Apache XMLRPC or xmlrpc-c?


Not sure about the logging part, but if the library you're using lets you specify a proxy, you could direct it to a web debugger like Fiddler, and see the output there.

Another possibility is to use a network sniffer tool like WireShark. It has a "follow conversation" feature that makes it easy to see the content of multiple packets.


I've found a way to do it on the C++ side. If you define the environment variable XMLRPC_TRACE_XML before running your xmlrpc-c code, it logs all XML received and sent and sends it to stderr.

See The xmlrpc-c docs for details.

0

精彩评论

暂无评论...
验证码 换一张
取 消