2 Replies Latest reply on Feb 11, 2007 5:43 PM by mukesh51

    Using <mx:RemoteObject>

    mukesh51
      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