26 Replies Latest reply on Dec 12, 2012 1:57 AM by manishchourasia2000@yahoo

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

    migueldmag Level 1

      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

        • 2. Re: Why? SOAP Response cannot be decoded. Raw response: null
          miguel8312 Level 3

          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

          • 3. Re: Why? SOAP Response cannot be decoded. Raw response: null
            migueldmag Level 1

            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

            • 4. Re: Why? SOAP Response cannot be decoded. Raw response: null
              miguel8312 Level 3

              ok by the sound of what your describing it sounds like you are running into browser compatabilitys iss

              ues. here is where i would suggest you start. When you are debuging put a brake point on the

              fault function that gets kicked off when the decoded error is happening. Once you do that look at the result event in the variables tell me what you see. I could almost guarantee that you would be getting a 500 error from browser.

              Also another thing you should check is that you have the xml file on the root of your service that allows to go across domains? do you have that already in place?

              respond back with your findings. I've been threw many of these issues. however i will confess im not a wizard guy i usually code it all out manually.

              Miguel

              • 5. Re: Why? SOAP Response cannot be decoded. Raw response: null
                migueldmag Level 1

                Hi

                 

                Debuging with Internet Explorer I have that:

                faultCode:Server faultString:'System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.OleDb.OleDbException: A tabela não existe.

                ORA-00942: tabela ou vista não existe

                --- End of inner exception stack trace ---' faultDetail:''

                 

                With firefox I have that:

                 

                faultCode:DecodingError faultString:'SOAP Response cannot be decoded. Raw response: ' faultDetail:'null'

                 

                But analisying with Network Monitor I see my exception on the response:

                HTTP/1.1 100 Continue

                Server: Microsoft-IIS/5.1

                Date: Mon, 27 Dec 2010 17:00:34 GMT

                X-Powered-By: ASP.NET

                 

                 

                HTTP/1.1 500 Internal Server ErrorServer: Microsoft-IIS/5.1Date: Mon, 27 Dec 2010 17:00:34 GMTX-Powered-By: ASP.NETX-AspNet-Version: 2.0.50727Cache-Control: privateContent-Type: text/xml; charset=utf-8Content-Length: 895<?xml version="1.0" encoding="utf-8"?>

                <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode>

                <faultstring>System.Web.Services.Protocols.SoapException: Server was unable to process request. ---&gt; System.Data.OleDb.OleDbException: A tabela não existe.ORA-00942: tabela ou vista não existe      --- End of inner exception stack trace ---</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>

                 

                Best Regards,

                Miguel

                • 6. Re: Why? SOAP Response cannot be decoded. Raw response: null
                  BhaskerChari Level 4

                  Hi migueldmag,

                   

                  Can you post the url of your WebService which you are using..(wsdl url)..??

                   

                  Thanks,

                  Bhasker

                  • 7. Re: Why? SOAP Response cannot be decoded. Raw response: null
                    miguel8312 Level 3

                    miguel

                    this is what i was looking for

                    ORA-00942:

                    This error suggest that the table or view does not exist in oracle, been there many times. now we can work backwards. your webservice seems to be unstable. so now you have two options. You can try to debug your webservice and figuere out what's wrong there, or you can post the url here so that we can try to help you debug. I can tell you from my experience with the .net webservice im pretty sure your trying to contact an oracle database and the function has a problem in the code.

                    are you using odp.net? are you using oledb? are you using microsoft oracle data provider?

                     

                    Let us know which steps you want to take more then happy to help  you with this one.

                    Miguel

                    • 8. Re: Why? SOAP Response cannot be decoded. Raw response: null
                      migueldmag Level 1

                      Hi,

                      My webservice isn't publish on public server.

                       

                      Thanks

                      • 9. Re: Why? SOAP Response cannot be decoded. Raw response: null
                        migueldmag Level 1

                        Hi,

                        I know the error... I'm purposely forcing this error my problem is doesn't receive conveniently the exception when I run the application at Chrome or Firefox (Raw response:null) and if i run with Internet Explorer or with Flash Player (no browser) thats works fine ... The app receive (decoded) webservice exception.

                         

                        I'm using OleDb with MSDAORA provider.

                         

                        Best regards,

                        Miguel

                        • 10. Re: Why? SOAP Response cannot be decoded. Raw response: null
                          miguel8312 Level 3

                          ok well then may i suggest something else then. Perhaps what you can do is put an excepetion handler on your

                          .net webservice. once it hit exception then it will return the exception withing  a give XML tag in  other words your fault will never get triggered in flex.  Perhaps and im very sqeptical saying this you have hit some compatability issues with the flash player and the browser you have problems with. However i think that if you get the catch the exception in the .net side and return it as part of an xml then you should be ok.

                          miguel

                           

                          Message was edited by: miguel8312

                          • 11. Re: Why? SOAP Response cannot be decoded. Raw response: null
                            migueldmag Level 1

                            What kind of problems I can have with the compatability issues with the flash player and the browser?

                             

                            Miguel

                            • 12. Re: Why? SOAP Response cannot be decoded. Raw response: null
                              miguel8312 Level 3

                              miguel

                              Im taking a guess at best. Without seeing code or being able to call service myself there is not much we can do to help. I do think that if instead of letting your .net webservice failed and instead you  catch the exception and pass it as xml you would problably not going to recieved errors from other browsers.

                              Miguel

                              • 13. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                BhaskerChari Level 4

                                Hi migueldmag,

                                 

                                Can you host your WebService on public server and share the link..?? I am sure the problem is with the WebService only which you are using..

                                 

                                Thanks,

                                Bhasker

                                • 14. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                  migueldmag Level 1

                                  I doesn't have where publish online the service... but I put here the code that use to test that

                                   

                                  Webservice:

                                  using System;

                                  using System.Collections.Generic;

                                  using System.Linq;

                                  using System.Web;

                                  using System.Web.Services;

                                   

                                  namespace webServiceTestes

                                  {

                                      /// <summary>

                                      /// Summary description for Service1

                                      /// </summary>

                                      [WebService(Namespace = "http://tempuri.org/")]

                                      [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

                                      [System.ComponentModel.ToolboxItem(false)]

                                      // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.

                                      // [System.Web.Script.Services.ScriptService]

                                      public class Service1 : System.Web.Services.WebService

                                      {

                                   

                                          [WebMethod]

                                          public string HelloWorld(String teste)

                                          {

                                   

                                              if (teste=="teste")

                                                  throw new Exception("Apanha-me se poderes");

                                   

                                              return "Hello World";

                                          }

                                      }

                                  }

                                  The test application:
                                  <?xml version="1.0" encoding="utf-8"?>
                                  <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                    xmlns:s="library://ns.adobe.com/flex/spark"
                                                    xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" xmlns:service1="services.service1.*">
                                       <fx:Script>
                                            <![CDATA[
                                                 import mx.controls.Alert;
                                                 import mx.rpc.events.FaultEvent;
                                                 import mx.rpc.events.ResultEvent;
                                                 protected function button1_clickHandler(event:MouseEvent):void
                                                 {
                                                      HelloWorldResult.token = service1.HelloWorld("teste");
                                                 }
                                                 
                                            
                                                 
                                                 protected function service1_resultHandler(event:ResultEvent):void
                                                 {
                                                      Alert.show("Result: " + (event.result as String));
                                                 }
                                                 protected function service1_faultHandler(event:FaultEvent):void
                                                 {
                                                      Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail);
                                                 }
                                            ]]>
                                       </fx:Script>
                                       <fx:Declarations>
                                       
                                             <s:CallResponder id="HelloWorldResult"/>
                                             <service1:Service1 result="service1_resultHandler(event)" id="service1" fault="service1_faultHandler(event)" showBusyCursor="true"/>
                                            <!-- Place non-visual elements (e.g., services, value objects) here -->
                                       </fx:Declarations>
                                       <s:layout>
                                            <s:VerticalLayout />
                                       </s:layout>
                                       <s:Button click="button1_clickHandler(event)"/>
                                       
                                  </s:Application>
                                  Result at 3 browsers (Firefox, Chrome and IE): http://img402.imageshack.us/i/exception.png/
                                  best Regards,
                                  Miguel

                                  • 16. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                    Nate Burr Level 1

                                    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

                                    • 17. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                      migueldmag Level 1

                                      To me happens with sdk 4.1.

                                       

                                      Best regards,

                                      Miguel

                                      • 18. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                        Nate Burr Level 1

                                        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

                                        • 19. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                          Nate Burr Level 1

                                          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

                                          • 20. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                            migueldmag Level 1

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

                                             

                                            Best regards,

                                            Miguel

                                            • 21. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                              Nate Burr Level 1

                                              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

                                               

                                               

                                               

                                              • 22. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                                Nate Burr Level 1

                                                == 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;
                                                     }

                                                }

                                                • 24. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                                  seanscottusa Level 1

                                                  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.

                                                  • 25. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                                    Chit_1 Level 1

                                                    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

                                                    • 26. Re: Why? SOAP Response cannot be decoded. Raw response: null
                                                      manishchourasia2000@yahoo Level 1

                                                      Hi,

                                                       

                                                      I am new for flex development. I have just started development in flex 4.6.

                                                       

                                                      I am also facing the same problem. Even after ading the C# code, Issue is still persist.

                                                       

                                                      protected void Application_EndRequest(object sender, EventArgs e)

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

                                                      }

                                                       

                                                      So I decided to do testing in different maner. I create new method called TEST(string xmlValue) having return type String. In this method I simply return xmlValue as String.

                                                       

                                                      [WebMethod(EnableSession = true)]

                                                          public string TEST(string xmlString)

                                                          {

                                                              XmlDocument xdoc = new XmlDocument();

                                                              xdoc.loadXml(xmlString);

                                                             return xdoc.OuterXML;

                                                          }

                                                       

                                                      I replace the method name in flex application and test. I still got the error. I guess there is some flex issue in this.

                                                       

                                                      But I don't understand before calling this method there are 3-4 web service call which works absolutly fine and when it comes to the 5th call it returns me fault.

                                                       

                                                      FIENDS PLEASE HELP ME. I NEED TO DELIVER IT AS SOON AS POSSIBLE. I AM ALREADY CROSS DEAD LINE.

                                                      PLEASE HELP ME.