Skip to main content
Participating Frequently
December 23, 2010
Answered

Why? SOAP Response cannot be decoded. Raw response: null

  • December 23, 2010
  • 7 replies
  • 26934 views

I'm developing an Application in Flex 4 that contacts with webservices.

If I run my application with firefox or Chrome when it should catch one exception from the webservice, it doesn't show my exception message and show that error: SOAP Response cannot be decoded. Raw response: null

If I run my application with ie8 or with flash player (out of browser), it catch my exception and show my exception message... And this is OK.
Any ideas for my problem?
Best regards,
Miguel

    This topic has been closed for replies.
    Correct answer Nate_Burr-PRxgrm

    == SOLVED ==

    Flash relies on the browser network stack to get results. etc..

    Some browsers will stop and not send flash the body content if it receives a 500 Status code. The best way to fix the error would be to make the .net code not send a 500 status when you are sending a soapfault.

    protected void Application_EndRequest(object sender, EventArgs e)

    {
         if (Context.Response.StatusCode == 500 || Context.Response.StatusCode == 300)
          {
               Context.Response.StatusCode = 200;
         }

    }

    7 replies

    January 24, 2011

    Problem Solved.

    We were having this problem intermittently with a Flex 4.1 App running off of a ColdFusion 9 Server. It turned out that the Error 500 was misleading. By removing <cfdump> tags, the error disappeared. My recommendation: always remove the <cfdump> tags from the production code.

    June 27, 2011

    Hey,

    I am also using ColdFusion9 webservice with Flash Builder 4 and 4.5 sdk and getting the following error(which resemble a single one) in different conditions and these is no CFDump tag, in the webservice which I am using, can you please help:

    When I run the application/or say publish it in AIR, within Flash Builder 4 and try searching, I get this error after 2-3 searches:
    Error#1085: The element type "P" must be terminated by the matching end-tag "</P>".
    Null

    And If I simply run the AIR application, outside the Flash Builder, Then I get the following error:
    Error #1085
    Null


    And If I publish my application as normal SWF file into HTML and not AIR, then the error says:
    SOAP response cannot be decoded. Raw response:
    null

    Thanks

    Chit1

    Nate_Burr-PRxgrmCorrect answer
    Inspiring
    January 12, 2011

    == SOLVED ==

    Flash relies on the browser network stack to get results. etc..

    Some browsers will stop and not send flash the body content if it receives a 500 Status code. The best way to fix the error would be to make the .net code not send a 500 status when you are sending a soapfault.

    protected void Application_EndRequest(object sender, EventArgs e)

    {
         if (Context.Response.StatusCode == 500 || Context.Response.StatusCode == 300)
          {
               Context.Response.StatusCode = 200;
         }

    }

    Participating Frequently
    January 13, 2011

    It Works.

    Thanks,

    Miguel

    Inspiring
    January 12, 2011

    When i debug the exception. The very first item that is in the stack is DirectHTTPMessageResponder/errorHandler.

    One of the lines in the method is as fallows.

    msg.body = URLLoader(event.target).data;

    in the browsers that work the msg.body will contain the full soap envelope with the exception details.

    in browsers that don't work msg.body is an empty string.

    -nate

    Inspiring
    January 12, 2011

    I was able to reproduce the same error in OSX using chrome.

    Chrome - OSX 40.6.6

         FP - 10,1,103,19 -  Doesn't Work

         FP - 10,1,102,64 - Doesn't Work

    Participating Frequently
    January 12, 2011

    I will try see with one netmonitor the message that service send to the Application.

    Best regards,

    Miguel

    Inspiring
    January 10, 2011

    I'm not sure if this is a browser realted issue or plugin. i would expect to see the same results. since these browsers use the same plugin.

    it was compiled using flex 4.1 target player version 10.

    Doesn't work means it isn't able to decode the soapfault.

    Firefox (3.6.13) - Windows7

         FP 10,0,45,2 - Doesn't Work

         FP 10,1,102,64 - Doesn't Work

         FP 10,2,151,49 - Doesn't Work

    Safari (5.0.3) - Windows7

         FP 10,0,45,2 - Works

         FP 10,1,102,64 - Works

         FP 10,2,151,49 - Works

    Chrome (8.0.552.224) - Windows 7

         FP 10,1,103,20 - Doesn't Work

    IE - Windows 7

         Works (dont have more details)

    Safari - OSX 10.6.6

         Doesn't Work

    Chrome - OSX 10.6.6

         Doesn't Work

    Firefox - OSX 10.6.6

         Works

    Inspiring
    January 7, 2011

    I've just ran into this error today. On macos and IE i will receive a soapfault which i can display the faultstring from the server. but on windows in firefox or chrome i get and RPC fault instead which doesn't allow me to show a nice error message from the server.

    [RPC Fault faultString="SOAP Response cannot be decoded. Raw response: " faultCode="DecodingError" faultDetail="null"]

    I'm using a build of HERO (4.5.0.17855). version 4.5.0.18623 has a bunch of ther soap errors that i've ran into.

    I'll try switching back to 4.1 later to see if that fixes it later on.

    -Nate

    Participating Frequently
    January 10, 2011

    To me happens with sdk 4.1.

    Best regards,

    Miguel

    Participating Frequently
    December 27, 2010

    Nobody knows why?

    miguel8312
    Participating Frequently
    December 27, 2010

    can you post some of your code. what kind of service are you calling are you calling a .net webservice

    ? do you have a fault? set up on your service of a are you catching the error on your service and returning it as part of the xml?

    if you answer some of those questions ill be able to help you further.

    ty to put a breakpoint and study the result of the webserice you might be getting a 500 error from your service.

    respond back

    miguel

    Participating Frequently
    December 27, 2010

    Hi,


    Thank you for your reply.


    I'm calling a .net webservice and forcing to throw an exception.

    The webservice was configured on flashBuilder 4 using the wizard.

    I've the fault event with alert.show to show the error message.


    The strange thing is that I run the application on a my computer (windows xp pro sp3) with:

          Internet Explorer 8: the error message is my exception

         With Chrome and Firefox: the error message is SOAP Response cannot be decoded. Raw response: null

    I run the application on a 2nd computer (windows 7 pro) with:

         Internet Explorer 8: the error message is my exception

         Firefox: the error message is my exception

         Chrome: the error message is SOAP Response cannot be decoded. Raw response: null

    I run the application on a 3rd computer (windows xp pro sp3) with:

              Internet Explorer 8: the error message is my exception

              Firefox: the error message is SOAP Response cannot be decoded. Raw response: null

    This information is usefull?

    Best regards,

    Miguel

    p.s.: And running the app only with flahsplayer (without browser) the error message is my exception