I have a web service at this ip address http://172.10.1.12/webs/Users.asmx?WSDL, now I want to get some data to authenticate users in my system from this web service, I use angular js and node js , my college told me that he has worked in the same web service using php with the following code :
<?php
class User
{
private $UsersServiceWsdlURL;
private $soapClient;
private $Id;
public function __construct($Id)
{
$this->Id = $Id;
//web service wsdl.
$this->UsersServiceWsdlURL = "http://172.10.1.12/webs/Users.asmx?WSDL";
//soap client object.
$this->soapClient = new SoapClient($this->UsersServiceWsdlURL);
}
public function authenticate($password)
{
//send username and password to the service to authenticate.
$result = $this->soapClient->AuthinticationStatus(array("userName" => $this->Id, "password" => $password));
return ($result->AuthinticationStatusResult);
}
?>
now I want to do the same functionality with node js, I founded a package in node called soap https://www.npmjs.com/package/soap.
How can I do the same thing with node using this package?!
via Mahmoud Abd AL Kareem
No comments:
Post a Comment