<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Flex - Getting the HTTP error code raised from SAP in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316017#M1393565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a known issue with flex HTTPService.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what you could do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set the status to 200 for BSP response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and pass the error message in xml format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the flex side, in your result handler, check the xml to see whether its error xml or your normal result xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if its error xml, you can provide an alert and then stop processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ref: &lt;A href="http://onrails.org/articles/2008/02/20/dealing-with-http-errors-in-a-flex-with-rails-application" target="test_blank"&gt;http://onrails.org/articles/2008/02/20/dealing-with-http-errors-in-a-flex-with-rails-application&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Oct 2009 05:39:39 GMT</pubDate>
    <dc:creator>athavanraja</dc:creator>
    <dc:date>2009-10-26T05:39:39Z</dc:date>
    <item>
      <title>Flex - Getting the HTTP error code raised from SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316016#M1393564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;is there a way to catch the error code returned by a BSP page?&lt;/P&gt;&lt;P&gt;For example, I have a Flex HTTPService that points to a BSP page somedata.xml, which is populated after retrieving data in onInitialization handler.&lt;/P&gt;&lt;P&gt;In this handler, if something goes wrong, I set up the response error code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;try.
 "Data Handler Class
catch zcx_some_exc into lx_some_exc.
  error_string = lx_some_exc-&amp;gt;get_text( ).
  response-&amp;gt;set_status( code = 500 reason = error_string ).
endtry.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my faultHandler function in Flex, I need to display error_string in an Alert box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;private function HTTPFaultEventHandler(event:FaultEvent):void{
  Alert.show(event.fault.faultString);
}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in this way, it always display "HTTP Request error".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can help me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Oct 2009 08:54:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316016#M1393564</guid>
      <dc:creator>former_member199581</dc:creator>
      <dc:date>2009-10-23T08:54:32Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Getting the HTTP error code raised from SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316017#M1393565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a known issue with flex HTTPService.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what you could do is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set the status to 200 for BSP response&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and pass the error message in xml format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;on the flex side, in your result handler, check the xml to see whether its error xml or your normal result xml.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if its error xml, you can provide an alert and then stop processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ref: &lt;A href="http://onrails.org/articles/2008/02/20/dealing-with-http-errors-in-a-flex-with-rails-application" target="test_blank"&gt;http://onrails.org/articles/2008/02/20/dealing-with-http-errors-in-a-flex-with-rails-application&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 05:39:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316017#M1393565</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2009-10-26T05:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Getting the HTTP error code raised from SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316018#M1393566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Durairaj,&lt;/P&gt;&lt;P&gt;thanks for the hint.&lt;/P&gt;&lt;P&gt;This is how I'm doing already, I'd not have the time to investigate why it did not work and I have used this workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I've understood well, currently there's no other way to catch http error codes.&lt;/P&gt;&lt;P&gt;I've read about this project: &lt;A href="http://code.google.com/p/as3httpclientlib/" target="test_blank"&gt;http://code.google.com/p/as3httpclientlib/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Did you ever tried it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;&lt;P&gt;R.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2009 16:29:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316018#M1393566</guid>
      <dc:creator>former_member199581</dc:creator>
      <dc:date>2009-10-26T16:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Flex - Getting the HTTP error code raised from SAP</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316019#M1393567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;So, if I've understood well, currently there's no other way to catch http error codes.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With HTTPService - yes.  but you could use URLLoader class if handling HTTP status code is important&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have seen &lt;A href="http://code.google.com/p/as3httpclientlib/" target="test_blank"&gt;http://code.google.com/p/as3httpclientlib/&lt;/A&gt; but yet to try it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Raja&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2009 04:43:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/flex-getting-the-http-error-code-raised-from-sap/m-p/6316019#M1393567</guid>
      <dc:creator>athavanraja</dc:creator>
      <dc:date>2009-10-27T04:43:19Z</dc:date>
    </item>
  </channel>
</rss>

