未被捕获的soapfault例外

时间:2011-08-12 09:04:34

标签: php soap exchangewebservices

我正在尝试使用php-ews,但是我遇到了一些我不知道的问题,下面是错误。

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

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

1 个答案:

答案 0 :(得分:1)

尝试:

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

并查看PHP SOAPClient