Hi guys, 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.
$soapClient = new SoapClient("https://www.example.com/WSDL");
$param_sh = array( );
$header = new SoapHeader('http://somesite.com/action/', 'user_credential', $param_sh);
$soapClient->__setSoapHeaders(array($header))
$param = array("with some parameter");
$contents = $soapClient->__call("name_of_method",array($param));
print($contents);
Thanx in advance!!!