gpt4 book ai didi

php - 未捕获的 soapfault 异常

转载 作者:可可西里 更新时间:2023-10-31 23:43:35 26 4
gpt4 key购买 nike

我目前正在尝试使用 php-ews,但是我不知道 soap 有一些问题,下面是错误。

Fatal error: Uncaught SoapFault exception: [VersionMismatch] Wrong Version in C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php:230 Stack trace: #0 C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php(230): SoapClient->__call('FindItem', Array) #1 C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php(230): NTLMSoapClient_Exchange->FindItem(Object(EWSType_FindItemType)) #2 C:\wamp\www\intranet\dashboard\mailtest.php(56): ExchangeWebServices->FindItem(Object(EWSType_FindItemType)) #3 {main} thrown in C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php on line 230

该文件的第 230 行是这样

public function FindItem($request) {
return $this->initializeSoapClient()->{__FUNCTION__}($request);
}

如果有人有任何想法,将不胜感激。

最佳答案

尝试:

public function FindItem($request) {
try {
return $this->initializeSoapClient()->{__FUNCTION__}($request);
}
catch(SoapFault $ex) {
print $ex->getMessage();
print $ex->getTraceAsString()
}
}

看看PHP SOAPClient

关于php - 未捕获的 soapfault 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7037878/

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