Blazeds 与FLEX的发布问题 消息实现
在通过blazeds实现消息时,FLEX发布时需要在设置里面将flexserver中将contextroot与web应用的contextroot名称设置成一样的!否则就不能正确的接收到消息
以下是相关的参数文章
关键字: flex blazeds
来自:http://hi.baidu.com/%C7%E1%BD%A3/blog/item/33ce7219256b894d42a9ad30.html
Flex 调用远程或所在web应用的 BlazeDS服务时,必须建立和远端的通道channel,才能正常通信。
1. 通常的方式是 Flex 在编译时就指定远程的端点 Endpoint,service-config.xml 中的Endpoint 配置是 例如:
Xml代码
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
编译时指定的方式是在加编译参数,例如:
引用
-services "services-config.xml" -context-root "/HelloBlazeds"
services-config.xml 需要放在当前目录下,或者指定BlazeDS所在的配置文件路径。
http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=12209
2. 在 <mx:RemoteObject/> 对象中指定Endpoint参数:
例如:
Xml代码
<mx:RemoteObject id="roOrder" destination="Hello" showBusyCursor="true" endpoint="http://server:8080/HelloBlazeDS/messagebroker/amf" >
<mx:RemoteObject id="roOrder" destination="Hello" showBusyCursor="true" endpoint="http://server:8080/HelloBlazeDS/messagebroker/amf" >
1) 全路径: endpoint="http://server:8080/HelloBlazeDS/messagebroker/amf" >
2) 基于contextRoot: endpoint="/HelloBlazeDS/messagebroker/amf" >
3) 基于当前路径: endpoint="messagebroker/amf" >
总结:
对于Flex+BlazeDS集成开发,方式1,和2.1),2.2) 对于企业应用来说都不是最佳方案,因为他将 contextroot写死了,不便于移植,也就是说,编译后的 swf 放到其他应用下无法调用BlazeDS服务;
相关文档:
Flex 4带给我们的,是全新的命名空间。了解这些命名空间必定是一件好事情。Flex 4有三个非常重要的命名空间,分别是:
xmlns:fx=”http://ns.adobe.com/mxml/2009″
xmlns:mx=”library://ns.adobe.com/flex/halo”
xmlns:s=”library://ns.adobe.com/flex/spark”
1、xmlns:fx=&rdqu ......
flex代码:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
<fx:Script>
<!--[CDATA[
i ......
RIA(Rich Internet Application)—— 富 Internet
应用以其良好的客户体验得到越来越广泛的应用,银行,电信等领域已有诸多成功案例。Adobe 的 Flex 是最具有代表性的基于 Flash 的 RIA
技术。通过对 Flex 以及当前流行的 Spring、Hibernate 的 J2EE 开源框架进行集成,使客户既能获得到一流的用户体验,又 ......
Axis简介
技术前沿 2008-04-07 22:42 阅读104 评论0
字号: 大大 中中 小小
1.SOAP简介
企业系统内部各个系统之间的信息交换一直是一个难题,在过去有DCOM、CORBA等解决方案,但都不是很完美,不是太复杂就是有缺陷。现在则较流行SOAP(全称:Simple O ......