gpt4 book ai didi

php - fatal error : Uncaught SoapFault exception: [soap:Server] Fault occurred while processing

转载 作者:行者123 更新时间:2023-12-04 17:59:35 25 4
gpt4 key购买 nike

我用这个代码

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);

并得到这个成功的响应:

Array ( [0] => verifyResponse verify(verify $parameters) ) 

但是当我使用这段代码时

$response = $client->__soapcall('verify',array($params));

我收到了这个响应错误

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

我的电话有什么问题吗?

最佳答案

根据 $client->__getTypes(),您的数据结构中缺少“arg0”元素。将您的代码更改为:

try 
{
$response = $client->verify(array('arg0' => $params));
}
catch(Exception $e)
{
var_dump($e->getMessage());
}

关于php - fatal error : Uncaught SoapFault exception: [soap:Server] Fault occurred while processing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37222183/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com