Php 在nusoap中调用返回bool(false)的方法

Php 在nusoap中调用返回bool(false)的方法,php,web-services,wsdl,nusoap,Php,Web Services,Wsdl,Nusoap,当我调用一个方法和var_dump($result)时,会显示bool(false)为什么? 我将参数更改为example和1234,以便在此处写入: require_once('../class/nusoap.class.php'); // Create the client instance $client = new soapclient('sample?wsdl' ,'wsdl', '', '', '', ''); $soapClient->soap_defencoding = '

当我调用一个方法和var_dump($result)时,会显示bool(false)为什么? 我将参数更改为example和1234,以便在此处写入:

require_once('../class/nusoap.class.php');
// Create the client instance
$client = new soapclient('sample?wsdl' ,'wsdl', '', '', '', '');
$soapClient->soap_defencoding = 'UTF-8';
$soapClient->debug_flag = false;

// Check for an error
$err = $client->getError();
if ($err) {
    // Display the error
    echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
    // At this point, you know the call that follows will fail
}
// Call the SOAP method
$result = $client->call('enqueue', array('from' => '+12345',
'rcpt_array' => '123456',
'msg' => 'hi',
'uname' => 'example1',
'pass' => 'example2'));
var_dump($result);
require_一次('../class/nusoap.class.php');
//创建客户端实例
$client=newsoapclient('sample?wsdl','wsdl','','','');
$soapClient->soap_defencoding='UTF-8';
$soapClient->debug_标志=false;
//检查是否有错误
$err=$client->getError();
如果($err){
//显示错误
回显“构造函数错误”。$err.';
//此时,您知道接下来的调用将失败
}
//调用SOAP方法
$result=$client->call('enqueue',array('from'=>'+12345',
“rcpt_数组”=>“123456”,
'msg'=>'hi',
“uname”=>“example1”,
“通过”=>“示例2”);
var_dump($结果);
根据PHP文档,SoapClient构造函数的第二个参数应该是
数组

$client->enqueue(array('from' => '+12345',
'rcpt_array' => '123456',
'msg' => 'hi',
'uname' => 'example1',
'pass' => 'example2'));
但在你的例子中,你传递了一系列的论点。我不确定这是否有效

第二,在使用
wsdl
处理Soap调用时,我们可以直接调用wsdl方法,如您的示例所示,使用参数

下面是一个简单的PHP soap调用

根据PHP文档,soap客户端构造函数的第二个参数应该是
数组

$client->enqueue(array('from' => '+12345',
'rcpt_array' => '123456',
'msg' => 'hi',
'uname' => 'example1',
'pass' => 'example2'));
但在你的例子中,你传递了一系列的论点。我不确定这是否有效

第二,在使用
wsdl
处理Soap调用时,我们可以直接调用wsdl方法,如您的示例所示,使用参数


下面是一个简单的PHP soap调用

我这样更改了代码,但仍然存在问题://Pull in the NuSOAP code require_once('../class/NuSOAP.class.PHP');//创建客户端实例$client=newsoapclient('sample?wsdl')$客户端->soap_编码='UTF-8'$client->debug_标志=false$结果=$client->enqueue(数组('from'=>'+样本','rcpt_数组'=>'+样本','msg'=>'样本','uname'=>'样本','pass'=>'样本');var_dump($结果);然后得到这个eror:调用未定义的方法soapclient::enqueue(),你说的remove nusaop是什么意思??????我所做的每一项工作都会得到这样的结果:调用未定义的方法soapclient::enqueue(),我这样更改了代码,但仍然存在问题://Pull in the NuSOAP code require_once('../class/NuSOAP.class.php');//创建客户端实例$client=newsoapclient('sample?wsdl')$客户端->soap_编码='UTF-8'$client->debug_标志=false$结果=$client->enqueue(数组('from'=>'+样本','rcpt_数组'=>'+样本','msg'=>'样本','uname'=>'样本','pass'=>'样本');var_dump($结果);然后得到这个eror:调用未定义的方法soapclient::enqueue(),你说的remove nusaop是什么意思??????我所做的每一项工作都会得到这样的结果:调用未定义的方法soapclient::enqueue()