[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultD

在flex+java的时候,运行出现这种错误:

[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8889/WebRoot/messagebroker/amf'"]


解决办法:
1:
最简单的
在<mx:RemoteObject> 里面的属性加上

endpoint="http://localhost:8889/testApp/messagebroker/amf"


2:

[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404:
url: 'http://localhost:8080/WebRoot/messagebroker/amf'"]

当我看到url时发现工程名是'a',但信息提示成了WebRoot,故在工程属性对话框-->Flex Server中的
Root Url -->http://localhost:8080/a
Context Root-->WebRoot 故把WebRoot改成'a',重新编译运行即可。
原因是myeclipse没有把用户某些设置更新过去。


3:

[RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8089/cargps/messagebroker/amf'"]

自己的解决:tomcat配置的虚拟目录错误:
在Tomcat\conf目录下,打开server.xml,在</Host> 之前加上
<Context path="/pro" docBase="工程本地路径\工程名\WebRoot" debug="0" reloadable="true" crossContext="true">
</Context>

path 表示在浏览器中输入http://localhost:8080/pro
docBase表示你的程序包的物理绝对路径,默认的绝对路径是$Tomcat_Home$/webapps
发布了73 篇原创文章 · 获赞 0 · 访问量 5980
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章