- 浏览: 536108 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
gaolegao2008:
如果报 is_volum 列名找不到之类的,我是从新部署了一个 ...
spring quartz 定时器报错 -
gaolegao2008:
部署到linux上时,还有一种情况就是mysql数据库区分大小 ...
spring quartz 定时器报错 -
qq123zhz:
yahier 写道 对我有帮助,但我看的一个demo程序,却没 ...
spring quartz 定时器报错 -
qq123zhz:
这个要在eclipse的插件环境下运行的,你不懂eclipse ...
GEF 自动布局 -
qq123zhz:
这个很久了,不记得啥时候写的了
json转为Map
在mxml添加<mx:TraceTarget level="1"/>,level代表日志等级,就是all,debug,info,error等。。。。
在配置文件中打开:
<logging>
<target class="flex.messaging.log.ConsoleTarget" level="Debug">
<properties>
<prefix>[Flex] </prefix>
<includeDate>true</includeDate>
<includeTime>true</includeTime>
<includeLevel>true</includeLevel>
<includeCategory>true</includeCategory>
</properties>
<filters>
<pattern>Endpoint.*</pattern>
<pattern>Service.*</pattern>
<pattern>Configuration</pattern>
</filters>
</target>
</logging>
tomcat console:
[Flex] 02/09/2011 16:38:38.812 [WARN] [Configuration] HttpFlexSession has not been registered as a listener in web.xml for this application so no events will be dispatched to FlexSessionAttributeListeners or FlexSessionBindingListeners. To correct this, register flex.messaging.HttpFlexSession as a listener in web.xml. [Flex] 02/09/2011 16:38:38.890 [DEBUG] [Endpoint.FlexSession] FlexSession created with id '7FAD3A28CFC179E2783613C195B0B985' for an Http-based client connection. [Flex] 02/09/2011 16:38:38.906 [INFO] [Endpoint.General] Channel endpoint my-amf received request. [Flex] 02/09/2011 16:38:39.015 [DEBUG] [Endpoint.AMF] Deserializing AMF/HTTP request Version: 3 (Message #0 targetURI=null, responseURI=/1) (Array #0) [0] = (Typed Object #0 'flex.messaging.messages.CommandMessage') operation = 5 correlationId = "" messageId = "EB7AB2B6-EFA3-6054-8930-09927DCCFAB0" timestamp = 0 headers = (Object #1) DSId = "nil" DSMessagingVersion = 1 destination = "" body = (Object #2) clientId = null timeToLive = 0 [Flex] 02/09/2011 16:38:39.156 [DEBUG] [Endpoint.AMF] Serializing AMF/HTTP response Version: 3 (Message #0 targetURI=/1/onResult, responseURI=) (Externalizable Object #0 'DSK') (Object #1) DSMPIO = (Typed Object #2 'flex.messaging.messages.MessagePerformanceInfo') serverPreAdapterTime = 0.0 serverPreAdapterExternalTime = 0.0 infoType = null sendTime = 1.29724071914E12 recordMessageTimes = false serverPrePushTime = 0.0 pushedFlag = false serverPostAdapterExternalTime = 0.0 receiveTime = 0.0 messageSize = 0.0 overheadTime = 0.0 recordMessageSizes = false serverPostAdapterTime = 0.0 DSMessagingVersion = 1.0 DSId = "655EA75C-C708-C158-A04B-EEACB497D065" 1.297240719031E12 (Byte Array #3, Length 16) (Byte Array #4, Length 16) (Byte Array #5, Length 16) [Flex] 02/09/2011 16:38:39.203 [INFO] [Endpoint.General] Channel endpoint my-amf received request. [Flex] 02/09/2011 16:38:39.218 [DEBUG] [Endpoint.AMF] Deserializing AMF/HTTP request Version: 3 (Message #0 targetURI=null, responseURI=/2) (Array #0) [0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage') source = null operation = "sayHello" messageId = "E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB" timestamp = 0 headers = (Object #1) DSId = "655EA75C-C708-C158-A04B-EEACB497D065" DSEndpoint = "my-amf" destination = "FirstJavaClassRemoteObject" body = (Array #2) [0] = "hi~你好" clientId = null timeToLive = 0 [Flex] 02/09/2011 16:38:39.218 [DEBUG] [Service.Remoting] Adapter 'java-object' called 'com.test.FirstJavaClass.sayHello(java.util.Arrays$ArrayList (Collection size:1) [0] = hi~你好 )' [Flex] 02/09/2011 16:38:39.218 [DEBUG] [Service.Remoting] Result: '你说的是:hi~你好' [Flex] 02/09/2011 16:38:39.218 [DEBUG] [Endpoint.AMF] Serializing AMF/HTTP response Version: 3 (Message #0 targetURI=/2/onResult, responseURI=) (Externalizable Object #0 'DSK') "你说的是:hi~你好" (Object #1) DSMPIO = (Typed Object #2 'flex.messaging.messages.MessagePerformanceInfo') serverPreAdapterTime = 0.0 serverPreAdapterExternalTime = 0.0 infoType = null sendTime = 1.297240719218E12 recordMessageTimes = false serverPrePushTime = 0.0 pushedFlag = false serverPostAdapterExternalTime = 0.0 receiveTime = 0.0 messageSize = 0.0 overheadTime = 0.0 recordMessageSizes = false serverPostAdapterTime = 0.0 1.297240719218E12 (Byte Array #3, Length 16) (Byte Array #4, Length 16) (Byte Array #5, Length 16)
flex console:
0AE5DD11-6F38-C4D2-9B38-09927560A495' producer set destination to 'FirstJavaClassRemoteObject'. '0AE5DD11-6F38-C4D2-9B38-09927560A495' producer sending message 'E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB' 'my-amf' channel endpoint set to http://localhost:8080/flex_blazeds3/messagebroker/amf 'my-amf' channel settings are: <channel id="my-amf" type="mx.messaging.channels.AMFChannel"> <endpoint uri="http://{server.name}:{server.port}/flex_blazeds3/messagebroker/amf"/> <properties/> </channel> 'my-amf' pinging endpoint. 'my-amf' channel is connected. 'my-amf' channel sending message: (mx.messaging.messages::RemotingMessage)#0 body = (Array)#1 [0] "hi~你好" clientId = (null) destination = "FirstJavaClassRemoteObject" headers = (Object)#2 messageId = "E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB" operation = "sayHello" source = (null) timestamp = 0 timeToLive = 0 '0AE5DD11-6F38-C4D2-9B38-09927560A495' producer connected. '0AE5DD11-6F38-C4D2-9B38-09927560A495' producer acknowledge of 'E2EC4EA3-01CB-F22C-0CCB-09927D7EA4CB'.
评论
3 楼
Fx_demon
2014-09-17
Java代码:
@Service("loginService")
@RemotingDestination(channels = { "my-amf" })
public class LoginService implements ILoginService {
@Autowired
private LoginDao loginDao;
@RemotingInclude
public String getInfo() {
return "你好 。。。访问成功 。。。嘻嘻嘻 ";
}
MXML:
<?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/mx">
<fx:Declarations>
<!-- "productService" is defined in Spring's configuration file WEB-INF/config/web-application-config.xml
and provides remote access to the org.springframework.flex.samples.product.ProductDAO class -->
<mx:ChannelSet id="channelSet">
<mx:AMFChannel url="/flex-spring-mobile/messagebroker/amf"/>
</mx:ChannelSet>
<s:RemoteObject id="service" channelSet="{channelSet}"
destination="loginService">
<s:method name="getInfo" result="method1_resultHandler(event)"/>
</s:RemoteObject>
<s:RemoteObject id="ro" destination="loginService" endpoint="http://127.0.0.1:8080/flex-spring-mobile/messagebroker/amf" fault="ro_faultHandler(event)" result="handlResult(event)" />
</fx:Declarations>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function getData():void{
ro.getInfo();
}
private function handlResult(e:ResultEvent):void
{
Alert.show(e.result.toString());
trace(e.result);
}
protected function ro_faultHandler(event:FaultEvent):void
{
// TODO Auto-generated method stub
Alert.show(event.message.toString());
}
protected function method1_resultHandler(event:ResultEvent):void
{
// TODO Auto-generated method stub
service.getInfo();
}
]]>
</fx:Script>
<!--<mx:DataGrid dataProvider="{ro.findAll.lastResult}" width="100%" height="100%"/>-->
<!-- the findAll() method is defined in org.springframework.flex.samples.product.ProductDAO -->
<s:Button label="Get Info" click="ro.getInfo()"/>
<mx:Button click="getData()" x="278.5" y="186" label="go-----点击" width="153"/>
</s:Application>
@Service("loginService")
@RemotingDestination(channels = { "my-amf" })
public class LoginService implements ILoginService {
@Autowired
private LoginDao loginDao;
@RemotingInclude
public String getInfo() {
return "你好 。。。访问成功 。。。嘻嘻嘻 ";
}
MXML:
<?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/mx">
<fx:Declarations>
<!-- "productService" is defined in Spring's configuration file WEB-INF/config/web-application-config.xml
and provides remote access to the org.springframework.flex.samples.product.ProductDAO class -->
<mx:ChannelSet id="channelSet">
<mx:AMFChannel url="/flex-spring-mobile/messagebroker/amf"/>
</mx:ChannelSet>
<s:RemoteObject id="service" channelSet="{channelSet}"
destination="loginService">
<s:method name="getInfo" result="method1_resultHandler(event)"/>
</s:RemoteObject>
<s:RemoteObject id="ro" destination="loginService" endpoint="http://127.0.0.1:8080/flex-spring-mobile/messagebroker/amf" fault="ro_faultHandler(event)" result="handlResult(event)" />
</fx:Declarations>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function getData():void{
ro.getInfo();
}
private function handlResult(e:ResultEvent):void
{
Alert.show(e.result.toString());
trace(e.result);
}
protected function ro_faultHandler(event:FaultEvent):void
{
// TODO Auto-generated method stub
Alert.show(event.message.toString());
}
protected function method1_resultHandler(event:ResultEvent):void
{
// TODO Auto-generated method stub
service.getInfo();
}
]]>
</fx:Script>
<!--<mx:DataGrid dataProvider="{ro.findAll.lastResult}" width="100%" height="100%"/>-->
<!-- the findAll() method is defined in org.springframework.flex.samples.product.ProductDAO -->
<s:Button label="Get Info" click="ro.getInfo()"/>
<mx:Button click="getData()" x="278.5" y="186" label="go-----点击" width="153"/>
</s:Application>
2 楼
Fx_demon
2014-09-17
flex 访问 spring BlazeDS 时 访问不到 求解 ?
1 楼
Fx_demon
2014-09-17
[BlazeDS]Deserializing AMF/HTTP request
Version: 3
(Message #0 targetURI=null, responseURI=/1)
(Array #0)
[0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
source = null
operation = "getStocks"
body = (Array #1)
timeToLive = 0
timestamp = 0
clientId = null
destination = "feedManager"
headers = (Object #2)
DSId = "5D29E406-F0D8-8295-6A0A-B9A3960CA42F"
DSEndpoint = null
messageId = "178988F1-D5F8-6385-5845-822E2015D25E"
[BlazeDS]Serializing AMF/HTTP response
Version: 3
(Message #0 targetURI=/1/onStatus, responseURI=)
(Typed Object #0 'flex.messaging.messages.ErrorMessage')
headers = (Object #1)
rootCause = null
body = null
correlationId = "178988F1-D5F8-6385-5845-822E2015D25E"
faultDetail = null
faultString = "No destination with id 'feedManager' is registered with any service."
clientId = "5D29EBA8-10E8-5546-6147-626F689A436F"
timeToLive = 0.0
destination = "feedManager"
timestamp = 1.410933334294E12
extendedData = null
faultCode = "Server.Processing"
messageId = "5D29EC6B-608F-DCB9-75A0-C29998F2BE3F"
Version: 3
(Message #0 targetURI=null, responseURI=/1)
(Array #0)
[0] = (Typed Object #0 'flex.messaging.messages.RemotingMessage')
source = null
operation = "getStocks"
body = (Array #1)
timeToLive = 0
timestamp = 0
clientId = null
destination = "feedManager"
headers = (Object #2)
DSId = "5D29E406-F0D8-8295-6A0A-B9A3960CA42F"
DSEndpoint = null
messageId = "178988F1-D5F8-6385-5845-822E2015D25E"
[BlazeDS]Serializing AMF/HTTP response
Version: 3
(Message #0 targetURI=/1/onStatus, responseURI=)
(Typed Object #0 'flex.messaging.messages.ErrorMessage')
headers = (Object #1)
rootCause = null
body = null
correlationId = "178988F1-D5F8-6385-5845-822E2015D25E"
faultDetail = null
faultString = "No destination with id 'feedManager' is registered with any service."
clientId = "5D29EBA8-10E8-5546-6147-626F689A436F"
timeToLive = 0.0
destination = "feedManager"
timestamp = 1.410933334294E12
extendedData = null
faultCode = "Server.Processing"
messageId = "5D29EC6B-608F-DCB9-75A0-C29998F2BE3F"
发表评论
-
对于swiz1.0框架的一点理解
2011-05-18 11:32 1177Swiz的核心是个简单的控制反转框架。借助于IoC框架,应用组 ... -
flex 强制viewStack更新
2011-05-12 15:24 2169viewStack 第一次创建后,后面viewStack切换 ... -
flex 任意组件添加鼠标手型
2011-05-09 16:03 2113<s:TextArea textFlow="{ ... -
flex 时区转换
2011-05-06 15:29 1297public static function getTimeZ ... -
关于在s:Application 使用mx:DataGrid
2011-05-05 16:24 991在flex4中使用mx:DataGrid ,不支持内联的Da ... -
原来<s:ComboBox>已经出来了
2011-04-27 14:40 1231最近做的项目需要可编辑的下拉列表,以前google发现只有d ... -
s:DataGrid与mx:DataGrid
2011-04-22 15:59 3094<s:DataGrid id="showGr ... -
AIR 居中
2011-04-21 13:54 1164youWin.nativeWindow.x = (Capabi ... -
swiz 元标签[EventHandler]
2011-04-19 14:40 1143[EventHandler( event="User ... -
flex4 AIR titleBar问题
2011-04-13 16:14 1609flex3 AIR中 windedApplication有sh ... -
flex 国际化参数
2011-04-11 11:41 1204-locale zh_CN -locale en_US - ... -
swiz 弹出框的处理
2011-04-06 12:54 1090由于swiz框架的事件是基于冒泡的,而且它 it was ... -
flex 4 工具栏
2011-04-02 15:16 2517flex 4 WEB模式下的工具栏,能正常运行。 <? ... -
flex 的反射要事先声明.......为什么?
2011-03-03 12:29 1031Flex的反射有点假,你必须先声明一下才能反射的到。为什么?? ... -
as 数组去重复元素
2011-02-16 09:38 1243var a:Array=new Array("a&q ... -
(flex4): addChild() is not available in this class.
2011-02-15 14:01 1909flex4中: just create another co ... -
BulkLoader 多文件加载库(转)
2011-02-14 12:21 2736在BulkLoader 的 add方法中 ... -
关于blazeds的Channel/endpoint的介绍
2011-02-11 10:29 1630AMFChannel/AMFEndpoint: 简单的通道传输 ... -
查看MXML文件所翻译的ActionScript代码
2011-01-21 15:40 1102项目属性——》Flex编译器 -locale zh_CN ... -
flex osgi实现-potomac 个人翻译资料- 理解保存周期(save Cycle)
2011-01-20 17:02 1327保存的工作流程被设计去适应web的异步服务。当part发出pa ...
相关推荐
1. **远程调用(Remoting)**:BlazeDS的核心功能之一是提供远程调用服务,允许Flex客户端直接调用Java服务器上的方法。这种通信方式基于AMF(Action Message Format),一种高效的二进制序列化协议,可以减少网络...
BlazeDS支持多种服务,如Remoting、MessageBrokering和LiveCycle Data Services,其中Remoting服务是BlazeDS的核心功能,它允许Flex客户端通过HTTP通道与Java服务器端的方法进行远程调用。 **Flex** 是一种基于MXML...
- 服务端部分通过LCDS或Blazeds与客户端进行通信,支持远程对象调用等功能。 - FlexBuilder 3中的项目向导使得创建这种类型的项目变得更加简单直观。 - **Blazeds与LCDS的区别** - Blazeds作为LCDS的开源版本,...
blazeds-spring.war是BlazeDS与Spring框架的整合,允许开发者利用Spring的强大功能,如依赖注入、事务管理等,来增强BlazeDS的应用开发。 4. **解压后的文件夹**: 解压后的blazeds和blazeds-spring文件夹包含了所有...
Blazeds的核心功能包括Remoting、Messaging和LiveCycle Data Services。Remoting允许Flex客户端直接调用Java服务器上的方法,就像是在本地调用一样,极大地减少了网络通信的开销。Messaging则支持发布/订阅的消息...
BlazeDS通信到Java的PureMVC——Flex框架,BlazeDS的服务器配置比较麻烦,这里使用的是直接下载blazeds_turnkey_3-0-0-544.zip中的tomcat BlazeDS模板路径为: blazeds_turnkey_3-0-0-544.zip解压后路径\tomcat\...
Blazeds可以与Spring框架无缝集成,这样Java开发者可以利用Spring的强大功能,如依赖注入、事务管理等,来构建和管理后端服务。 7. **安全性和性能优化**: 在实际应用中,确保Blazeds与Java通信的安全性至关重要...
RemoteObject服务使得客户端能以简单的方式访问企业级功能,如数据交换、身份验证、日志记录等,而无需复杂的SOAP配置。 消息服务是BlazeDS的另一大亮点,它允许客户端作为消息生产者(Producer)发送消息,而消息...
2. `samples.war`:这是一个包含示例应用的Web应用档案,展示了BlazeDS功能的实际应用,如Remoting、Messaging和Data Services。这些示例可以帮助开发者了解如何在实际项目中使用BlazeDS进行Flex与JavaEE的集成。 3...
BlazeDS是Adobe LiveCycle Data Services的一个开源版本,主要功能是提供AMF(Action Message Format)协议,用于在服务器和Flex客户端之间高效地传输数据。BlazeDS支持实时双向通信,包括HTTP长轮询、HTTP流和...
本文将详细介绍Blazeds的核心概念、功能以及如何使用它。 Blazeds,全称BlazeDS,是Adobe Flex和后端服务器之间进行数据交换的一种解决方案。它的主要目标是提供灵活的数据集成,使Flex前端可以与Java后端服务进行...
Blazeds的核心功能包括: 1. **Remoting**:这是Blazeds的基础,它允许Flash应用程序通过AMF直接调用服务器上的远程方法,实现了远程过程调用(RPC)。这种调用方式比XML-based的Web服务更为快速和高效。 2. **...
BlazeDS的核心功能是为Flex或HTML5客户端提供数据服务,通过HTTP和WebSocket协议实现。它提供了以下关键组件: 1. **LiveCycle Data Services (LCDS)**:这是BlazeDS的一个高级版本,包含更多企业级特性,如数据推...
整合开发Flex、MyEclipse和Blazeds的过程涉及到了多种技术的融合,下面将详细介绍这一过程所包含的关键知识点。 首先,了解JDK环境的配置。JDK是Java开发的基础,其环境配置包括安装JDK、设置JAVA_HOME环境变量、...
在本例中,我们将讨论如何利用BlazeDS来实现PDF文档的导出功能。 PDF(Portable Document Format)是一种广泛使用的文件格式,它能保持文档的原始布局和样式,方便跨平台分享和打印。将数据转换为PDF格式是许多应用...
Blazeds还支持其他高级功能,如MessageBroker(消息代理)用于发布/订阅模式的消息传递,以及LiveCycle Data Services的集成,提供更全面的企业级服务。在实际项目中,可以根据需求灵活运用这些特性。
9. **故障排查与日志**:BlazeDS提供详细的日志记录,帮助开发者诊断和解决问题。日志可以通过服务器的日志系统(如Tomcat的catalina.out)或者自定义的日志配置进行查看。 10. **社区支持**:作为开源项目,...
#### 一、BlazeDS简介与功能 BlazeDS是一款由Adobe开发的开源服务器端软件,主要用来支持远程调用和消息传递服务。它能够实现Java应用服务器和Flex客户端之间的通信,通过AMF(Action Message Format)协议来简化...
3. **Blazeds**:Blazeds是Adobe从LCDS中剥离出的开源数据服务中间件,保留了LCDS的核心功能,如实时通信、远程对象调用等,满足了大部分开发需求,降低了开发成本。 4. **Java**:Java是一种广泛使用的面向对象...
8. **监控与调试**:通过日志记录和监控工具,开发者可以跟踪BlazeDS的通信,帮助定位和解决问题。例如,使用Spring AOP(面向切面编程)可以方便地添加日志拦截器,以便分析请求和响应的细节。 综上所述,Spring ...