2 Replies Latest reply on Jul 28, 2008 1:56 PM by D-D-Diderot

    BASIC Data Retrieval, not working

      I have been going out of my mind in this one. I'm having trouble with using httpservice:

      I may have mutilated the code by tweaking and more tweaking, trying to get it to return anything. I usually end up with "result" as the string.

      I have another part of the app the is using remote object and it is returning the data, so I am assuming that the server is configured correctly...I originally was using cfreturn, then cfxml, then I just pasted some generic xml into the page and tried to retrieve it. The cold fusion page, with the xml, kicks off a debug email so I know that it is accessing the page I just can't get any data.

      Any suggestions would be greatly appreciated!

        • 1. Re: BASIC Data Retrieval, not working
          ntsiii Level 3
          First, this is wrong:
          "ResultEvent.RESULT" is a constant, not the property containing the data. You want:

          Next, set HTTPService.resultFormat='e4x". You do not want the default resultFormat="object", unless you are sure you do and know why.

          public var _xmlSearchResult:XML;

          Then in the handler do:
          public function httpResult(event:ResultEvent):void {
          _xmlSearchResult = XML(event);
          Alert.show(_xmlSearchResult.toXMLString()); //you should enable tracing for debugging. Alert can cause focus problems.

          • 2. Re: BASIC Data Retrieval, not working
            D-D-Diderot Level 1
            Thank you Tracy, I really do appreciate it. If you ever get stuck on some basic issue that any beginner should know, let me know.