How do i view the "raw xml" output from nusoap?

tzmatt7447 picture tzmatt7447 · Aug 31, 2010 · Viewed 21k times · Source

I have a generic function that I use to pass SOAP commands. I need to view the RAW XML data that is being sent to the server for diagnosing an error. How do i do that?

Answer

tzmatt7447 picture tzmatt7447 · Aug 31, 2010

Never mind, this seems to be pretty close to the dot!

http://www.scottnichol.com/nusoapintro.htm

echo '<h2>Request</h2>';
echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
echo '<h2>Response</h2>';
echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';

// Display the debug messages
echo '<h2>Debug</h2>';
echo '<pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';