I have this code in general SOAP of PHP:
$options = array(
'login' => 'user',
'password' => 'pass'
);
$client = new SoapClient($url, $options);
I just want to know how can I sending $options in NuSOAP.
$client = new nusoap_client($url, 'wsdl');
Parameters can be sent along in the call method, as the second parameter like so:
$soapclient->call( string methodname [ ,array parameters] );
Download the documentation for more information.
NuSoap has a setCredentials
method to send login and password:
$client->setCredentials("user","password");
void setCredentials (string $username, string $password, [string $authtype = 'basic'], [array $certRequest = array()])
string $username
string $password
string $authtype: (basic|digest|certificate|ntlm)
array $certRequest: (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs)