JunXiu

          Flex與Java整合(endpoint的重要性)

          Flex和Java 整合有幾種方法,最常見的是:

          一,Flex,java在一個項目中。

          二,Flex,java分別在兩個項目中。

          第一種,直接在新建Flex項目中選擇應用服務器,選擇blazeDS即可。

          注意要寫上輸出文件夾url.endpoint="messagebroker/amf" 寫上相對路徑即可。

          第二種,分別新建Flex ,java 項目,blazeds.war項目中的WebConten/Web-Inf替代java項目下的web-inf。在remoting-config.xml下寫上:

          <destination id="hxh">  
                 <properties>  
                     <source>com.demo.hxh</source>  
                 </properties>  
              </destination>  
          并布署為tomcat.

          Flex項目中修改endpoint="/hxh/messagebroker/amf",并設置輸出文件夾為java ,WebContent下的,輸出文件夾url為java項目,如為http://localhost:8400/hxh

          或者新建項目如一,在新建項目java把編譯目錄設為Flex-webcontent-classes下。

          一般問題都錯在設置上,endpoint是一個注意點。

          關于endpoint:

          public interface Endpointextends ManageableAn endpoint receives messages from clients and decodes them, then sends them on to a MessageBroker for routing to a service. The endpoint also encodes messages and delivers them to clients. Endpoints are specific to a message format and network transport, and are defined by the named URI path on which they are located.


          在 <mx:RemoteObject/> 對象中指定Endpoint參數:

               1) 全路徑:          endpoint="http://server:8080/HelloBlazeDS/messagebroker/amf" >
               2) 基于contextRoot: endpoint="/HelloBlazeDS/messagebroker/amf" >
               3) 基于當前路徑:   endpoint="messagebroker/amf" >


          本文來自CSDN博客,轉載請標明出處:http://blog.csdn.net/bill1315/archive/2010/07/21/5751496.aspx

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


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


          網站導航:
           

          導航

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

          統計

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 沐川县| 灵山县| 和田县| 阆中市| 永善县| 阜新市| 图木舒克市| 买车| 项城市| 徐水县| 龙山县| 腾冲县| 资源县| 嘉义县| 高碑店市| 柳河县| 娄烦县| 元朗区| 泾阳县| 达尔| 柯坪县| 澄江县| 邓州市| 南安市| 特克斯县| 体育| 绥阳县| 朝阳县| 普定县| 寿宁县| 曲阳县| 江陵县| 金塔县| 抚州市| 灵川县| 遂宁市| 马公市| 泊头市| 海伦市| 开鲁县| 永泰县|