This content has been marked as final. Show 7 replies
In your HTTPService declaration, are you setting a method="post" ?
Also on the PHP side, how are you returning XML? Are you forcing the XML back into a header or just printing to the screen?
Thank you for replying.
Yes, I specify the "post" method in the HTTPService.
Are you forcing the XML back into a header or just printing to the screen?
Shawn, what do you mean by forcing? Probably not, because I am just using the echo operator.
Here is the excerpt from PHP code which does it:
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo ' <myxml>some</myxml>';
I've added to the PHP code buffer flushing command:
Still getting timeouts/HTTP errors.
Have you tried to access XML from browser?
Colud you alsow submit a part of Flex code u use to get XML file?
Yes, I cam access XML from a browser. The problem is that it fails 1-2 times out of ~100 requests.
The code is something like this:
//wrapper for HTTPService
public class CMyHTTPService extends HTTPService
public function CMyHTTPService()
super.method = "POST";
super.requestTimeout = CGlobalParameters.g_iHTTPTimeout; // =0
super.contentType = "application/x-www-form-urlencoded";
//save appointment. Code is activated by pressing a button
m_httpSaveAppointment = new MyHTTPService()
private function fSaveAppointmentConfirmed(event:ResultEvent):void
//appointment has been saved
var l_iResult:int = m_httpSaveAppointment.lastResult.appointment.id;
m_httpSaveAppointment = null;
PS My last step was disabling output_buffering in PHP.
Don't know about the result yet, as it works in production environment only for 3 hours.
The connections happens over SSL. Client is using IE 7 browser. Also tried FF2.- same result.
I never had this problem in my test environment, but I am not working with the system for hours without interruption and test system is in the local network, no SSL, Apache/PHP versions are the same.
Disabling the buffering didn't help neither.
Any other thoughts?
Here are the latest results from my HTTPService problem saga.
I isolated the problem to the Apache2.x/mod_ssl2.x and HTTPService configuration.
HTTPService works very stable with Apache 1.3/mod_ssl but with Apache2 SSL connection is vulnerable to network errors.
With full logging turned on everywhere(wireshark/apache/PIX firewall) I could see that sometimes due to the network errors connection gets into the state when both sides are doing nothing, waiting for each other and then one of the sides disconnects on time out.
Same network errors are not a problem for the browser itself or during the session with Apache1 - connection recovery happens very quickly and I have not got any timeout so far.