- 浏览: 526000 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
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 1133Swiz的核心是个简单的控制反转框架。借助于IoC框架,应用组 ... -
flex 强制viewStack更新
2011-05-12 15:24 2144viewStack 第一次创建后,后面viewStack切换 ... -
flex 任意组件添加鼠标手型
2011-05-09 16:03 2063<s:TextArea textFlow="{ ... -
flex 时区转换
2011-05-06 15:29 1235public static function getTimeZ ... -
关于在s:Application 使用mx:DataGrid
2011-05-05 16:24 961在flex4中使用mx:DataGrid ,不支持内联的Da ... -
原来<s:ComboBox>已经出来了
2011-04-27 14:40 1193最近做的项目需要可编辑的下拉列表,以前google发现只有d ... -
s:DataGrid与mx:DataGrid
2011-04-22 15:59 3064<s:DataGrid id="showGr ... -
AIR 居中
2011-04-21 13:54 1118youWin.nativeWindow.x = (Capabi ... -
swiz 元标签[EventHandler]
2011-04-19 14:40 1101[EventHandler( event="User ... -
flex4 AIR titleBar问题
2011-04-13 16:14 1571flex3 AIR中 windedApplication有sh ... -
flex 国际化参数
2011-04-11 11:41 1146-locale zh_CN -locale en_US - ... -
swiz 弹出框的处理
2011-04-06 12:54 1062由于swiz框架的事件是基于冒泡的,而且它 it was ... -
flex 4 工具栏
2011-04-02 15:16 2484flex 4 WEB模式下的工具栏,能正常运行。 <? ... -
flex 的反射要事先声明.......为什么?
2011-03-03 12:29 973Flex的反射有点假,你必须先声明一下才能反射的到。为什么?? ... -
as 数组去重复元素
2011-02-16 09:38 1200var a:Array=new Array("a&q ... -
(flex4): addChild() is not available in this class.
2011-02-15 14:01 1843flex4中: just create another co ... -
BulkLoader 多文件加载库(转)
2011-02-14 12:21 2707在BulkLoader 的 add方法中 ... -
关于blazeds的Channel/endpoint的介绍
2011-02-11 10:29 1562AMFChannel/AMFEndpoint: 简单的通道传输 ... -
查看MXML文件所翻译的ActionScript代码
2011-01-21 15:40 1052项目属性——》Flex编译器 -locale zh_CN ... -
flex osgi实现-potomac 个人翻译资料- 理解保存周期(save Cycle)
2011-01-20 17:02 1300保存的工作流程被设计去适应web的异步服务。当part发出pa ...
相关推荐
BlazeDS通信到Java的PureMVC——Flex框架,BlazeDS的服务器配置比较麻烦,这里使用的是直接下载blazeds_turnkey_3-0-0-544.zip中的tomcat BlazeDS模板路径为: blazeds_turnkey_3-0-0-544.zip解压后路径\tomcat\...
BlazeDS是一个基于服务器的Java远程调用(remoting)和Web消息传递(messaging)技术,使得后台的Java应用程序和运行在浏览器上的Flex应用程序能够相互通信。
blazeds.war blazeds
包含blazeds.war blazeds-spring.war 以及解压后的blazeds,blazeds-spring文件夹, 可直接拷贝到javaee项目下的WebRoot文件夹下
Blazeds入门教程.doc
Spring BlazeDS Integration,Flex通过remoteObject与java通讯,附带例子 文档
Flex技术本身和Java就有很强的关联性,它提供了一个基于Eclipse的IDE和BlazeDS.BlazeDS是个基于服务端的Java远程调用和Web消息的一个开源的技术。有许多应用都是以Java为后端处理的。Flex用于前端。由于Java和Flex...
Using BlazeDS and Flex integrated。
BlazeDS入门:HTTP Service BlazeDS入门:HTTP Service BlazeDS入门:HTTP Service
blazeds4整合spring3 这是我新近研究的方法 与整合spring2.5以下的方法有不同了,(看过一些教程觉得不是很好,用起来不顺手) 最终参考了官方的sample,得到了这个不错的整合方法。 把要用blazeds公开给flex的java...
flex 工具 blazeds
blazeds与spring的结合使用项目源码
blazeDS war包及Flex结合blazeDS的入门程序及操作步骤比较适合入门选手
Flex Blazeds入门教程 写的很不错的教程
JAVA通过BlazeDS与FLEX通信 BlazeDS.zip java项目,使用MYECLIPSE导入 FlexJavaServer.fxp FLEX项目,使用FLASHBUILDER4.5导入
BlazeDS开发者指南中文版,很详细的描述了BlazeDs的基本原理,开发、配置过程。
BlazeDS配置指南 tomcat安装 xml配置 flex与blazeDs
blazeds java服务器,用AMF实现flash与后台高效通信
BlazeDS结合pdf导出的例子 包含源代码,jar,可以直接运行
想要FLex与Java实现交互,blazeds是一个很好的开源小插件