`
zerozone
  • 浏览: 205411 次
  • 来自: 北京
社区版块
存档分类
最新评论

Java-AS,PetStoreFacade转换失败

阅读更多

简要介绍,为实现Flex调用Spring示例PetStore的Facade,写了一个类用于RemoteObject将Java端的Facade转换到AS端的对象或接口。结果发现AS不支持函数重载,只能将Java端的带重载的函数改名或删除。


[SWF] F:\eclipse32\workspace\FlexPetStore\bin\StockQuoteImpl-debug.swf - 724,623 bytes after decompression
TypeError: Error #1034: 强制转换类型失败:无法将 mx.utils::ObjectProxy@a14e601 转换为 org.springframework.samples.jpetstore.domain.logic.PetStoreFacade。
at StockQuoteImpl/StockQuoteImpl::handleResult()[F:\eclipse32\workspace\FlexPetStore\StockQuoteImpl.mxml:37]
at StockQuoteImpl/__PetStoreRO_result()[F:\eclipse32\workspace\FlexPetStore\StockQuoteImpl.mxml:58]
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.rpc::AbstractService/dispatchEvent()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AbstractService.as:236]
at mx.rpc.remoting.mxml::RemoteObject/dispatchEvent()[C:\dev\enterprise_gmc\frameworks\mx\rpc\remoting\mxml\RemoteObject.as:201]
at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AbstractOperation.as:183]
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AbstractInvoker.as:167]
at mx.rpc::Responder/result()[C:\dev\enterprise_gmc\frameworks\mx\rpc\Responder.as:48]
at mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_gmc\frameworks\mx\rpc\AsyncRequest.as:82]
at NetConnectionChannel.as$37::NetConnectionMessageResponder/NetConnectionChannel.as$37:NetConnectionMessageResponder::resultHandler()[C:\dev\enterprise_gmc\frameworks\mx\messaging\channels\NetConnectionChannel.as:407]
at mx.messaging::MessageResponder/result()[C:\dev\enterprise_gmc\frameworks\mx\messaging\MessageResponder.as:202]

原因是AS不支持函数重载。导致接口不一致
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics