Flex4.1集成spring2.5 BlazeDS(自己测试成功)
<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" minWidth="955" minHeight="600"> <s:layout> <s:BasicLayout/> </s:layout> <fx:Declarations> <!-- 将非可视元素(例如服务、值对象)放在此处 --> <mx:RemoteObject id="dbRemote" destination="dataBean" endpoint="http://localhost:8080/phmis/messagebroker/amf" result="onResultHandler(event)" fault="onFaultHandler(event)"> </mx:RemoteObject> </fx:Declarations> <fx:Script> <![CDATA[ import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; private function onResultHandler(event:ResultEvent):void{ Alert.show(String('onResultHandler')); Alert.show(String(event.result));//, String(example.data)); } private function onFaultHandler(event:FaultEvent):void{ Alert.show(String(event.fault));//, "Fault!"); Alert.show(String('onFaultHandler')); } private function btn_Click1EventHandler(event:MouseEvent):void{ dbRemote.getName(); } private function btn_Click2EventHandler(event:MouseEvent):void{ dbRemote.getParams(); } ]]> </fx:Script> <mx:Button x="10" id="btn_Click1" label="RemoteClass->getName" click="btn_Click1EventHandler(event)"/> <mx:Button x="190" id="btn_Click2" label="RemoteClass->getParams" click="btn_Click2EventHandler(event)" width="203"/> </s:Application>
?
?src/flex-application-config.xml
?
java
?src/struts.xml
?