[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