3 Replies Latest reply on May 7, 2007 6:44 AM by aBill

    Flex 2 Java Remote Object

    yxz07
      Hi,

      I'm new to flex 2 and try to use java remote object. I used the simpleService given in the default flex app and have a app as following:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute"
      creationComplete="myRemoteObject.outMethod()">
      <mx:RemoteObject id="myRemoteObject" destination="simpleService" showBusyCursor="true"/>
      </mx:Application>

      It raised the following exception when running it:
      [RPC Fault faultString="[MessagingError message='Unknown destination 'simpleService'.']" faultCode="InvokeFailed" faultDetail="Couldn't establish a connection to 'simpleService'"]
      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 roRPCJava/___Application1_creationComplete()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.core::UIComponent/set initialized()
      at mx.managers::LayoutManager/::doPhasedInstantiation()
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.core::UIComponent/::callLaterDispatcher2()
      at mx.core::UIComponent/::callLaterDispatcher()

      I checked the remoting-config.xml, it has the proper destination configured and also saw the data server displays the SimpleService was passed upon startup.

      Any clue what could be missing?

      Thanks in advance for any help.