【问题标题】:Unable to catch SoapFault exception. Bad Gateway无法捕获 SoapFault 异常。错误的网关
【发布时间】:2016-01-03 12:08:52
【问题描述】:

我无法在我的 PHP try catch 块中捕获 SoapFault 异常。我的代码也用完了等待服务器响应的 max_execution_time(120 秒)。

我看到了消息

警告:未捕获的 SoapFault 异常:[HTTP] D:\wamp\www\dev6\application\libraries\Search.php:161 中的错误网关 ...

我的代码,

try {

    $oClient = new SoapClient( $this->CI->config->item('indexing_wsdl_url'),
                                array(
                                    "trace"         => true,
                                    "exceptions"    => true,
                                )
                            );

    $result = $oClient->add(
            array(
                // Application specific parameters goes here
            )
    );// (this is line number 161 as seen in the warning)

} catch (SoapFault $fault) {

    log_message('error', $fault->getMessage());
} 

我正在使用 Codeigniter 3.0 框架,这个特定的代码位于一个库中。

这可能是什么问题?

问候

【问题讨论】:

  • 你是否偶然使用了命名空间?
  • 不,我没有使用命名空间。

标签: php soap exception-handling try-catch soap-client


【解决方案1】:

问题在于超时。

当我给脚本执行更多时间时发现了错误。

【讨论】:

    猜你喜欢
    • 2012-12-19
    • 1970-01-01
    • 2023-03-12
    • 2011-10-25
    • 1970-01-01
    • 2015-10-15
    • 2012-02-18
    • 1970-01-01
    • 2018-07-07
    相关资源
    最近更新 更多