开发者

How can I get the actual service output from an HTTPService fault?

开发者 https://www.devze.com 2023-01-17 12:30 出处:网络
Flex HTTPService faults end up wrapped in a fault object that seems to obscure the actual r开发者_如何学Pythoneturned text. Right now, I return a custom 400/409 error response to service clients that

Flex HTTPService faults end up wrapped in a fault object that seems to obscure the actual r开发者_如何学Pythoneturned text. Right now, I return a custom 400/409 error response to service clients that contains useful information about the cause of the error, which I'd like to have displayed to that client.

How can I, given a fault event, get the actual text of the HTTP error response?


You can't unless you use a server proxy like BlazeDS that transforms non-200 responses into 200 responses. Or if you control the server-side then force the error responses to be HTTP 200. This problem is due to a limitation in the browser (NPAPI) that prevents non-200 responses from being passed to plugins.

0

精彩评论

暂无评论...
验证码 换一张
取 消