Shiv,

Thanks for the suggestion. Unfortunately the remote service is an
Amazon Web Service so I don't have any control over what is being sent.

I could create a proxy to intercept a HTTP error, reformat it, and
then pass it along to the Flex app but I was hoping to avoid a proxy
altogether.

I wish that Adobe had documented this so I didn't have to spend the
time just to find out it's not possible to get the body data. Of
course what I wish for the most is that it worked :-)

Paul



--- In flexcoders@yahoogroups.com, "Shiv Kumar" <[EMAIL PROTECTED]> wrote:
>
> Paul,
> 
>  
> 
> Your findings are correct and the situation is very frustrating indeed.
> 
>  
> 
> The only way I've circumvented this is to tailor the response in the
case of
> exceptions based on user agent. Then on the Flex side to look at this
> special case and throw an exception with the data in the response.
> 
>  
> 
> So in the case where the user agent is flash player (don't remember the
> actual user agent), trap the exception and send back a status code
of 200
> (instead of 500) and in the response, have a way to indicate that
there was
> an error, so the flex side can act accordingly.
> 
>  
> 
> Shiv.
> 
>  
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul Whitelock
> Sent: Sunday, March 30, 2008 2:30 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: HTTPService Error - Response Body Text?
> 
>  
> 
> I've now tried using HTTPService, WebService, and the low-level
> URLStream and in every case it does not appear possible to access data
> in the response body when the web server returns an error. All you get
> is a 2032 Stream Error (which is vague and misleading).
> 
> Has anyone ever been able to get around this problem? If so I'll keep
> trying, but for now it looks like it's an exercise in futility.
> 
> Why is this not documented in the Flex Language Reference??? 
> 
> Paul
> 
> --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> ,
> "Shiv Kumar" <shiv@> wrote:
> >
> > I've been told that it's a Flash player issue, in that since the
player
> > relies on the browser's socket there seem to be some limitation there.
> > 
> > 
> > 
> > This one issue really prevents us from using Flex/AIR as an RIA
> solution,
> > since we have infrastructure in place on the server side and there are
> > already clients (Browser, C# and Delphi built) using this
> infrastructure and
> > they do just fine today. In order to use Flex/AIR we'll have to
> change the
> > way exceptions are treated on the server or special case Flex/AIR
> requests
> > etc. Just not worth it for us.
> > 
> > 
> > 
> > If the limitation is truly brought about by browsers, I'm sure Adobe
> could
> > work with the browser makers to eliminate this issue. Or just not
> use the
> > browser's socket and their own instead.
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> ]
> On
> > Behalf Of Paul Whitelock
> > Sent: Friday, March 28, 2008 5:51 PM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Re: HTTPService Error - Response Body Text?
> > 
> > 
> > 
> > Thanks for confirming the problem -- I guess I'll try using SOAP
> instead.
> > 
> > Does anyone know why this "well known" problem still exists in Flex 3?
> > Is it a Flash player issue or is it a Flex framework problem?
> > 
> > Paul
> > 
> > --- In flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com> ,
> > "Tracy Spratt" <tspratt@> wrote:
> > >
> > > This is a well known problem. Google / search for more
> knowledgable and
> > > detailed responses, but as I recall, if you do not control the
server,
> > > the only solution is to use a proxy.
> > > 
> > > 
> > > 
> > > Tracy
> > > 
> > > 
> > > 
> > > ________________________________
> > > 
> > > From: flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com
<mailto:flexcoders%40yahoogroups.com> 
> <mailto:flexcoders%40yahoogroups.com> ]
> > On
> > > Behalf Of Paul Whitelock
> > > Sent: Friday, March 28, 2008 9:28 AM
> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com> 
> > > Subject: [flexcoders] HTTPService Error - Response Body Text?
> > > 
> > > 
> > > 
> > > I'm using an Amazon Web Service (REST) and when an there is an error
> > > in a request AWS returns "HTTP/1.1 400 Bad Request" and the HTTP
> > > service throws an IOErrorEvent 2032.
> > > 
> > > The problem is that AWS also returns XML text in the response body
> > > (which I see if a sniffer) but I can't see the response text in the
> > > IOErrorEvent. I need to get the response text as it describes
what was
> > > wrong with the request.
> > > 
> > > Any idea how to retrieve the response body text from HTTPService
when
> > > a "HTTP/1.1 400 Bad Request" is returned by the server? Thanks!
> > >
> >
>


Reply via email to