FLEX4+Lcds(BlazDS)与JAVA通讯错误
引用Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080//WebContent/messagebroker/amf'
或者?
引用[FaultEvent fault=[RPC Fault faultString="Send failed"??? faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'http://localhost:8080/WebContent/messagebroker/amf'"] messageId="C25D6E12-4A22-9827-849A-C56BBBB434F4" type="fault" bubbles=false cancelable=true eventPhase=2]
解决方案如下:?
Mxml代码??
- <mx:RemoteObject?id="firstRO"?destination="Flexweb"?fault="faultEvent(event)"???
- endpoint="http://localhost:8080/FlexDemo/messagebroker/amf"/>???
此处一定要有endpoint的属性,后面的值可参照上面的错误的URL,但要将其WebContent 改为你的项目名称.也就是Context root(输出文件夹)?
然后右击你的项目名称--->Properties--->Flex Server(Flex服务器)-->Context root(输出文件夹)设置为FlexDemo,也就是你的项目名称。?
?