Hi Hugo,

please ensure you're using the right RemoteObject version for you.
I think you need mx:RemoteObject that is the emulation of the Flex MX RPC
code that must have all you need.
Other implementations (the one in NetWork lib) are more basic and Royale
oriented. That could be ok for people starting from scratch and not
migrating old backends. But if you already have a backend, I think that
will not work for you.



El vie., 3 jul. 2020 a las 21:39, Hugo Ferreira (<[email protected]>)
escribió:

> Indeed.
> I lost countest hours before posting on the mailing list, only with this
> particular issue (I will not ever forget it).
>
> Yes, I started recreating my Form with features (draggable, resizable,
> minimize/restore) and I'm now evaluating AMF.
> About AMF, I'm worried about the missing requestTimeout,
> convertResultHandler, convertParametersHandler and AsyncToken.
>
> My idea is to do a trial with mini projects resolving specific needs (Form,
> AMF, etc ...) and with these goals achieved, I will have my own Royale
> extension framework (similar to Flex) and all conditions to start
> recreating my application.
> I don't know if I will find a blocker issue.
> Let's see ...
>
>
> <[email protected]> escreveu no dia sexta, 3/07/2020 à(s) 19:42:
>
> > Hugo,
> >
> > You are welcome, I'm happy knowing you can go on on Royale :)
> >
> > The big issue with CORS is that is can fail silently. Some browser
> > doesn't show issue.
> >
> > For your case, one of your screenshoot showed "reset session", but no
> > more... very difficult to know it deals for CORS
> >
> > Perhaps documentation on using AMF with Apache Royale should be more
> > warning of this potential issue for dev guys.
> >
> > Regards
> >
> > Le 03.07.2020 10:41, Hugo Ferreira a écrit :
> >
> > > Hi Fred,
> > >
> > > Thank you very much !
> > > It was a CORS issue !
> > > I'm using Google Chrome in debug mode + Charles Web Proxy.
> > >
> > > Regards,
> > > Hugo.
> > >
> > > <[email protected]> escreveu no dia sexta, 3/07/2020 à(s) 08:57:
> > >
> > > Hi Hugo,
> > >
> > > I'm not sure what is your issue. Did you try to usee developer console
> > > of chrome or firefox (CTRL+MAJ+I) to look at network frames and see
> > > request and server response ?
> > >
> > > Do you have a look at :
> > >
> > >
> >
> https://stackoverflow.com/questions/58241175/how-to-use-amfphp-with-apache-royale
> > >
> > > and
> > >
> > >
> >
> https://stackoverflow.com/questions/58240043/how-to-disable-cors-on-chrome-when-using-visual-studio-code-and-using-amf-on-apa
> > >
> > > Be carrefull that "--disable-web-security" for Chrome is not working
> > > with last Chrome version. So if you dev env is not on same domain as
> > > your service then session will not work
> > >
> > > If it may help, here is my Apache Royale code to call remote functions
> > > with AMF :
> > >
> > > import mx.rpc.AsyncToken;
> > > import mx.rpc.Responder;
> > > import mx.rpc.events.FaultEvent;
> > > import mx.rpc.events.ResultEvent;
> > > import org.apache.royale.events.EventDispatcher;
> > > import mx.rpc.remoting.RemoteObject;
> > > ...
> > >
> > > public function ServiceCaller()
> > > {
> > > _ro = new RemoteObject();
> > > _ro.source = "your_service_class_name_to_call";
> > > _ro.addEventListener(FaultEvent.FAULT,onFaultEvent);
> > > _ro.endpoint = _gatewayURL;
> > > _ro.destination = "amfphp";
> > > }
> > > ...
> > > To make the call :
> > >
> > > public function callService(name:String, listener:Function,
> > > args:Object):void
> > > {
> > >
> > > var pos:int =  name.indexOf(".");
> > > if (pos == -1) return;
> > > var ops:Array = name.split(".");
> > > var r:Responder = new Responder(listener, onFaultEvent);
> > > _ro.source = ops[0];
> > > var t:AsyncToken = _ro.getOperation(ops[1]).send(args);
> > > t.addResponder(r);
> > > }
> > >
> > > Regards
> > > Fred
> > >
> > > Le 03.07.2020 02:11, Hugo Ferreira a écrit :
> > >
> > > I'm struggling with RemoteObject (AMF).
> > >
> > > Trying to contact from Royale:
> > >
> > >
> >
> https://drive.google.com/file/d/19MQ1yFYxWMPCmPGw-9FsHoHVYmGzG7oh/view?usp=sharing
> > Trying to contact from Flex:
> > >
> > >
> >
> https://drive.google.com/file/d/1J2M__rxQzwOayoNr2e96xrmryptxFsne/view?usp=sharing
> > > Royale uses GET and Flex uses POST.
> > > I don't know if this is the issue but kept my attention.
> > >
> > > This backend is .NET with an implementation of AMF for .NET Standard
> > > however it's working fine for Flex for 7 years.
>


-- 
Carlos Rovira
http://about.me/carlosrovira

Reply via email to