JunXiu

          flex中endpoint的作用是什么?

          flexendpoint的作用是什么?

          endpoint

          <channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
                      <endpoint url="http://127.0.0.1/flexweb/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint" />
              
                  </channel-definition>

                  <channel-definition id="my-secure-amf" class="mx.messaging.channels.SecureAMFChannel">
                      <endpoint url="https://127.0.0.1/flexweb/messagebroker/amfsecure " class="flex.messaging.endpoints.SecureAMFEndpoint"/>
                      <properties>
                          <add-no-cache-headers>false</add-no-cache-headers>
                      </properties>
                  </channel-definition>

                  <channel-definition id="my-polling-amf" class="mx.messaging.channels.AMFChannel">
                      <endpoint url="http://127.0.0.1/flexweb/messagebroker/amfpolling" class="flex.messaging.endpoints.AMFEndpoint"/>
                      <properties>
                          <polling-enabled>true</polling-enabled>
                          <polling-interval-seconds>4</polling-interval-seconds>
                      </properties>
                  </channel-definition>
            
            
          Flex 調用遠程或所在web應用的 BlazeDS服務時,必須建立和遠端的通道channel,才能正常通信。
          1.  通常的方式是 Flex 在編譯時就指定遠程的端點 Endpoint,service-config.xml 中的Endpoint 配置是 例如:
          Xml代碼
          <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"  
          說明:server.name:如果是本機的話,那就是127.0.0.1了,如果發布在網上的話,那一定是一個域名了知道有多么的重要了吧。
                server.port:服務器的端口號。
                context.root:是你的項目名稱。
            
          編譯時指定的方式是在加編譯參數,例如:

          引用
            -services "services-config.xml" -context-root "/flexWeb"       

             services-config.xml 需要放在當前目錄下,或者指定BlazeDS所在的配置文件路徑。
          2. 在 <mx:RemoteObject/> 對象中指定Endpoint參數:
               例如: 
              Xml代碼
          <mx:RemoteObject id="roOrder" destination="Hello" showBusyCursor="true" endpoint="http://server:8080/flexWeb/messagebroker/amf">
          <mx:RemoteObject id="roOrder" destination="Hello" showBusyCursor="true" endpoint="http://server:8080/flexWeb/messagebroker/amf">
           說明:1) 全路徑:          endpoint="http://server:8080/flexWeb/messagebroker/amf" >
                 2) 基于contextRoot: endpoint="/flexWeb/messagebroker/amf" >
                 3) 基于當前路徑:   endpoint="messagebroker/amf" >

          posted on 2010-09-06 16:07 junlin 閱讀(1033) 評論(0)  編輯  收藏


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


          網站導航:
           

          導航

          <2010年9月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          統計

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 卓资县| 碌曲县| 太保市| 庄河市| 邹城市| 苏尼特左旗| 鲜城| 运城市| 嘉义县| 沧源| 嵊泗县| 宜阳县| 梧州市| 文昌市| 馆陶县| 抚州市| 泗阳县| 榆树市| 离岛区| 桂阳县| 太仆寺旗| 乌审旗| 太康县| 莱西市| 永吉县| 乐至县| 桂东县| 侯马市| 新沂市| 嘉兴市| 屏东市| 长兴县| 雷波县| 蓬莱市| 谢通门县| 凌海市| 大余县| 当雄县| 平陆县| 清徐县| 菏泽市|