百度空间 | 百度首页 
 
查看文章
 
开源项目fluorine(Flex与.net的AMF0网关)使用注意事项 (转)
2008-05-24 15:42
开源项目fluorine(Flex与.net的AMF0网关、WebORB的替代者)使用注意事项
网站链接:http://fluorine.thesilentgroup.com/fluorine/index.html

Fluorine是与AmfPHP、OpenAmf类似的但是用于.net平台的开源AMF网关。可以应用在Flex2与.net(1.1与2.0)中。
通过使用Fluorine可以在Flex中直接调用.net程序中类的相应方法,并且完成了Class Mapping。也就是说可以传递一个复杂对象作为参数。
通过我的试验发现,.net返回的DataTable可以被正确地解析为AS3中的Array

下面是我在使用的发现的一些注意事项:
Flex端:
1. 在VO的构造函数中需要调用flash.net.registerClassAlias("com.ariaware.pizza.vo.OrderVO", OrderVO);
其中第一个参数是VO在.net端的Assemble全称,即NameSpace+类名,第二个参数是ActionScript中的VO类

2. GateWayURL需要书写正确,一般的形式是:var gatewayURL:String = "http://localhost/FluorinePizzaService/Gateway.aspx";

3. 在指定.net端类名和方法名的时候,注意大小写一致 var pizzaService:AMF0Service = new AMF0Service ( gatewayURL, "pizzaService", null );

.net端
1. 注意VO中的字段名称与Flex端VO类中的名称一定要完全对应,否则就取不到对应的值。

2. 需要在Web.config中添加下面几行,紧跟在<system.web>后面就行了
   <httpModules>
       <add name="FluorineGateway" type="com.TheSilentGroup.Fluorine.FluorineGateway, com.TheSilentGroup.Fluorine" />
</httpModules>

3. 项目中需要引用com.TheSilentGroup.Fluorine这个Dll

4. 需要在项目中添加Gateway.aspx这样一个空的Web窗体

使用时:
1. 需要注意清除一下本地的Cookie,如果有一个名为.ASPXAUTH的Cookie如果不为空,会造成FormsAuthentication.Decrypt的错误。

类别:技术文档 | 添加到搜藏 | 分享到i贴吧 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu