flex air httpservice 流错误和超时
我们有一个 AIR 客户端向 Tomcat 发送 HTTPService Post 请求.自文件传输操作以来,该操作在服务器中耗时超过 30 秒.
We have an AIR client sending HTTPService Post request to Tomcat. The operation takes more than 30 seconds in the server since its a files transfer operation.
到服务器返回响应时,Flex 抛出错误,2032,流错误(网上查了很多) 看起来它在 30 秒后超时,等待 Http 响应.
By the time the server returns the response, Flex is throwing a fault, 2032, stream error ( checked a lot on the net ) Looks like its timing out after 30 seconds, waiting for the Http response.
我尝试设置 ht.requestTimeout,但没有奏效.设置 URLRequestDefaults.idleTimeout 也不起作用.看起来我已经陷入了死胡同.
i tried setting ht.requestTimeout, it did not work. Setting URLRequestDefaults.idleTimeout also is not working. Looks like i have hit a dead end on this.
请解决...
您需要增加HTTPService 超时使用属性 requestTimeout
You need to increase HTTPService timeout using property requestTimeout
提供对已发送消息的请求超时(以秒为单位)的访问.一种小于或等于零的值可防止请求超时.
Provides access to the request timeout in seconds for sent messages. A value less than or equal to zero prevents request timeout.
您也可以使用它的 fault 事件以捕获超时,并相应地进行.
you could also use its fault event to catch timeout, and proceed accordingly.
希望有帮助