Hi,
Not using ColdFusion I'm trying to retrieve login
related data from the server through RemoteObject, and getting this
fault error message
faultCode:InvokeFailed
faultString:'[MessagingError
message='Unknown destination 'mylogin'.']'
faultDetail:'Couldn't establish a
connection to 'mylogin''
However the destination of 'mylogin' is
defined in remoting-config.xml. I did a little testing without using
Cairngorm and it works fine with following tag
<mx:RemoteObject id="loginService"
result="resultHandler(event)"
destination="mylogin" fault="faultHandler(event)" <mx:method name="LoginService" results="resultHandler(event)">
<mx:arguments>
<p_login>{loginVO}</p_login>
</mx:arguments>
</mx:method>
</mx:RemoteObject>
Am I missing something? My
program follows the typical Cairngorm flow as below:
1. Services.mxlm
<mx:RemoteObject id="loginService"
destination="mylogin" result="event.token.resultHandler(event)" fault="event.token.faultHandler(event)" showBusyCursor="true" > </mx:RemoteObject> 2. LoginDelegate.as
public class
LoginDelegate
{ private var responder : Responder; private var service : AbstractService; public function LoginDelegate(
p_responder : Responder )
{ this.service = ServiceLocator.getInstance().getService( "loginService" ); this.responder = p_responder; } public function login( p_loginVO : LoginVO ): void { var call:AsyncToken = service.LoginService(p_loginVO); call.resultHandler =
responder.onResult;
call.faultHandler = responder.onFault; } }
3. LoginEvent.as
public class LoginEvent extends
CairngormEvent
{ public static const EVENT_LOGIN : String = "login"; public var loginVO : LoginVO; public function LoginEvent( p_loginVO : LoginVO )
{ super( EVENT_LOGIN, false, true ); this.loginVO = p_loginVO; } } 4. LoginCommand.as
public function execute( p_event
: CairngormEvent ) : void
{ var delegate : LoginDelegate = new LoginDelegate( this ); var loginEvent : LoginEvent = LoginEvent( p_event ); delegate.login( loginEvent.loginVO ); } public function onResult( event : * = null ) : void { .... }
public function onFault( event :
* = null ) : void
{ .... }
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
__,_._,___ |