Flex的的HTTPService超时反正 [英] Flex HTTPService times out anyway

查看:823
本文介绍了Flex的的HTTPService超时反正的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我执行这项服务的30秒后收到一个错误

I'm getting an error after 30 seconds of execution of this service

<s:HTTPService id="svcList" url="http://localhost/index.php" method="GET" result="svcList_resultHandler(event)" fault="svcList_faultHandler(event)" requestTimeout="300">
    <s:request xmlns="">
        <mod>module</mod>
        <op>operation</op>
    </s:request>
</s:HTTPService>

此操作时间比通常让我改变最大的执行时间为PHP为120秒。

This operation takes longer than usual so I changed the max execution time for php to 120 seconds.

脚本正确通过浏览器即要求运行时的http://localhost/index.php MOD =模块和放大器; OP =操作

The script runs correctly when is requested through a browser i.e http://localhost/index.php?mod=module&op=operation

我已经检查了故障事件对象的答案,找到这个在faultDetails 错误:[IOErrorEvent TYPE =ioError在泡沫=假可取消=假的EventPhase = 2文本=错误#2032 :流错误的URL:http://localhost/index.phpErrorID中= 2032。网址:HTTP://localhost/index.php

I've already checked the fault event object for an answer and find this at faultDetails Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost/index.php" errorID=2032]. URL: http://localhost/index.php

是否有执行时间限制的请求?

Is there a execution time limit for requests ?

编辑:使用 requetTimeout

感谢

推荐答案

好吧,在我的工作环境(的Flex SDK 4.1 - AIR 2.6)简单地使用将requestTimeout =XX不工作,我不知道为什么。

Ok, in my working environment (Flex SDK 4.1 - AIR 2.6) simply using requestTimeout="xx" doesn't work I don't know why.

但设置了非常全局对象 URLRequestDefaults 属性的idleTimeout 的作品,因为我需要。

But setting a very global object URLRequestDefaults property idleTimeout works as I need.

有我的proble的解决方案是这样的结构,在应用程序的顶部。

The solution for my proble is this configuration, at the top of the application.

import flash.net.URLRequestDefaults;

URLRequestDefaults.idleTimeout = 120000; //note this value represents milliseconds (120 secs)

我相信这可以帮助别人。

I believe this could help somebody.

这篇关于Flex的的HTTPService超时反正的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆