title: how to consume wcf in node.js?
body: <p>I want to consume wcf in node.js. I tried it:</p>
  
  <p><code>soap.createClient(url, function (err, client) {
              if (err) {
                  console.log(err);
                  return false;
              }
              client.myFunc(args, function(err1, result) {
              if(result.success)
                  return true;
              });
  });</code></p>
  
  <p>But an error occurred in createClient (error block). it says: Unexpected root element of WSDL or include .
  Then I tried by wcf.js:</p>
  
  <pre><code>var BasicHttpBinding = require('wcf.js').BasicHttpBinding
  , Proxy = require('wcf.js').Proxy
  , binding = new BasicHttpBinding()
  , proxy = new Proxy(binding, " http://localhost/myService.svc");
  var message = '&lt;Envelope xmlns=' +
              '"http://schemas.xmlsoap.org/soap/envelope/"&gt;' +
              '&lt;Header /&gt;' +
              '&lt;Body&gt;' +
              '&lt;myFunc xmlns="http://localhost/myService.svc/"&gt;' +
              '&lt;value&gt;'+ args +'&lt;/value&gt;' +
              '&lt;/AddNewUser&gt;' +
              '&lt;/Body&gt;' +
              '&lt;/Envelope&gt;';
  proxy.send(message, "http://localhost/myService.svc", function (result, ctx){
      if(result.success)
          return true;
      });
  </code></pre>
  
  <p>But my program didn't call send function.
  Finally I tried to configure WCF to WSDL publishing like this: <a href="https://stackoverflow.com/questions/8861508/wcf-cannot-configure-wsdl-publishing">WCF cannot configure WSDL publishing</a></p>
  
  <p>But it didn't work to! How can I solve my problem?</p>