1 Reply Latest reply on Aug 17, 2006 7:44 AM by aBill

    how to set MessageAgent's destination for remoteObject?

    mounte
      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. Re: how to set MessageAgent's destination for remoteObject?
          aBill Level 1
          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