柔性空气的HTTPService流错误和超时 [英] flex air httpservice stream error and timing out
问题描述
我们有一个AIR客户端发送的HTTPService发布采购到Tomcat。该操作需要超过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.
解决方案请...
推荐答案
您需要增加<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#requestTimeout"使用属性<一相对=nofollow>的HTTPService 超时href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#requestTimeout"相对=nofollow>将requestTimeout
You need to increase HTTPService timeout using property requestTimeout
能够访问请求超时以秒为单位发送的消息。一个 值小于或等于零prevents请求超时。
Provides access to the request timeout in seconds for sent messages. A value less than or equal to zero prevents request timeout.
您也可以使用它的<一个href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/rpc/http/HTTPService.html#event%3afault"相对=nofollow>故障事件捕捉超时,并执行相应的操作。
you could also use its fault event to catch timeout, and proceed accordingly.
希望帮助
这篇关于柔性空气的HTTPService流错误和超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!