views:

100

answers:

2

Hello all. I have a serious problem in my flex client applications. I have an apache server with php web services. the flex client makes an httpservice requests. I noticed that the httpservice requests that runs from the creationComplete event of the application does not always get data from the server. but HTTPservice requests called from user actions always work.

I also noticed that when I run the flex client application directly from the Flex Builder 3 without upload it to the server, the problem occours less frequently.

in the Application:

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(); }

A: 

I have an apache server with php web services. the flex client makes an httpservice requests.

  1. Why did you mention WebServices here. I did not construe your first sentence.

  2. What happens in your faultEvent when you don't get anything?.

I noticed that the httpservice requests that runs from the creationComplete event of the application does not always get data from the server. but HTTPservice requests called from user actions always work.

Can you show the code of your creationComplete? Does your function get Called after creationComplete Did you trace your function whether its called or not?

Vinothbabu
Hi, I've add the Application mxml tag with the creationComplete = "Init()";The HTTPRequests sometimes works and sometimes not so I'm pretty sure that the Init function called the HTTPService.I don't have any fault events, just empty result event.But, When I called the httpservice from user action, like click on a button or something, the results are always coming.
Elad
A: 

OK, I found the same problem but without any solution in this forum:

http://forums.adobe.com/message/2361455

Anyone know?

Elad