3 Replies Latest reply on Oct 24, 2007 2:10 PM by neil667

    Problems with HTTPService and Actionscript

      I am trying to move the tag based service call into AS3. When I call this method, no http request happens. What am I doing wrong?

      public static function getColors() : void {

      var colorHTTPService:HTTPService = new HTTPService();
      var requestModel:Object = new Object();

      colorHTTPService.url = URLUtil.getSiteUrl() + "/template.PAGE/action.process" + URLUtil.getPageUrl() + "/?javax.portlet.action=true&javax.portlet.tpst=" + URLUtil.getColorPortletId();
      colorHTTPService.method = "POST";

      // add result/fault handelers
      colorHTTPService.addEventListener(ResultEvent.RESULT, onGetColorsResult);
      colorHTTPService.addEventListener(FaultEvent.FAULT, onGetColorsFault);

      requestModel.action = "getColors";