Remote object call from module with different context

[Bindable]protected var service:mx.rpc.remoting.RemoteObject;           


private var urlReq:String=URLUtil.getServerNameWithPort(FlexGlobals.topLevelApplication.url) + ‘/’;

private var urlProtocol:String=URLUtil.getProtocol(FlexGlobals.topLevelApplication.url) + ‘://’;

private function setRPCService(destination:String):void

                 service = new RemoteObject();
                  service.destination = destination ;


                   service.endpoint= urlProtocol+urlReq+context+’/messagebroker/amf’;

                  //for ex: urlProtocol+urlReq+’homecare/messagebroker/amf’; where homecare is context



setRPCService(delegate name );               

service.showBusyCursor = true;
         var rpcCall:AsyncToken;
         rpcCall = service.methodname(request parameter);
         rpcCall.addResponder(new mx.rpc.Responder(ResultHandler, FaultHandler));

  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: