问题重现:
在使用 maven flexmojos plugin 开发 felx项目过程中,执行 flexmojos:compile-swf + flexmojos:wrapper 后运行页面,尝试与后台交互,遇到如下异常信息:
[RPC Fault faultString="[MessagingError message='Destination 'yourRemoteService' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']" faultCode="InvokeFailed" faultDetail="Couldn't establish a connection to yourRemoteService'"]
问题原因:
需要在 flex 项目 pom.xml 中,正确配置如下参数:
1) <rootURL/>
访问远程 server 的 URL
2) <contextRoot/>
上下文路径
3) <services/>
BlazeDS 的 services-config.xml 文件位置
贴出完整 pom.xml: