qileilove

          blog已經轉移至github,大家請訪問 http://qaseven.github.io/

          Asp.net與Flex交互測試記錄

            一、利用asp.net為Flex提供數據服務,flex為前端表現。
            二、flex通過三種方式四種代碼實現來取數據。分別為
            HttpService、
            WebService、
            RemoteObject、
            RemoteObjectAMF0。
            三、Project文件夾中的
            Vs2010Service提供HttpService、Webservice服務;
            Vs2008RemoteObject提供RemoteObject服務。
            四、FluorineFx.NET+RemoteObjectAMF0文件為附加文件。
            五、<sessionState cookieless="AutoDetect"></sessionState>
            設置可兼容客戶端禁用Cookie(要在Flex項目中傳遞回sessionid)
            六、asmx中使用session需要[WebMethod(EnableSession = true)] 如此設置。
            七、安裝FluorineFx.NET+RemoteObjectAMF0文件下的setup(FluorineFx.NET).exe
            可以將項目模板集成到2005和2008中,不支持vs2010。
            八、使用七中的模板建立普通網站(FluorineFx ASP.NET Web Site)項目。
            將Console.aspx設為啟動頁,可進行類中的方法測試
            九、使用RemoteObjectAMF0時將renaun_com_RemoteObjectAMF0.zip解壓把src下的
            com文件夾整體復制到flex項目中;
            注意路徑與mxml同路徑;
            RemoteObjectAMF0.as中的override public function setCredentials( username:String, password:String):void)修改成override public function setCredentials( username:String, password:String,charset:String=null ):void)
            添加xmlns:renaun="com.renaun.rpc.*"到<mx:Application ……中。
            十、使用普通RemoteObject在mxml的同目錄下添加services_config.xml文件內容如下:
          <?xml version="1.0" encoding="UTF-8"?>
          <services-config>
          <services>
          <service id="remoting-service"
          class="flex.messaging.services.RemotingService"
          messageTypes="flex.messaging.messages.RemotingMessage">
          <destination id="fluorine">
          <channels>
          <channel ref="my-amf"/>
          </channels>
          <properties>
          <source>*</source>
          </properties>
          </destination>
          </service>
          </services>
          <channels>
          <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
          <endpoint uri="http://localhost:12432/ReomteFlex/Gateway.aspx" class="flex.messaging.endpoints.AMFEndpoint"/>
          </channel-definition>
          </channels>
          </services-config>
            注:http://localhost:12432/ReomteFlex/Gateway.aspx隨項目啟動的端口變化。
            之后,Flex項目右鍵-屬性-Flex compiler-compiler參數(-locale en_US -services "services_config.xml")

          posted on 2014-07-16 09:40 順其自然EVO 閱讀(202) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2014年7月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 剑阁县| 牙克石市| 梁河县| 寿宁县| 长岭县| 庆城县| 花垣县| 广水市| 平乡县| 茌平县| 鲁甸县| 昂仁县| 新竹县| 邮箱| 栾川县| 湘阴县| 延津县| 奉贤区| 南汇区| 额敏县| 镇远县| 通山县| 澜沧| 特克斯县| 恩平市| 常熟市| 泸定县| 龙岩市| 黄山市| 冕宁县| 东乌珠穆沁旗| 曲周县| 浠水县| 武安市| 兰溪市| 吴堡县| 托里县| 玉田县| 锡林郭勒盟| 广饶县| 潮州市|