3 Replies Latest reply on Jan 23, 2008 8:25 AM by Mush15

    sending XML with URLLoader

      I am at a loss.

      I am trying to send XML using a URLLoader

      when the request is sent via navigateToUrl i get the Post data

      but when using a Loader nothing.

      Any help is appreciated.
        • 1. Re: sending XML with URLLoader
          ntsiii Level 3
          I advise using HTTPService, it is simpler to code.

          Are you using the default contentType and sending your xml as a string value in a name=value pair, or have you changed that and attempting to send an xml object?

          I send xml strings (escaped if they are complex) and have heard many people have difficult sending xml directly, though it is supposedly possible.

          You might show us a bit of code.

          Tracy
          • 2. Re: sending XML with URLLoader
            Level 1
            Thanks for the replt ntsiii,

            Heres the urlloader code

            public function urltest(){
            var request:URLRequest = new URLRequest(" http://localhost/mroi/testurl.php");

            var variables:* = <test>test</test>;


            request.method = URLRequestMethod.POST;
            request.contentType = "text/xml";
            request.data = <test>test</test>;
            var loader:URLLoader = new URLLoader();
            //loader.dataFormat = URLLoaderDataFormat.VARIABLES;

            //navigateToURL(request);
            loader.load(request);


            As I mentioned in my earlier post I receive the data when using the navigateToURL method but recieve nothing when using the URLLoader

            Any help is appreciated. I am at wits end
            • 3. Re: sending XML with URLLoader
              Level 1
              NTSIII

              I solved my problem.

              We were using Firebug to view traffic to and from flex PHP

              according to FB the Post data was empty

              But in reality the data was sent

              URLLoader works

              Thanks for all your help.