0

我的 flex 客户端应用程序存在严重问题。我有一个带有 php web 服务的 apache 服务器。flex 客户端发出一个 httpservice 请求。我注意到从应用程序的 creationComplete 事件运行的 httpservice 请求并不总是从服务器获取数据。但从用户操作调用的 HTTPservice 请求始终有效。

我还注意到,当我直接从 Flex Builder 3 运行 flex 客户端应用程序而不将其上传到服务器时,问题出现的频率较低。

在应用程序中:

mx:Application creationComplete="Init()" verticalScrollPolicy="off" horizontalScrollPolicy="off" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#5d8eb1"

private function Init():void
{
   var http_request:HTTPService = new HTTPService();
   http_request.url = "http://"+this.server_name+":"+this.server_port+"/services/client/client_result.php";

http_request.resultFormat = "e4x";
   http_request.addEventListener("result",resultFunc);

   http_request.send();
   http_request.disconnect();
}
4

1 回答 1

0

我有一个带有 php web 服务的 apache 服务器。flex 客户端发出一个 httpservice 请求。

  1. 为什么在这里提到 WebServices。我没有解释你的第一句话。

  2. 当您没有得到任何东西时,您的 faultEvent 中会发生什么?

我注意到从应用程序的 creationComplete 事件运行的 httpservice 请求并不总是从服务器获取数据。但从用户操作调用的 HTTPservice 请求始终有效。

你能展示你的creationComplete的代码吗?您的函数是否在创建完成后被调用您是否跟踪您的函数是否被调用?

于 2010-05-10T15:52:43.117 回答