6 Replies Latest reply on May 27, 2009 11:37 AM by run,ryan!

    How can I get error message from server in faultEvent listener

    run,ryan! Level 3

      I have a httpService sending post request to php server.


      on php side, its returning a 503 error

              $response->setHeader('HTTP/1.1','503 Service Unavailable');
              $response->setHeader('Status','503 Service Unavailable');
              $response->setHeader('Content-Length', strlen('Invalid Version'));
              $response->setHeader('Content-Type', 'text/html');
              $response->setBody('Invalid Version');

      and in my faultHandler, I want to display the string 'invalid version' for user, but when I alert faultEvent.fault.faultString, I only get 'Http request error' which I think is generated by flex


              private function onFault_search(e:FaultEvent):void
                  Alert.show(e.fault.faultString, "Error");


      so how can I get the server side error message from http response?