Expand my Community achievements bar.

Using <mx:RemoteObject>

Avatar

Former Community Member
Hi There,

I was trying "Daniel Harfleet's" sample example , where he
is showing how to integrate Java and Flex using a simple RPC
example. I followed the steps, but I am getting an error on the
Server console.

My Flex application is deployed on JBoss server 4.0.5.

I've made sure that the java class is compiled and is in
placed in the WEB-INF/classes directory of my Flex application.




This is how the remoteobject tag looks in my sample.mxml
file




<mx:RemoteObject

id="echoRO"

destination="echoService"

fault="handleFault(event)"

result="handleResult(event)" />



============




This is how the entry in the remote-config.xml looks



<default-channels>

<channel ref="my-amf"/>

</default-channels>





<destination id="echoService">

<properties>

<source>fdsweb.EchoService</source>

<scope>application</scope>

</properties>

</destination>



==========




So, when I try to access the application deployed in the JBoss,
it throws the following error on the console.




22:59:59,484 INFO [STDOUT] [Flex] [ERROR] Exception when
invoking service: remo

ting-service

with message: Flex Message
(flex.messaging.messages.RemotingMessage)

operation = echo

clientId = 4A82830C-BC09-C972-DEFB-361367B86F0E

destination = echoService

messageId = C4DFD400-5B97-AB88-DFD7-80D2BD155FFC

timestamp = 1170392399484

timeToLive = 1170392399484

body = null

hdr(DSEndpoint) = my-amf

exception: flex.messaging.MessageException: No destination
'echoService' exist

s in service flex.messaging.services.RemotingService

22:59:59,500 INFO [STDOUT] [Flex] [ERROR] Error handling
message: flex.messagin

g.MessageException: No destination 'echoService' exists in
service flex.messagin

g.services.RemotingService

incomingMessage: Flex Message
(flex.messaging.messages.RemotingMessage)

operation = echo

clientId = 4A82830C-BC09-C972-DEFB-361367B86F0E

destination = echoService

messageId = C4DFD400-5B97-AB88-DFD7-80D2BD155FFC

timestamp = 1170392399484

timeToLive = 1170392399484

body = null

hdr(DSEndpoint) = my-amf

errorReply: Flex Message
(flex.messaging.messages.ErrorMessage)

clientId = null

correlationId = C4DFD400-5B97-AB88-DFD7-80D2BD155FFC

destination = echoService

messageId = 4A828333-CC08-81C5-E391-08512AA44718

timestamp = 1170392399500

timeToLive = 0

body = null

code = Server.Processing

message = No destination 'echoService' exists in service
flex.messaging.ser

vices.RemotingService

details = null

rootCause = null

body = null

extendedData = null




Could someone , please let me know as to what I am missing.

-Regards

2 Replies

Avatar

Level 3
As it seems, your destination is configured so it's likely to
be a configuration problem.



1) Are you sure your JBoss has been properly configured? This
document shows how:
http://www.adobe.com/support/documentation/en/flex/2/install.html#jboss



2) An FDS application is composed by several XML files, JAR
files and so son... To ensure your application will have all
packages needed, it's recommended to start it from samples.war
provided in FDS instalation. Are you doing it? I mean, don't start
your application from scratch, append your destination
configuration to an existing remoting-config and ad your classes to
the classes directory



3) If it doesn't work let me know

Avatar

Former Community Member
Thanks, it worked as mentioned. Rather, than creating the
application from scratch, I used the samples.war file as a startup.
Seems, I was missing some configuration. Anyways, thanks for the
reply