Hi again,  

I found what was the problem 

They are two ways to define a remote Object.
1. MXMX Tag eg:
<js:beads>
        <js:ClassAliasBead />
                
                <ns:RemoteObject
                        id="ro" result="resultHandler(event)" 
fault="faultFault(event)"
                        endpoint= "http://localhost:80/flex2gateway/";
                        destination = "ColdFusion"
                        source="a service"
                />
</js:beads>
 
2. As3 eg:

        ro = new RemoteObject;
        ro.endpoint = "http://localhost:80/flex2gateway/";;
        ro.destination="ColdFusion";
        ro.source= "a service ";
        ro.addEventListener(ResultEvent.RESULT ,resultHandler);
        ro.addEventListener(FaultEvent.FAULT , faultFault);


The first method is fine and no need of extra classes to register.
The second method produce communication error  at runtime and need the extra 
classes .

I think this is not work even if the server is BlazeDS.


 

 


Spiros
 



-----Original Message-----
From: Carlos Rovira [mailto:[email protected]] 
Sent: Friday, April 5, 2019 12:03 PM
To: [email protected]
Subject: Re: Remote Object and Coldfusion

Great! thanks for report back! :)

El vie., 5 abr. 2019 a las 10:40, spiros (<[email protected]>) escribió:

> Hi Carlos,
>
> I test the last build with this lines as comments and works fine.
>
>
>
> Thanks again
>
>
> Spiros
>
>
> -----Original Message-----
> From: Carlos Rovira [mailto:[email protected]]
> Sent: Thursday, April 4, 2019 11:57 AM
> To: [email protected]
> Subject: Re: Remote Object and Coldfusion
>
> Hi Spiros,
>
> I check that those register class aliases was not in MXRoyale,
> I added just a moment ago.
> Is a mistery to me why this works with BlazeDS but not with ColdFusion
> until now...maybe others can figure it
> if you can try with latest code and remove yours let me know if that works
> for you with just this Royale code
>
> thanks for testing and reporting! :)
>
>
>
> El mié., 3 abr. 2019 a las 17:39, spiros (<[email protected]>) escribió:
>
> > Hi Carlos,
> >
> > The main class of mxRoyale contains three lines for class registration,
> >
> > //registerClassAlias("DSC", CommandMessageExt);
> > //registerClassAlias("DSK", AcknowledgeMessageExt);
> > //registerClassAlias("DSA", AsyncMessageExt);
> >
> > Only with lines below I got result from server
> >
> > registerClassAlias("flex.messaging.messages.CommandMessage",
> > CommandMessage);
> > registerClassAlias("flex.messaging.messages.AcknowledgeMessage",
> > AcknowledgeMessage);
> > registerClassAlias("flex.messaging.messages.AsyncMessage", AsyncMessage);
> > registerClassAlias("flex.messaging.messages.RemotingMessage",
> > RemotingMessage);
> >
> > In any other case I got a fault event.
> >
> > The best think is that any kind of CF object is return correctly (struct
> ,
> > query , Binary , date, string and numeric) to my test application.
> >
> >
> >
> > Thanks again
> >
> >
> > Spiros
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Carlos Rovira [mailto:[email protected]]
> > Sent: Wednesday, April 3, 2019 5:34 PM
> > To: [email protected]
> > Subject: Re: Remote Object and Coldfusion
> >
> > 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
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

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

Reply via email to