0 Replies Latest reply on Sep 18, 2007 10:36 AM by dlusignan

    RemoteObject (Java) Problem

    dlusignan
      Hi! I'm trying to call a Java method from a RemoteObject and I'm getting this:

      [MessagingError message='Destination 'imagesDestination' has no channels defined and the application does not define any default channels.

      Here's the remote-config.xml :

      <?xml version="1.0" encoding="UTF-8"?>
      <service id="remoting-service"
      class="flex.messaging.services.RemotingService">

      <adapters>
      <adapter-definition id="java-object" class="flex.messaging.services.remoting.adapters.JavaAdapter" default="true"/>
      </adapters>

      <default-channels>
      <channel ref="my-amf"/>
      </default-channels>

      <destination id="imagesService">
      <properties>
      <source>org.fmoq.congres.images.ImagesService</source>
      <scope>application</scope>
      </properties>
      </destination>
      </service>

      Here's the fles code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:TitleWindow
      xmlns:mx=" http://www.adobe.com/2006/mxml"
      layout="absolute"
      width="576" height="434"
      showCloseButton="true"
      close="PopUpManager.removePopUp(this)"
      title="Selection d'image">

      <mx:RemoteObject
      id="imagesObject"
      destination="imagesDestination"
      fault="Alert.show(event.fault.faultString, 'Erreur')"
      result="initImagesHandler(event)"/>

      <mx:Script>
      <![CDATA[
      import mx.controls.Alert;
      import mx.rpc.events.ResultEvent;
      import mx.managers.PopUpManager;
      import mx.collections.ArrayCollection;

      [Bindable]
      public var listImage:ArrayCollection = new ArrayCollection();

      private function initImages():void {

      imagesObject.getAllImages();
      }

      private function initImagesHandler(event:ResultEvent):void {

      listImage = event.result as ArrayCollection;
      }
      ]]>
      </mx:Script>




      <mx:VBox x="0" y="0" width="100%" height="100%" paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5">
      <mx:TileList
      width="100%" height="100%"
      id="imageList" direction="vertical"
      itemRenderer="renderer.Images"
      itemDoubleClick="onSelectionChange(event)">
      </mx:TileList>

      <mx:Button id="btnGetImages" click="initImages()" label="Ouvrir"/>
      </mx:VBox>
      </mx:TitleWindow>

      In this application I use a lot of data management. Does this could interact with the Remoting services?

      Anyway any help will be appreciated. Thx