4 Replies Latest reply on Sep 6, 2007 10:47 PM by Santanu Karar

    XML data calling

    Santanu Karar Level 1
      Hi,

      I'm calling a PHP page which returns me a XML at the very begining of my app. After that, i'm adding an record through another PHP page and saving it to our DB, then when I'm calling the xml returning PHP page again from a browser , I'm getting the perfect updated XML . But when I'm calling the <HTTPService> object by send() method again after adding the record from my app, it returns the same old xml tht i've loaded at the beginning of my app. start ! But if I refresh the whole browser, then it showing the perfect result with updated xml !

      Please help..! is this any cache problem or anythihg..! and how to overcome this!!


      tnks,

      ASB
        • 1. XML data calling
          JoshBeall Level 1
          Have you done a packet capture to ensure that the Flex app is, indeed, re-requesting the XML from the PHP page? This will also allow you to inspect the data that comes back.

          Perhaps you're attempting to call the HTTPService, but not waiting for the "result" event to fire before updating the UI?

          -Josh

          p.s. On Windows, Wireshark is a great packet capture option.
          • 2. Re: XML data calling
            Santanu Karar Level 1
            Hi Josh, I've learned that this problem is only occurs in IE for IE cache policy, where in other browsers its working fine there. I've done an ol' trick which i used to calling xml PHPs in my ol'days flash files. I've attached an query string with a random numbers with my requested php file. And its' works! again! :)

            cool trick nah?

            ASB
            • 3. Re: XML data calling
              JoshBeall Level 1
              I've seen (and used) that trick in the past myself. Glad you got it working.

              You may be able to get the behavior your want without the random querystring parameter by experimenting with the HTTP headers you set on the server when the file is requested by the client. I believe there's a way to set a "no-cache" instruction.
              • 4. XML data calling
                Santanu Karar Level 1
                hmm...! sound interesting! i'll check that though! tnks josh! Though my PHP guy told me, that it works.. but it is not very depending though! .. is it so..?