Usually all webservice data classes need to be in the main applicationdomain.
Alex Harui Flex SDK Developer Adobe Systems Inc.<http://www.adobe.com/> Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of poweribo Sent: Tuesday, August 18, 2009 12:09 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Generated code not working when app is loaded as module anyone with idea? --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, "poweribo" <power...@...> wrote: > > I used Flexbuilder to generated the proxy code for my webservices and > my app works perfectly as standalone swf file but when I load it as a module > (loaded from another main swf file), it throws these kind of errors (see > below). I tried declaring and instantiating the objects in question, also > made sure are using public. I dont have custom utility function for calling > getDefinitionByName() as well. but im getting the same errors. Does any one > have a fix or workaround for this? > > --------------------- > > ReferenceError: Error #1065: Variable MyObject is not defined. > at global/flash.utils::getDefinitionByName() > at > mx.rpc.xml::SchemaTypeRegistry/getClass()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SchemaTypeRegistry.as:82] > at > mx.rpc.xml::XMLDecoder/createContent()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\XMLDecoder.as:1832] > at > mx.rpc.xml::XMLDecoder/decode()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\XMLDecoder.as:161] > at > mx.rpc.soap::SOAPDecoder/decodeBody()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:452] > at > mx.rpc.soap::SOAPDecoder/decodeEnvelope()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:304] > at > mx.rpc.soap::SOAPDecoder/decodeResponse()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:236] > at webservices.trademanager::BaseTradeManagerService/processResult() > at mx.rpc::AsyncResponder/result() > at > mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74] > at > DirectHTTPMessageResponder/completeHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:381] > at flash.events::EventDispatcher/dispatchEventFunction() > at flash.events::EventDispatcher/dispatchEvent() > at flash.net::URLLoader/onComplete() >