Perhaps your SiteKeywordVO is never linked into the SWF because you never create a dependency on the class name (as mxmlc will optimize and remove unreferenced class definitions). An import statement is not enough to create a dependency.
-----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Geoffrey Sent: Tuesday, April 18, 2006 3:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RemoteObject Issue I've been trying for the last few days to get RemoteObject to work, but with little luck. I've searched this site, and have tried to implement the examples found in "developing rich clients with macromedia FLEX". To make matters more confusing, I've also tried to implement the command/control/delegate patterns that the above book advocates. Basically, I think the problem is that I'm not "seeing" the Java classes I've created. Below are code snippets of (what I think) are the relevant files. ### My Java classes ### {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\business\SiteMaintenanceDelegate.class package com.foo.test.business; import com.foo.test.vo.SiteKeywordVO; public class SiteMaintenanceDelegate { public SiteMaintenanceDelegate() { } public SiteKeywordVO reviewKeywords() { SiteKeywordVO keywords = new SiteKeywordVO(); return keywords; } } {TOMCAT-HOME}\webapps\flex\WEB- INF\classes\com\foo\test\vo\SiteKeywordVO.class package com.foo.test.vo; import java.io.Serializable; public class SiteKeywordVO implements Serializable { public String[] keywords; public void SiteKeywordVO() { String[] keywords = {"first agr", "second agr", "third agr"}; } } ### My RO definition ### {TOMCAT-HOME}\webapps\flex\services\Services.mxml <mx:RemoteObject id="siteDataServices" source="com.foo.test.business.SiteMaintenanceDelegate" result="event.call.resultHandler(event)" fault="event.call.faultHandler(event)" showBusyCursor="true"> <mx:method name="reviewKeywords"/> </mx:RemoteObject> ### My ActionScript VO ### {TOMCAT-HOME}\webapps\flex\sdm\com\foo\test\vo\SiteKeywordVO.as class com.foo.test.vo.SiteKeywordVO { public var keywords:Array; public var _remoteClass; public function SiteKeywordVO() { _remoteClass="com.foo.test.vo.SiteKeywordVO"; } } ### My testing mxml file ### {TOMCAT-HOME}\webapps\flex\sdm\sdmUnitTest.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" xmlns:sdm="sdm.*" xmlns:services="services.*" <sdm:SiteDataMaint/> <services:Services id="myServices"/> </mx:Application> ### My SiteDataMaint component ### {TOMCAT-HOME}\webapps\flex\sdm\SiteDataMaint.mxml ... //just the script part <mx:Script> <![CDATA[ import sdm.business.*; import sdm.commands.*; import sdm.control.*; import com.foo.test.vo.*; import mx.controls.Alert; public function initApp() { var controller = new SDMController; } ]]> </mx:Script> ... The SDMController class seems to be working correctly. ### My Delegate class ### {TOMCAT-HOME}\webapps\flex\sdm\business\SDMDelegate.as ... //just the constructor public function SDMDelegate(responder:Responder) { this.service = mx.core.Application.application.myServices.siteDataServices; Dumper.dump(service); this.responder = responder; } I think this is where the problem is. When I dump 'service' (via Flex Trace Panel), I get 'undefined'. I really have no idea where to go from here. I've tried turning on all debug stuff, used NetConnectionDebugger, use Flex Trace Panel... nothing on all accounts. Thanks for any suggestions you may have! Geoff -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/