Re: [Flashcoders] Re: getting XML response body when HTTP status is not 200
I see 3 possible solutions for your problem: 1. change the webservice to return status 200 on errors, too, and use something else for indicating errors instead of the HTTP status code 2. if the above one is not possible, then create a proxy which forwards your requests to the webservice and sends back its response with a modified status code 3. a socket server, which does almost the same as the proxy, but I think it is far less efficient as the previous ones in this case (it needs not only a server-side addition, but also some changes in the client-side script) Attila ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Re: getting XML response body when HTTP status is not 200
VK> Another thought: AS3 seems to have a generic Socket class. Is there VK> anything like this in AS2? Not as generic as in AS3, but there is XMLSocket class in AS2, which handles not only XML formatted data, but any textual content terminated by a zero byte. Thus it is not suitable for directly handling HTTP requests/responses, and needs a special server taking care of this zero ending, but there are a lot of them out there. Attila ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
[Flashcoders] Re: getting XML response body when HTTP status is not 200
Another thought: AS3 seems to have a generic Socket class. Is there anything like this in AS2? Thanks, Vishal On 4/28/07, Vishal Kapur <[EMAIL PROTECTED]> wrote: I am loading an XML response from a web service using XML.load(). The web service is defined such that when a request is made with parameters that are not in the bounds of the application, it will return an XML response with an error code/message. This response will have an HTTP header status of 400 (Bad Request). When I use XML.load(), however, I find that the XML in the body of the error response does not get loaded into the XML object. It looks like whenever the HTTP response comes back with a status that indicates an error, the body of the response is thrown away. I would like to be able to get the body of the response in all cases. Does anyone know of a way around this? Or is there another class that is more appropriate for what I am trying to do? Thanks, Vishal ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com