title: In node-soap, how can I see/debug the generated XML SOAP request?
body: <p>I try to use the node-soap module like this:</p>
  
  <pre><code>const soap = require('soap');
  
  soap.createClient('some-wsdl-url', function(err, client) {
      const args = {
          'ValidateCustomerRequest': {
              'memberNumber': 12345
          }
      };
  
      client.ValidateCustomer(args, function(err, result) {
          console.log(result);
      });
  });
  </code></pre>
  
  <p>Now I get an "invalid format" response from the webservice. To debug this I would very much like to see what the actual XML looks like that is sent to the webservice. </p>
  
  <p>I already tried this one:</p>
  
  <pre><code>require('request').debug = true
  </code></pre>
  
  <p>... which was suggestes in <a href="https://stackoverflow.com/a/39486568/1686888">another SO answer</a>.</p>
  
  <p>But the output is not that helpful:</p>
  
  <pre><code>[ERROR] REQUEST { uri:
    Url { ... },
    method: 'GET',
    headers:
     { 'User-Agent': 'node-soap/0.18.0',
       Accept: 'text/html,application/xhtml+xml,application/xml,text/xml;q=0.9,*/*;q=0.8',
       'Accept-Encoding': 'none',
       'Accept-Charset': 'utf-8',
       Connection: 'close',
       Host: 'xxx' },
    followAllRedirects: true,
    body: null,
    callback: [Function] }
  </code></pre>
  
  <p>I don't see my "ValidateCustomerRequest" in there and body is null. Also I'm wondering why method is GET, shouldn't that be POST?</p>
  
  <p>So does this debug output looks normal and/or is there another way to see the created XML request?</p>