我在PHP的一般SOAP中有这个代码:
$options = array(
'login' => 'user',
'password' => 'pass'
);
$client = new SoapClient($url, $options);
我只想知道如何在NuSOAP中发送$选项。
$client = new nusoap_client($url, 'wsdl');
答案 0 :(得分:0)
参数可以在call方法中发送,作为第二个参数,如下所示:
$soapclient->call( string methodname [ ,array parameters] );
Download the documentation了解更多信息。
答案 1 :(得分:0)
NuSoap使用setCredentials
方法发送登录名和密码:
$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)