2 Replies Latest reply on May 28, 2009 6:31 PM by run,ryan!

    How to get HTML boday in faultEvent when server return 503 error

    run,ryan! Level 3

      OK, let me ask this. When error on HttpService, we want to display some friendly message for user, the error message can be defined in flex, but I want it comes from server when error occurs. so I defined a 503 error on php side like this

              $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');

      please ignore the php syntax, its just returing a normal http 503 response, which has a 503 header and a 'invalid version' html bod, y

      now I want to popup a alert window saying "invalid version", I tried to use faultEvent.fault.faultString, faultEvent.fault.faultDetail, its not in neither of them...


      or faultevent just do not get html body from server?

      thanks in advance!!!