【问题标题】:uncaught soapfault exception未捕获的soapfault异常
【发布时间】:2011-10-25 15:46:26
【问题描述】:

我目前正在尝试使用 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);
    }

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

【问题讨论】:

    标签: php soap exchangewebservices


    【解决方案1】:

    尝试:

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

    看看PHP SOAPClient

    【讨论】:

    • 不幸的是返回以下 #0 C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php(235): SoapClient->__call('FindItem', Array) #1 C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php(235): NTLMSoapClient_Exchange->FindItem(Object(EWSType_FindItemType)) #2 C:\wamp\www\intranet\dashboard\mailtest.php(56 ): ExchangeWebServices->FindItem(Object(EWSType_FindItemType)) #3 {main}
    • 请添加 print $ex->getMessage();这是总的错误信息吗
    • 新输出是错误的版本#0 C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php(234): SoapClient->__call('FindItem', Array) #1 C:\wamp\www\intranet\dashboard\php-ews\ExchangeWebServices.php(234): NTLMSoapClient_Exchange->FindItem(Object(EWSType_FindItemType)) #2 C:\wamp\www\intranet\dashboard\mailtest.php(56 ): ExchangeWebServices->FindItem(Object(EWSType_FindItemType)) #3 {main}
    猜你喜欢
    • 2018-07-07
    • 2012-09-15
    • 2013-10-10
    • 2023-03-12
    • 2011-09-16
    • 2012-12-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多