1 Reply Latest reply on Dec 6, 2007 4:32 AM by Greg Dove

    sendAndLoad problems... Please help

    seabw
      requestXML = new XML (xmlContent);
      requestXML.ignoreWhite = true;
      trace(requestXML);

      responseXML = new XML();
      responseXML.ignoreWhite = true;
      responseXML.onLoad = f_init_response;
      requestXML.sendAndLoad (servlet_address, responseXML);

      function f_init_response(success:Boolean):Void
      {
      trace("\n*************** Receiving Init Response From Server ***************");

      if (success)
      {
      ...............
      }
      }

      Hi there:

      As you can see my codes above. The problem is sometime the variable success is true in f_init_response, but responseXML is empty. I have server communication software called "charles" which tells me I actually received a valid response XML. So why is responseXML empty?

      Cheers
        • 1. Re: sendAndLoad problems... Please help
          Greg Dove Level 4
          What do you mean when you say "responseXML is empty".

          success is only true when the xml was received and parsed correctly. It may still have nothing inside it.

          If the server sent back something like this:

          <response></response>

          then you have an valid xml response, but its just a root node. But the data was received correctly, so you would get a success==true result. But there's nothing inside it.

          put a trace check inside.
          if (success)
          {
          trace(responseXML )
          }

          now what do you see?