最近学习了Flex,想与之前学的seam做个结合,就发现了Flamingo.。学习资料少之又少,只好去啃英文,做下笔记
2、Flex Builder中编译器的配置
1、Flamingo Seam 使用AMF的services-config.xml一般配置
- <?xml version="1.0" encoding="UTF-8"?>
- <services-config>
- <services>
- <service id="hello-service"
- class="flex.messaging.services.RemotingService"
- messageTypes="flex.messaging.messages.RemotingMessage">
- <!-- desination是FLex与Seam组件通信的关键,用@Name在组件中标示 -->
- <destination id="person" />
- <destination id="Person" />
- <default-channels>
- <channel ref="seam-amf" />
- </default-channels>
- </service>
- </services>
- <!-- 通道定义,其中validation为项目名,/seam/resource为seam remoting的默认servlet-mapping uri -->
- <channels>
- <channel-definition id="seam-amf"
- class="mx.messaging.channels.AMFChannel">
- <endpoint
- uri="http://{server.name}:{server.port}/validation/seam/resource/amf"
- class="flex.messaging.endpoints.AMFEndpoint" />
- </channel-definition>
- </channels>
- </services-config>
在Flex项目的选项中必须对Flex Compiler中加上参数 -services "services-config.xml"
3、SWF文件的位置
编译后的swf文件必须放到应用服务器上的应用文件夹中,不然无法访问Seam组件,应该是安全机制的跨域保护问题吧。