Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

how to set MessageAgent's destination for remoteObject?

Avatar

Level 1
Hi,

i am trying to make the remoteobject work on my mxml. but i
got this error



[RPC Fault faultString="[MessagingError message='The
MessageAgent's destination must be set to send messages.']"
faultCode="InvokeFailed" faultDetail="Couldn't establish a
connection to ''"]

at mx.rpc::AbstractInvoker/
http://www.adobe.com/2006/flex/mx/internal::invoke()

at mx.rpc.remoting.mxml::Operation/
http://www.adobe.com/2006/flex/mx/internal::invoke()

at mx.rpc.remoting::Operation/send()

at Function/
http://adobe.com/AS3/2006/builtin::apply()

at mx.rpc.remoting.mxml::Operation/send()

at Function/
http://adobe.com/AS3/2006/builtin::apply()

at mx.rpc::AbstractService/
http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()

at RALogging1/___Button1_click()



this is the part of my mxml and the error pops up when the
button is clicked. i have a javaclass "LogManager" under
WEB-INF\classes\ra\logging. so i think i need to do something on
some config xml. what do i need to do?



ra.logging.LogManager :

<mx:RemoteObject id="logMgr"
source="ra.logging.LogManager"
fault="Alert.show(event.fault.faultString, 'Error');">

<mx:method name="getList"/>

</mx:RemoteObject>



<mx:HBox>

<mx:Button label="Get Log List"
click="logMgr.getList()"/>



</mx:HBox>

1 Reply

Avatar

Level 3
hi

In WEB-INF/flex, there is a remote-config.xml. You should
defined a destination there. Without the destination, remoteobject
has not enough information to establish its connection such as
which channel to use. Following are examples of destinations and
remoteObject:



1. use default channels defined



<destination id="BlobInObj">

<properties>

<source>qa.sql.BlobInObj</source>

</properties>

</destination>



2. not using default channels

<destination id="BlobInObj" channels="my-amf,my-rtmp">

<properties>

<source>qa.sql.BlobInObj</source>

</properties>

</destination>



<RemoteObject destination="BlobInObj" id="ro"/>



Hope the above info help!

Thanks!



William Chan