xml-rpcxmlrpcclient

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


I've got a system where some C++ code (using xmlrpc-c) talks to a Java servlet 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?


Solution

  • 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.