I try to connect blazeDS in actionscript project with the following code:
ro = new RemoteObject();
var cs:ChannelSet = new ChannelSet();
cs.addChannel(new AMFChannel("my-amf", "http://localhost:8080/Ninja/messagebroker/amf"));
ro.channelSet = cs;
ro.destination = "test";
ro.source = "me.qiankanglai.test";
ro.addEventListener(ResultEvent.RESULT,r1);
ro.addEventListener(FaultEvent.FAULT,r2);
ro.sayHello();
But I cannot connect the server. I make a new flex project and the works well. I use chrome to see the connection detail(Request Payload are different from the very beginning)
The actionscript project:
The flex project:
In fact, I got an error from the actionscript project:
TypeError: Error #1034: Type Coercion failed: cannot convert Object@5bec0b9 to mx.messaging.messages.ErrorMessage.
I don't know what's the differenct between these two ways of remoteobject.