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)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 尤溪县| 崇阳县| 井研县| 祥云县| 句容市| 类乌齐县| 九龙县| 班戈县| 多伦县| 绍兴县| 夏邑县| 叙永县| 深圳市| 南阳市| 吉首市| 衡南县| 清流县| 满洲里市| 呼玛县| 平陆县| 苗栗市| 米脂县| 宁海县| 西宁市| 盐亭县| 武强县| 中山市| 洪洞县| 长垣县| 高台县| 富锦市| 宁南县| 新竹市| 新建县| 嵊州市| 普安县| 内江市| 东乡族自治县| 班戈县| 三原县| 黔西县|