4 Replies Latest reply on Jun 28, 2007 5:40 PM by ntsiii

    Local HTTPService?

      We've built a little xml reader that uses an HTTPService to read in an XML file and format it using e4x. The formatted data is then displayed in a tree component and allows the reader to drill down into the data. We'd like to build a demo for CD-ROM that showcases the app, but HTTPServices doesn't seem to work from a CD-ROM. Is there another type of service we should be using? Any suggestions?

        • 1. Re: Local HTTPService?
          phi2265 Level 1
          I've run things like this from a flash drive, it should be similar. Is the xml file in the main directory? Or are you trying to download it from a server?

          • 2. Re: Local HTTPService?
            Thanks for your reply.

            It's a local xml file sitting in an assets folder. Here's the code (typing from memory):

            <mx:HTTPService id="e4xService"

            The weirdest thing is that it works just fine when we launch it in FlexBuilder 2, and when we launch the file from the explorer inside the bin folder. When we copy all the files (not changing their location of course) to another place on the hard drive none of the xml data gets displayed. The paths in the xml file are all relative as well.

            Any clues as to what's going on?


            • 3. Re: Local HTTPService?
              phi2265 Level 1
              Hmm.. I see what you're saying. I just tried it and the same thing happens to me. I guess the project I was thinking I ran from a flash drive didn't have any HTTPServices in it yet (does now). Thats really strange.. I'm not sure what the problem is.. sounds like some kind of a bug or security feature to me..
              • 4. Re: Local HTTPService?
                ntsiii Level 3
                You are getting tangled up in the security sandboxes.

                Flex Builder installs itself into a "trusted" sandbox, which allows it to access pretty much everything.

                Except for this kind of install, you must choose beteen local access and network access, you can't have both. There are several good docs on "Flex security sandbox".

                I fear you will not be successful with what you are attempting. Can you use AIR (google that)?