title: How to use soap in javascript
body: <p>I am trying to use SOAP in javascript but i am not getting how to start it.
  Here is the code sample i write in PHP and it works fine. I want to write this code in Javascript. In following code i call one api from a www.example.com and for calling certain api we require to pass some parameters.</p>
  
  <pre><code>    $soapClient = new SoapClient("https://www.example.com/WSDL");     
      $param_sh = array( ); 
      $header = new SoapHeader('http://somesite.com/action/', 'user_credential', $param_sh); 
      $soapClient-&gt;__setSoapHeaders(array($header)) 
      $param = array("with some parameter");
      $contents = $soapClient-&gt;__call("name_of_method",array($param)); 
  
      print($contents);  
  </code></pre>