调用Web服务时超时

时间:2013-12-03 18:57:32

标签: web-services actionscript-3 flash builder

当我在使用Flex Builder中开发的移动应用程序中使用Web服务时,我遇到了问题。

我有以下Web服务代码

<s:CallResponder id="readAllPedidosErpResult"    result="readAllPedidosErpResult_resultHandler(event)"  fault="sincFailResult_faultHandler(event)"/>

protected function readAllPedidosErp():void
{
    readAllPedidosErpResult.token = xEasyERPMobileAppWS.readAllPedidosErp
    (readFechaSincronizacionPedidoErp(),sC.readComercialUsuario());
}

protected function readAllPedidosErpResult_resultHandler(event:ResultEvent):void
{
    var result:ArrayCollection;
    var c:PedidoWSMobile;

    if(event.token.result is ArrayCollection)
    {
        result = event.token.result as ArrayCollection;
        if(result!=null)
        {                                               
            //DO SOMETHING
        }
    }
    continueToNext(15);
}

我得到的问题是xEasyERPMobileAppWS.readAllPedidosErp(readFechaSincronizacionPedidoErp(),sC.readComercialUsuario());需要将近2分钟才能得到答案,但是30秒后(或多或少)不会等待更多而且我遇到了错误(sincFailResult_faultHandler(事件))。

我如何给CallResponder留出更多时间等待我正在呼叫的Web服务的答案?

提前致谢。

1 个答案:

答案 0 :(得分:1)

我刚刚在另一个帖子中找到了解决方案。

仅供参考:Adobe Flex 4.6 WebService request timeout

非常感谢!