0 Replies Latest reply on May 21, 2006 8:10 PM by eddymilner

    Flash 8 Web services & QUERY

    eddymilner
      Hey to evry one !

      so let start from my simple CFC script .....


      <cfcomponent name="directory" access="public">
      <cffunction name="newsUpdate" access="remote" returntype="query">
      <CFQUERY NAME="news" DATASOURCE="gwl">
      select online
      from News
      </CFQUERY>
      <cfreturn news>
      </cffunction>
      </cfcomponent>

      so i am tring to get QUERY news from CFC component to flash ...




      there is a flash script ....

      import mx.data.components.WebServiceConnector;
      var names:Array = new Array();
      var startTime:Number;
      var wscListener bject = new Object();
      var newName bject = new Object();
      //
      //
      //
      //
      wscListener.result = function(evt bject) {
      var resultTimeMS:Number = getTimer()-startTime;
      trace(evt.target.results);

      };
      //
      //
      //
      //
      wscListener.send = function(evt bject) {
      startTime = getTimer();
      };
      //
      //
      //
      //
      var wsConn:WebServiceConnector = new WebServiceConnector();
      wsConn.addEventListener("result", wscListener);
      wsConn.addEventListener("send", wscListener);
      wsConn.WSDLURL = " http://localhost:8500/Labaratory/WSC/RESULT.cfc?wsdl";
      wsConn.operation = "newsUpdate";
      wsConn.params = [test.text];
      wsConn.suppressInvalidCalls = true;
      wsConn.multipleSimultaneousAllowed = false;
      wsConn.trigger();


      So when i get my result from flash i see next message "[object Object]" .. why ?
      i need get data from query but i dont know how ......

      wscListener.result = function(evt bject) {
      var resultTimeMS:Number = getTimer()-startTime;
      trace(evt.target.results)<--- here is the problem // output =[object Object]

      };

      pleas help , i tried to find on internet about this problem , but no result ..... thanks alot