Thanks Jeff. I added the extra debug patterns in LCDS, and made some progress (actually I got things working), but I still need some answers.
First, it turned out the alias for flex.messaging.messages.RemotingMessage is not registered in my Module. so when my module's RemoteObject is sending out a RemotingMessage, and because it has no alias the LCDS does not properly map it into a flex.messaging.messages.RemotingMessage Ok, now...one single line of code added into my Module's constructor has fixed the whole problem. It is: registerClassAlias("flex.messaging.messages.RemotingMessage", mx.messaging.messages.RemotingMessage); The first question is why do I need to manually register this class alias for a Module? It is not required for the case the whole LCDS communication is done from the Flex main application. Is there a way to instruct the compiler to include this class alias registration at the Module compilation time? Is this the only class that needs to be explicitly registered in module to have things working, or I'll encounter further issues as I'll progress with the development? The second thing is the 2 messaging swcs (rpc.swc and fds.swc) have to be linked as merged into code on my Module project (which is an ActionScript project in FlexBuilder) otherwise the above statement will throw an exception. So linking them as "external" won't work. Will that be an issue? I remember you saying it's important having these libraries linked as External to the module.. but as I said, some aliases are not visible to my module and I already had to explicitly register one to have things working.. Thanks, Robert --- In flexcoders@yahoogroups.com, "Jeff Vroom" <[EMAIL PROTECTED]> wrote: > > This does seem strange. There are a few tricks you can use to get more > details. On the server, the debug logging configuration is set via the > WEB-INF/flex/services-config.xml file (set level="Debug" and the > <pattern> tags below control which patterns are logged). The > "Endpoint.*" pattern will show the details of the serialization process > including the "alias" sent over from the player. > > > > The other thing that would be interesting is on the client side to check > the "aliases" registered for these Message classes. If the server > responds with an instance of a class like > mx.messaging.messages.AcknowledgeMessage and there is no alias for that > class in the SWF, it will come back as an "Object" and you get those > type casting errors. There is the "describeType" call in the player > apis which lists the info for a given class and the > mx.utils.ObjectUtil.getClassInfo method uses that to return this info in > a form that is easier to use from ActionScript. > > > > When we build the swcs such as rpc.swc and fds.swc which include message > classes, we use a trick so that any swf that links against that swc > should include versions of the "message" classes. Their aliases should > also get registered at that time. > > > > I believe that aliases are visible across the player instance and not > isolated for a module so it might be possible for a module to get loaded > that registers an alias for a class loaded via another domain. That is > one reason it is important to ensure only the main swf links in the > Message classes. The other swfs should treat those swcs as external > libraries. > > > > Jeff > > > > ________________________________ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Robert Csiki > Sent: Wednesday, November 07, 2007 12:59 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Re: RemoteObject call does not get through if > called by a Module > > > > > > I have the 2 SWC's linked to both projects: the main one and the Module > one (project's library path). Isn't it strange the client log reports a > message being sent that includes a destination ("repositoryService"), > and an operation ("isConnected") and the server simply says the > destination is received as 'null' and it can't be resolved (also the > operation is received as 'null')?? How can I get to see more debug > details on the LCDS side? Looks like the message the client sends is > losing its integrity on its way to the server? I'm lost here. > > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > , "Jeff Vroom" jvroom@ wrote: > > > > 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:flexcoders%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > ] > On > > Behalf Of Robert Csiki > > Sent: Wednesday, November 07, 2007 12:12 PM > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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://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 > <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 > > >