2009年2月24日 星期二

「引用」Flex RPC錯誤整理

出處:http://www.riafan.com/article.asp?id=102
最近不少網友反映使用Fluorine實現Flex與.NET通信老是出錯,原因肯定不一樣,為節約時間,我想有必要整理一下Flex RPC常見錯誤。此處先整理一下Flash Remoting方面的,後續會加上HTTP Service和Web Service的。

一、Flex Remoting

  1. Channel definition, mx.messaging.channels.RTMPChannel, can not be found...:最新版的Fluorined在services-config.xml中新增了RTMP Channel,主要是用來配置Flex Messaging,編譯時需要FDS.swc支持,當然如果不需要此功能可以註釋掉channel-definition這個節點。
  2. RPC Fault faultString="The requested type ... is not accessible":Flash Remoting服務名不對。詳見Flash Remoting支持的遠程服務
  3. RPC Fault faultString="Could not find a suitable method with name ..." :找不到對應的方法。首選看方法名對不對,再看方法的參數個數,參數類型,還要檢查返回數據的類型。關於數據的類型詳見Fluorine環境下AS3與.NET之間的數據轉換(一)Fluorine環境下AS3與.NET之間的數據轉換(二)
  4. NetConnection.Call.Failed: HTTP: Status 404: url...: '虛擬主機的域名/子目錄/Gateway.aspx'":沒將Root URL設置為虛擬主機的域名。詳見Flex Bulider 2與Flash cs3的發布文件
  5. RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed errorNetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost/Gateway.aspx...'":如果設置了Root URL為虛擬主機的域名,訪問本地swf文件時Root URL則為localhost,如果沒有將Flex Web應用設置成默認網站,則會出現此種錯誤。
  6. [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048...: 安全沙箱衝突
  7. RPC Fault faultString="MessagingError message='Destination 'fluorine' 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 'fluorine'"...:FluorineFX沒配置或destination 沒有定義channels(默認是fluorine),詳見配置支持Fluorine Remoting的Web應用
  8. ReferenceError: Error #1056: 無法為 ...創建屬性...:當使用[RemoteClass(alias="XXX")],客戶端與服務器端Value Object映射時屬性名不一致。

二、Http Service

  1. faultCode:Server.Proxy.Request.Failed faultString:'HTTP/1.1 404 Not Found' faultDetail:'HTTP/1.1 404 Not Found':url錯誤。
  2. faultCode:Channel.Security.Error faultString:'Security error accessing url' faultDetail:'Destination: DefaultHTTP':不使用代理時遇到安全沙箱衝突。
  3. The URL specified XXX is not allowed by the selected destination 'DefaultHTTP:使用默認終端代理時遇到安全沙箱衝突。
  4. No destination with id XXX is registered with any service/MessagingError message='Destination 'students' either does not exist or the destination has no channels defined (and the application does not define any default channels.)':.使用命名終端代理時,destination不一致。

【下列文章您可能也有興趣】

1 則留言:

阿咩 提到...

你好~
我也初學 FLEX
希望可以跟你交流交流

交換個 MSN 可以討論討論
heydod@hotmail.com

我的部落格
:: corAusir :: 程式逗設計
http://blog.corAusir.org