Hi Spiro,
great you get it! :)
and starting with a simple string is the most intelligent way to do it, so
you progress as you see things working
about register classes. All that is already done in MXRoyale (check the
main class in that SWC)
I think the problem is that Royale RPC can work with ArrayCollection and
ArrayList. In Flex there was only ArrayList.
If you use MX or SPARK emulation, you want AC. If you use Basic, Jewel or
Express, you want AL instead
For example in my own real app that uses Jewel I have this:
import org.apache.royale.collections.ArrayList;
then in my Application initialize event handler (or in other part you
prefer);
//register ArrayCollection alias to map to ArrayList in local project
registerClassAlias("flex.messaging.io.ArrayCollection", ArrayList);
try to remove all your code and just put this, and that should work for you
best
Carlos
El mié., 3 abr. 2019 a las 14:07, spiros (<[email protected]>) escribió:
> Hi Carlos
>
> You are right about the wrong class I used.
> After a few modifications I get a response from CF server. ( a simple
> string for now )
>
> I register the below classes before receive a complete answer from CF.
>
> // Flex classes
> registerClassAlias("flex.messaging.io.ArrayCollection", ArrayCollection);
> registerClassAlias("flex.messaging.io.ArrayList", ArrayList);
> registerClassAlias("flex.messaging.io.ObjectProxy", ObjectProxy);
> // rpc classes
> registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> AcknowledgeMessage);
> registerClassAlias("DSK", AcknowledgeMessageExt);
> registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> registerClassAlias("DSA", AsyncMessageExt);
> registerClassAlias("flex.messaging.messages.CommandMessage",
> CommandMessage);
> registerClassAlias("DSC", CommandMessageExt);
> registerClassAlias("flex.messaging.config.ConfigMap", ConfigMap);
> registerClassAlias("flex.messaging.messages.ErrorMessage", ErrorMessage);
> registerClassAlias("flex.messaging.messages.HTTPMessage",
> HTTPRequestMessage);
> registerClassAlias("flex.messaging.messages.MessagePerformanceInfo",
> MessagePerformanceInfo);
> registerClassAlias("flex.messaging.messages.RemotingMessage",
> RemotingMessage);
>
>
> * I copy from flex SDK -->class mx.utils.RpcClassAliasInitializer
>
>
>
>
> Thanks
>
>
> Spiros
>
>
>
> -----Original Message-----
> From: Carlos Rovira [mailto:[email protected]]
> Sent: Wednesday, April 3, 2019 11:11 AM
> To: [email protected]
> Subject: Re: Remote Object and Coldfusion
>
> Hi,
>
> MXRoyale is almost 1:1 port of RPC flex code, so if you used that before
> you have the same (even source property that is not in network remote
> object bead version).
>
> I can see the setRemoteCredentials in the code as well
>
> So my bet is that you are using the Network RO class instead of the
> MRRoyale one as I told you. That version probably don't work for you, or to
> make it work will need more work for people interested in it.
>
> try MXRoyale RemoteObject and let us know if that solve your problem
>
> best
>
> Carlos
>
>
>
> El mié., 3 abr. 2019 a las 9:03, spiros (<[email protected]>) escribió:
>
> > Hi Carlos,
> >
> > I understand what you say but this means that there is no way to use the
> > royale sdk to connect to coldfusion backend.
> >
> > In this configuration always the destination property set to "ColdFusion"
> > , the source property set to actual coldfusion component
> > and the name -in royale is the first parameter of send method- is the
> > method inside the coldfusion component.
> >
> > Another problem is the missing of method "setRemoteCredentials" and
> > "setRemoteCredentials".
> > This methods send a username and password the remote destrination
> > (coldfusion) .
> >
> >
> > Thanks in advanced
> >
> > Spiros
> >
> > ps: I will change the source localy to see if I connect to CF source .
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Carlos Rovira [mailto:[email protected]]
> > Sent: Tuesday, April 2, 2019 5:30 PM
> > To: [email protected]
> > Subject: Re: Remote Object and Coldfusion
> >
> > Hi,
> >
> > yes, in theory RemoteObject in MXRoyale (use this instead the one in
> > Network swc is what you need. It replicates flex remote object and has
> now
> > almost all functionality. Dictionary and Vector are the only types still
> > not supported. But you have even small messages and all functionality
> > tested in a BlazeDS project migration.
> >
> > About "source" property: was a deprecated property in AMF0 (IIRC), so you
> > should not use it, and just use destination
> > using source was deprecated since you exposed in the client code the
> exact
> > backend source code class you're using, so making this a serious security
> > hole
> >
> > code from our example in "examples/mxroyale"
> >
> > <mx:RemoteObject id="serviceResp" fault="onFault(event)"
> > endpoint="http://localhost:8080/messagebroker/websocket-amf"
> > destination="exampleService"/>
> >
> > HTH
> >
> > Carlos
> >
> >
> > El mar., 2 abr. 2019 a las 13:44, spiros (<[email protected]>)
> escribió:
> >
> > > Hi ,
> > >
> > > is there a way to use royale remote object to connect to coldfuison
> > > resources.
> > >
> > > I am not sure but I think there was a property "source" but I can't
> find
> > > anymore.
> > >
> > >
> > >
> > >
> > >
> > > <js:RemoteObject id="service" result="onResult(event)"
> > > fault="onFault(event)"
> > >
> > > endPoint =
> > > "http://localhost:80/flex2gateway"
> > >
> > > destination = "ColdFusion"
> > >
> > > source = "any cf source"/>
> > >
> > >
> > >
> > >
> > >
> > > I user the last js version 9.6.0
> > >
> > >
> > >
> > >
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> > >
> > > Spiros
> > >
> > >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Carlos Rovira
http://about.me/carlosrovira