Adobe Flex的4.6 WebService的请求超时 [英] Adobe Flex 4.6 WebService request timeout

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

问题描述

在code可以连接到我的web服务(Lotus Notes数据库)是通过在Flash Builder在创建数据/连接使用WebService的......。所有工作正常,但我有一个问题,增加请求超时。该API说,你可以这样设置请求超时:

The code to get connected to my WebService (Lotus Notes Database) is created by the Flash Builder over "Data/Connect with WebService...". All works fine, but I have a problem to increase the request timeout. The API says that you can set the request timeout like this:

_serviceControl.requestTimeout = 300;

在一个的iOS(iPad的),这似乎是工作的所有罚款。但是,如果我在桌面上或在Android智能手机上运行我的应用程序这只有当我设置的请求超时超过〜30秒下工作。如果我没有设置比30的请求超时或更高,我的应用程序需要的时间超过30秒,等待一个答案/结果_serviceControl引发一个的FaultEvent的消息:

On a iOS (iPad) it seems to be work all fine. But if I run my app on desktop or on an android smartphone this only works if I set up the request timeout lower than ~30 seconds. If I don't set up the request timeout or higher than 30 and my app needs longer than 30 seconds to wait for an answer/result the "_serviceControl" fires an FaultEvent with the message:

body = ""  
clientId = "DirectHTTPChannel0"  
correlationId = "CDED773E-34E5-56F8-D521-4FFC393D7565"  
destination = ""  
extendedData = (null)  
faultCode = "Server.Error.Request"  
faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: "http://...?OpenWebService" errorID=2032]. URL: "http://...?OpenWebService"  
faultString = "HTTP request error"  
headers = (Object)#1  
DSStatusCode = 0  
messageId = "91D11378-49D4-EDF7-CE7A-4FFCB09EBC47"  
rootCause = (flash.events::IOErrorEvent)#2  
bubbles = false  
cancelable = false  
currentTarget = (flash.net::URLLoader)#3  
bytesLoaded = 0  
bytesTotal = 0  
data = ""  
dataFormat = "text"  
errorID = 2032  
eventPhase = 2  
target = (flash.net::URLLoader)#3  
text = "Error #2032: Stream Error. URL: "http://...?OpenWebService"  
type = "ioError"  
timestamp = 0  
timeToLive = 0

任何想法,为什么出现这种情况?

Any idea why this happens?

推荐答案

我有同样的问题,将requestTimeout没有工作。

I had the same problem, requestTimeout didn't work.

如果有人正在寻找一个答案,这个配置能正常工作对我来说:

If someone is looking for an answer, this configuration works fine for me :

import flash.net.URLRequestDefaults;

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

看一看此处了解详情:的Flex的HTTPService超时反正

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

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