1 Reply Latest reply on Aug 3, 2010 11:56 AM by rickcr

    Where to stuff java server-side error message in Response for flex FaultEvent to have access to it?


      We have a simple Java midtier that returns xml via Flex HttpService calls (not relying on BlazeDS.)


      In the midtier any internal exceptions thrown are captured by an exception handler and I can do whatever I want before sending back the Response.


      When certain errors occur on the server-side I wrap my custom error message and the exception in some xml tags.


      What I was hoping I could do, is have all my flex service classes extend from a BaseService which has a generic faultHandler(fault:FaultEvent) implementation that can then popup the error message returned somewhere in the HttpResponse.


      The issue I have is where should I stuff my custom server side error message? Once I set the response to 500 on the server side, it doesn't look like I have access to any returned body in the response sent back, so where should my returned error message be stuffed? I suppose I could stuff it into a custom response header? Is a custom header an ok approach for what I'm trying to achieve?