Question
Problems using BlazeDS and actionscript (no Flex)
Hopefully somebody here can help - I've been going around in circles for a couple of days now.
I'm trying to preform a RemoteObject invocation again BlazeDS. I've seen many examples that allegedly work but I just cant get it to. I'm using Flex 3 SDK and recommended turnkey build.
When I execute this client code (I've omitted the event handler functions):
var swfURL:String = this.loaderInfo.url;
LoaderConfig.mx_internal::_url = this.loaderInfo.url;
LoaderConfig.mx_internal::_parameters = this.loaderInfo.parameters;
var amfChannel:AMFChannel = new AMFChannel(null, "http://localhost:8400/hello/messagebroker/amf");
amfChannel.requestTimeout = 3;
amfChannel.connectTimeout = 3;
var channelSet:ChannelSet = new ChannelSet();
channelSet.addChannel( amfChannel );
amfChannel.addEventListener(ChannelFaultEvent.FAULT, handleChannelFault);
amfChannel.addEventListener(ChannelEvent.CONNECT, handleChannelConnect);
amfChannel.addEventListener(ChannelEvent.DISCONNECT, handleChannelDisconnect);
ro = new RemoteObject();
ro.destination = "Hello";
ro.channelSet = channelSet;
ro.addEventListener(ResultEvent.RESULT, onResult);
ro.addEventListener(FaultEvent.FAULT, onFault);
ro.getOperation("sayHello").send();
I get this on the client side:
TypeError: Error #1034: Type Coercion failed: cannot convert Object@13e9921 to mx.messaging.messages.ErrorMessage.
The error event on the client says:
rootCause = (mx.messaging.events::ChannelFaultEvent)#3
On the server I get this logging:
[BlazeDS] FlexSession created with id '773A4F225C1C65663B09BB8DD3E35334' for an
Http-based client connection.
[BlazeDS] Channel endpoint hello-amf received request.
[BlazeDS] Deserializing AMF/HTTP request
Version: 3
(Message #0 targetURI=null, responseURI=/1)
(Array #0)
[0] = (Object #0)
operation = 5
correlationId = ""
timeToLive = 0
timestamp = 0
destination = ""
headers = (Object #1)
DSMessagingVersion = 1
DSId = "nil"
clientId = null
messageId = "2CAC2BEC-4C0F-AE41-12DD-E0C5824EF4D3"
body = (Object #2)
[BlazeDS] Serializing AMF/HTTP response
Version: 3
(Header #0 name=AppendToGatewayUrl, mustUnderstand=false)
";jsessionid=773A4F225C1C65663B09BB8DD3E35334"
(Message #0 targetURI=/1/onStatus, responseURI=)
(Object #0)
code = "Server.Processing"
rootCause = null
message = "No destination with id 'null' is registered with any service."
details = null
[BlazeDS] FlexSession with id 'A66B450C6CDA5EB573942ECA2FA6C978' for an Http-based client connection has been invalidated.
You can see it says seems to think the destination = null but it is being set in the client code....
Any help will be greatly appreciated!
I'm trying to preform a RemoteObject invocation again BlazeDS. I've seen many examples that allegedly work but I just cant get it to. I'm using Flex 3 SDK and recommended turnkey build.
When I execute this client code (I've omitted the event handler functions):
var swfURL:String = this.loaderInfo.url;
LoaderConfig.mx_internal::_url = this.loaderInfo.url;
LoaderConfig.mx_internal::_parameters = this.loaderInfo.parameters;
var amfChannel:AMFChannel = new AMFChannel(null, "http://localhost:8400/hello/messagebroker/amf");
amfChannel.requestTimeout = 3;
amfChannel.connectTimeout = 3;
var channelSet:ChannelSet = new ChannelSet();
channelSet.addChannel( amfChannel );
amfChannel.addEventListener(ChannelFaultEvent.FAULT, handleChannelFault);
amfChannel.addEventListener(ChannelEvent.CONNECT, handleChannelConnect);
amfChannel.addEventListener(ChannelEvent.DISCONNECT, handleChannelDisconnect);
ro = new RemoteObject();
ro.destination = "Hello";
ro.channelSet = channelSet;
ro.addEventListener(ResultEvent.RESULT, onResult);
ro.addEventListener(FaultEvent.FAULT, onFault);
ro.getOperation("sayHello").send();
I get this on the client side:
TypeError: Error #1034: Type Coercion failed: cannot convert Object@13e9921 to mx.messaging.messages.ErrorMessage.
The error event on the client says:
rootCause = (mx.messaging.events::ChannelFaultEvent)#3
On the server I get this logging:
[BlazeDS] FlexSession created with id '773A4F225C1C65663B09BB8DD3E35334' for an
Http-based client connection.
[BlazeDS] Channel endpoint hello-amf received request.
[BlazeDS] Deserializing AMF/HTTP request
Version: 3
(Message #0 targetURI=null, responseURI=/1)
(Array #0)
[0] = (Object #0)
operation = 5
correlationId = ""
timeToLive = 0
timestamp = 0
destination = ""
headers = (Object #1)
DSMessagingVersion = 1
DSId = "nil"
clientId = null
messageId = "2CAC2BEC-4C0F-AE41-12DD-E0C5824EF4D3"
body = (Object #2)
[BlazeDS] Serializing AMF/HTTP response
Version: 3
(Header #0 name=AppendToGatewayUrl, mustUnderstand=false)
";jsessionid=773A4F225C1C65663B09BB8DD3E35334"
(Message #0 targetURI=/1/onStatus, responseURI=)
(Object #0)
code = "Server.Processing"
rootCause = null
message = "No destination with id 'null' is registered with any service."
details = null
[BlazeDS] FlexSession with id 'A66B450C6CDA5EB573942ECA2FA6C978' for an Http-based client connection has been invalidated.
You can see it says seems to think the destination = null but it is being set in the client code....
Any help will be greatly appreciated!
