When I have seen this before, the problem is because the LC DS swcs
(rpc.swc and fds.swc) are being linked into a module and not the main
swf.  It may be that if you put the RemoteObject references into the
main swf, that by itself is enough to make those classes get linked in
there and so that is why it works.  If you put some references to those
classes in the main swf, it may also just then "work" in the module as
well?  

 

Jeff

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Robert Csiki
Sent: Wednesday, November 07, 2007 12:12 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] RemoteObject call does not get through if called
by a Module

 

Hi there,

I have an app that loads a module. The module then instantiates a
RemoteObject with a valid LCDS destination, and then invokes one of its
methods. The method does not get invoked on LCDS side and an error is
displayed on thwe client

TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to mx.messaging.messages.IMessage.

The exact same RemoteObject piece of code, if executed by the main
application works fine. Any ideas?

>From the client logs everything looks fine, but apparently LCDS
complains the destination is not set! Attaching the client and server
logs here. THANKS!

****** client log *******

[SWF] /MediaSpace/MediaSpace-debug.swf - 1,384,914 bytes after
decompression
[SWF] /MediaSpace/LcdsServiceModule.swf - 551,559 bytes after
decompression
11/7/2007 15:04:09.265 [INFO] mx.messaging.Consumer
'cds-consumer-repositoryObjectAssembler-null' consumer set destination
to 'repositoryObjectAssembler'.
11/7/2007 15:04:09.281 [INFO] mx.messaging.Producer
'2F565DFD-EB9B-8C76-38CC-1BB66FC18B6D' producer set destination to
'repositoryObjectAssembler'.
11/7/2007 15:04:09.281 [INFO] mx.messaging.Producer
'BF892509-4259-389C-EBC2-1BB66FC11BD5' producer set destination to
'repositoryService'.
11/7/2007 15:04:09.843 [INFO] mx.messaging.Producer
'BF892509-4259-389C-EBC2-1BB66FC11BD5' producer sending message
'A76819C5-A5BC-7E08-29D0-1BB671F3BC94'
11/7/2007 15:04:09.843 [INFO] mx.messaging.Channel 'my-amf' channel
endpoint set to http://localhost:8080/MediaSpace/messagebroker/amf
<http://lo!%0d%0a%20calhost:8080/MediaSpace/messagebroker/amf> 
11/7/2007 15:04:09.843 [INFO] mx.messaging.Channel 'my-amf' channel
settings are:
<channel id="my-amf" type="mx.messaging.channels.AMFChannel">
  <endpoint
uri="http://{server.name}:{server.port}/MediaSpace/messagebroker/amf"/
<http://%7bserver.name%7d:%7bserver.port%7d/MediaSpace/messagebroker/amf
> >
  <properties>
    <polling-enabled>false</polling-enabled>
  </properties>
</channel>
LcdsRemoteService.isConnected() ends.
11/7/2007 15:04:09.875 [DEBUG] mx.messaging.Channel 'my-amf' pinging
endpoint.
11/7/2007 15:04:09.968 [INFO] mx.messaging.Channel 'my-amf' channel is
connected.
11/7/2007 15:04:09.968 [DEBUG] mx.messaging.Channel 'my-amf' channel
sending message:
(mx.messaging.mes! sages::RemotingMessage)#0
  body = (Array)#1! 
&nbs p; clientId = (null)
  destination = "repositoryService"
  headers = (Object)#2
  messageId = "A76819C5-A5BC-7E08-29D0-1BB671F3BC94"
  operation = "isConnected"
  source = (null)
  timestamp = 0
  timeToLive = 0
11/7/2007 15:04:10.015 [INFO] mx.messaging.Producer
'BF892509-4259-389C-EBC2-1BB66FC11BD5' producer connected.
TypeError: Error #1034: Type Coercion failed: cannot convert
[EMAIL PROTECTED] to mx.messaging.messages.IMessage.

****** LCDS log *********

[Flex] 11/07/2007 15:04:09.890 [INFO] [Endpoint.General] Channel
endpoint my-amf received request.
[Flex] 11/07/2007 15:04:09.890 [DEBUG] [Message.Command.client_ping]
Executed command: (default service)
  commandMessage: Flex Message (flex.messaging.messages.CommandMessage) 
    operation = client_ping
    clientId = F9A86CA5-0228-EEB6-F244-170023DEAFD6
    correlationId = 
    destination = 
    messageId = E23E8A77-F21B-D2CE-146D-1BB67213E1AF
    timestamp = 1194465849890
    timeToLive = 0
    body = {}
    hdr(DSEndpoint) = my-amf
    hdr(DSId) = nil
  replyMessage: Flex Message
(flex.messaging.messages.AcknowledgeMessage) 
    clientId = F9A86CA5-0228-EEB6-F244-170023DEAFD6
   ! ; correlationId = E23E8A77-F21B-D2CE-146D-1BB67213E1AF
    destination = null
    messageId = F9A86CA5-023B-5053-30E8-CD3D2DC36D3F
    timestamp = 1194465849890
    timeToLive = 0
    body = null
    hdr(DSId) = F9A86CA5-021A-96A3-CE8B-BD49472316ED

[Flex] 11/07/2007 15:04:10.031 [INFO] [Endpoint.General] Channel
endpoint my-amf received request.
[Flex] 11/07/2007 15:04:10.031 [ERROR] [Message.General] Exception when
invoking service: (none)
  with message: Flex Message (flex.messaging.messages.RemotingMessage) 
    operation = null
    clientId = F9A86DFD-3F0C-37E6-EE2C-38C345001F58
    destination = null
    messageId = 
    timestamp = 1194465850031
    timeToLive = 1194465850031
    body = null
    hdr(DSEndpoint) = my-amf
  exception: flex.messaging.MessageException: No destination with id
'null' is registered with any service.

[Flex] 11/07/2007 15:04:10.031 [ERROR] [Message.General] Error handling
message: flex.messaging.MessageException: No destination with id 'null'
is registered with any service.
  incomingMessage: Flex Message
(flex.messaging.messages.RemotingMessage) 
    operation = null
    clientId = F9A86DFD-3F0C-37E6-EE2C-38C345001F58
    destination = null
    messageId = 
    timestamp = 1194465850031
    timeToLive = 1194465850031
    body = null
    hdr(DSEndpoint) = my-amf
  errorReply: Flex Message (flex.messaging.messages.ErrorMessage) 
    clientId = F9A86DFD-3F0C-37E6-EE2C-38C345001F58
    correlationId = 
    destination = null
    messageId = F9A86DFD-3F1B-AC18-C3E5-86BEF3490008
 ! ;   timestamp = 1194465850031
    timeToLive = 0
    body = null
    code =  Server.Processing
    message =  No destination with id 'null' is registered with any
service.
    details =  null
    rootCause =  null
    body =  null
    extendedData =  null

 

Reply via email to