[英]Fatal error: Uncaught SoapFault exception: [soap:Server] Fault occurred while processing
I use this code我用这个代码
error_reporting(E_ALL);
ini_set('display_errors', 1);
$params = array(
'username' => 'username',
'password' => 'password',
'cocNo' => '1060907A'
);
$client = new SoapClient('URL/?wsdl',array('trace'=>1));
//$response = $client->__getTypes();
$response = $client->__getFunctions();
pint_r($response);
and get this successful response:并得到这个成功的回应:
Array ( [0] => verifyResponse verify(verify $parameters) )
but when i use this code但是当我使用此代码时
$response = $client->__soapcall('verify',array($params));
I got this response error我收到此响应错误
Fatal error: Uncaught SoapFault exception: [soap:Server] Fault occurred while processing. in /PATH/index.php:22
Stack trace: #0 /PATH/index.php(22): SoapClient->__soapCall('verify', Array) #1 {main} thrown in /PATH/index.php on line 22
What is wrong with my call?我的电话有什么问题?
According to $client->__getTypes()
you are missing an 'arg0' element in your data structure.根据$client->__getTypes()
您的数据结构中缺少一个 'arg0' 元素。 Change your code to:将您的代码更改为:
try
{
$response = $client->verify(array('arg0' => $params));
}
catch(Exception $e)
{
var_dump($e->getMessage());
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.