AIR:Client.Error.MessageSend AIR: Client.Error.MessageSend
04月8th, 2008 — Dreamer 04月8 th, 2008 - Dreamer昨天做毕业设计的时候遇到了一个问题,就是在AIR中我使用RemoteObject 调用JAVA对象的时候总是无法调用,用Alert把错误信息弹了出来,如下: Yesterday, the time to do graduate design encountered a problem, that is, in the AIR in JAVA I use RemoteObject call when the object is always unable to call, and Alert to bomb out the wrong message, as follows:
faultCode:Client.Error.MessageSend faultCode: Client.Error.MessageSend
faultString:’Send failed’ faultString: 'Send failed'
faultDetail:’Channel.Connect.Failed error NetConnection.Call.BadVersion: : url:’http://ontactManager.swf/samples/messagebroker/amf” faultDetail: 'Channel.Connect.Failed error NetConnection.Call.BadVersion:: url:' http://ontactManager.swf/samples/messagebroker/amf "
服务器端我用的是Blazeds—— Adobe做的一个开源的类似于FDS的东西,一开始我百思不得其解啊,以前从来没有遇到过这种错误啊,仔细检查了一下Blazeds的配置文件和RemoteObject的destination属性也没有发现错误。 I use the server side is Blazeds - Adobe to do a revenue similar to FDS things, at the beginning I remained puzzled despite much thought, ah,'ve never had such a mistake, ah, double-check the configuration of the Blazeds RemoteObject documents and the destination attributes also found no error. 无奈,只好Google之,虽然没有搜索到答案,但是我发现别人写RemoteObject的时候用到了一个属性:endpoint,其实这个属性是在Blazeds 或者FDS 的配置文件中是已经有默认定义的,一般都在WEB-INF\ flex \services-config.xml 中定义的,RemoteObject默认的信息传送channel是“my-amf”,而在services-config.xml有如下定义: Unfortunately, only Google's, although no search for answers, but I found that when people write RemoteObject used an attribute: endpoint, in fact, this attribute is Blazeds or FDS in the profile is already defined by default, are generally in WEB - INF \ flex \ services-config.xml in the definition, RemoteObject default message channel is "my-amf", and in services-config.xml the following definition:
《channel-definition id=”my-amf” class=”mx.messaging.channels.AMFChannel”/》 "Channel-definition id =" my-amf "class =" mx.messaging.channels.AMFChannel "/"
《endpoint url=”http://{server.name}:{server.port}/{context.root}/messagebroker/amf” class=”flex.messaging.endpoints.AMFEndpoint” /》 "Endpoint url =" http:// (server.name): (server.port) / (context.root) / messagebroker / amf "class =" flex.messaging.endpoints.AMFEndpoint "/"
blazeds用的是tomcat服务器,如果正常的话其实endpoint应该是http://localhost:8400/samples/messagebroker/amf 的,但是不知道为什么,Flex Builder却自动把我的AIR程序的endpoint默认为http://ontactManager.swf/samples/messagebroker/amf,莫名其妙,于是我自己在程序里定义了RemoteObject 的endpoint 属性,测试了一下,程序OK,哈哈,我学习和探索的能力真强! tomcat blazeds using a server, if it in fact the normal endpoint should be http://localhost:8400/samples/messagebroker/amf, but do not know why, Flex Builder is automatically my AIR procedures for the endpoint default http:/ / ontactManager.swf / samples / messagebroker / amf, baffling, therefore I am in the process, the definition of the endpoint RemoteObject attributes to the test, the procedure OK,. He, I study and exploration of the ability to really strong!
后来又查了一下帮助文档,在Language Reference 里面的对RemoteObject 的endpoint 属性解释后面有这么一句话: Then the inspection is to help document, in the Language Reference RemoteObject on the inside of the explanation behind the endpoint attribute such a word:
Note: This property is required when creating AIR applications. Note: This property is required when creating AIR applications.
也就是说,AIR程序如果使用RemoteObject 的话就必须自己定义endpoint ! In other words, AIR RemoteObject use of the procedure if it must be their own definition of endpoint! 又学会了一点东西,以后记住了。 Also learn a little something to remember the future.
BTW,好久没有体会到编程的乐趣了,昨天忽然找到那种久违的幸福的感觉了,浑身都觉得痛快舒服。 BTW, for a long time did not appreciate the fun of programming, yesterday suddenly found that long-hoped-for happy feeling, every Excitement find uncomfortable. 近一年多我动手编程时间明显不如大一和大二,人文社科的东西学得比较多,总怕自己变得狭隘了。 Over the past year and more programming time to clear my hands as freshman and sophomore year, the Humanities and Social Sciences of things more than the total fear of their becoming a narrow. 现在我得重拾编程的乐趣了,杂七杂八的东西学得差不多了。 Now I have to regain the fun of programming, Zaqizaba of the things almost.
生命已经苏醒,没有什么能阻挡它生根发芽了。 Life has regained consciousness, nothing can stop it by taking root.
本文链接: http://www.zhuoqun.net/html/y2008/982.html 转载请注明出处,谢谢。 This link: http://www.zhuoqun.net/html/y2008/982.html reprint please reference, thank you.
TrackBack引用地址: http://www.zhuoqun.net/html/y2008/982.html/trackback TrackBack used Address: http://www.zhuoqun.net/html/y2008/982.html/trackback



哈哈 . He
我最近试用weborb for php v2.0.2 抽出一个例子单独做了个flex builder 3的工程,指定服务端技术使用php, 清理了remoting-config.xml中的一些配置,只留下例子相关的配置, 编译参数也加上了-services 但是swf老报错trace了一下,得到错误:[FaultEvent fault=[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://127.0.0.1/weborb/weborb.php'"] messageId=”A0C6EE96-236A-855A-9D81-56C2DD2FA819″ type=”fault” bubbles=false cancelable=true eventPhase=2] Recently, I try weborb for php v2.0.2 taking an example of a separate done a flex builder 3 project, designated server technology used php, cleaning up the remoting-config.xml in some configuration, leaving only relevant example of the configuration, the compiler Parametric also added - services but swf trace of the old error, get the wrong: [FaultEvent fault = [RPC Fault faultString = "Send failed" faultCode = "Client.Error.MessageSend" faultDetail = "Channel.Connect.Failed error NetConnection.Call.BadVersion:: url: 'http://127.0.0.1/weborb/weborb.php' "] messageId =" A0C6EE96-236A-855A-9D81-56C2DD2FA819 "type =" fault "bubbles = false cancelable = true eventPhase = 2]
现在自己找不到原因,急死人啊 Now can not find their own reasons, people ah Jisi
你设置一下endpoint ,在Flex Builder中的RemoteObject 里直接设置,别使用默认的。 You set up the endpoint, in Flex Builder of RemoteObject, direct set, do not use the default.
hehe
你好厉害啊 Hello formidable ah
你怎么发现的fb改了你的那个属性啊?在哪个地方发现的啊? How do you find the fb to the attributes that you ah »where found in the ah»
有错误就会提示。 Mistakes will be prompted. 。 .