JunXiu

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

          Flex和Java 整合有幾種方法,最常見(jiàn)的是:

          一,F(xiàn)lex,java在一個(gè)項(xiàng)目中。

          二,F(xiàn)lex,java分別在兩個(gè)項(xiàng)目中。

          第一種,直接在新建Flex項(xiàng)目中選擇應(yīng)用服務(wù)器,選擇blazeDS即可。

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

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

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

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

          或者新建項(xiàng)目如一,在新建項(xiàng)目java把編譯目錄設(shè)為Flex-webcontent-classes下。

          一般問(wèn)題都錯(cuò)在設(shè)置上,endpoint是一個(gè)注意點(diǎn)。

          關(guān)于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/> 對(duì)象中指定Endpoint參數(shù):

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


          本文來(lái)自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/bill1315/archive/2010/07/21/5751496.aspx

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


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           

          導(dǎo)航

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

          統(tǒng)計(jì)

          常用鏈接

          留言簿

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 石阡县| 石家庄市| 元朗区| 绵竹市| 吉隆县| 怀远县| 辽阳县| 秭归县| 吉木萨尔县| 旺苍县| 吉安市| 保靖县| 汉中市| 布尔津县| 石景山区| 晋中市| 清河县| 镇巴县| 安塞县| 大新县| 集安市| 崇信县| 炎陵县| 乌兰浩特市| 乌拉特中旗| 大理市| 休宁县| 甘泉县| 象山县| 城固县| 鄂伦春自治旗| 喀喇| 巴彦县| 梁山县| 柳州市| 肇庆市| 子长县| 营山县| 长岛县| 济阳县| 五常市|