Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-17 Thread Carlos Rovira
ok! perfect,

so If there's only a change in AMFBinaryData, then you ensure you are up to
latest changes in repo a create a PR with your changes so I can review it.

Thanks!

2018-05-17 11:03 GMT+02:00 doug777 :

> Sorry, you misunderstand me.
>
> All I have done is allow AMFBinaryData to read ArrayCollection from CF
> correctly.
>
> I don't think there is any need for ArrayCollection in Royale. ArrayList is
> perfectly adequate.
>
> So all this is is a small change to AMFBinaryData.
>
> Doug
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



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


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-17 Thread doug777
Sorry, you misunderstand me.

All I have done is allow AMFBinaryData to read ArrayCollection from CF
correctly.

I don't think there is any need for ArrayCollection in Royale. ArrayList is
perfectly adequate.

So all this is is a small change to AMFBinaryData.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-17 Thread Carlos Rovira
If is an implementation of ArrayCollection, I think it should go to
"Collections"
Then if AMF uses it, Network will need to use Collections.
To check all is working ok, I recommend you to pass maven so you can ensure
the changes doesn't break things.

You can make a pull request and I'll look at it.

Thanks!

Carlos


2018-05-17 10:51 GMT+02:00 doug777 :

> Do you want to check the code? Do I need to make a pull request and choose
> the AMF project or what?
>
> Doug
>
>
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



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


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-17 Thread doug777
Do you want to check the code? Do I need to make a pull request and choose
the AMF project or what?

Doug





--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-17 Thread Carlos Rovira
That's great Doug,

in other thread I told about passing collection from Java to Royale with
success, but instead of use ArrayCollection I used ArrayList.
That seems to work well. I still need to do more test. For example don't
try to send ArrayList to Java. I think that could cause problems...

For you email what I understand is that you code ArrayCollection in royale?

thanks!


2018-05-17 4:18 GMT+02:00 doug777 :

> Hi Carlos,
>
> I now have ArrayCollection working properly. I suspect the same change will
> also allow ObjectProxy to work properly as well, but at the moment I can't
> test that.
>
> Doug
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



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


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-16 Thread doug777
Hi Carlos,

I now have ArrayCollection working properly. I suspect the same change will
also allow ObjectProxy to work properly as well, but at the moment I can't
test that.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-10 Thread Carlos Rovira
Thanks Doug!



2018-05-10 6:31 GMT+02:00 doug777 :

> Hi Carlos,
>
> Sure, I can take a look at this. Leave it with me.
>
> Doug
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



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


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread doug777
Hi Carlos,

Sure, I can take a look at this. Leave it with me.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread doug777
I'm using CF11 in developer mode locally and this setting has never been
changed since installation.

I'm wondering if this setting is applied only for high-level objects not
when CF is serializing a Query object since the object getting specified
here as an ArrayCollection is a very simple Array of Strings. It makes me
think that some very specific decision was made about how to recognize parts
of Query objects to allow for all eventualities in a simple way.

Even if this setting worked in Query objects, there is a further problem.
Both our test server and our client server use a shared ColdFusion so we
don't have access to the WEB-INF folder.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread Carlos Rovira
Hi,

this is something we talked that would happen. I think we must to find a
way to overcome it. Some options just think now:

1.- simply put ArrayCollection on place (although is becoming part of mx
royale, I think this deserves to be isolated I some core library (maybe
Collections)

2.- make something in RemoteObject that makes ArrayCollection become
ArrayList

@Doug, if you could try this or other fix you think, you could make a pull
request and I can look at it. Have you time to fix this and contribute to
Apache Royale?

I think this is very important.

thanks!

Carlos



2018-05-09 11:41 GMT+02:00 doug777 :

> If you mean the setting in wwwroot/WEBINF/flex/services-config.xml  --
>
> Sadly it is already set to false -
>
>
>  arraycollection>false
>  arraycollection>
>
> But thanks for pointing out that there is a setting for this.
>
> Doug
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



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


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread Paul Hastings
That's odd. What version of cf? All updated/hot fixed? Was the cf service
restarted since that change was made?


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread doug777
If you mean the setting in wwwroot/WEBINF/flex/services-config.xml  --

Sadly it is already set to false -



false


But thanks for pointing out that there is a setting for this. 

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread doug777
Hi Piotr,

I can't change it. This is something CF does inside its serializer before
sending the data. The original data are just fields in a database converted
to a query by CF and then serialized by its internal converter.

The writer of AMFBinaryData was obviously aware of the problem as the
following code is included in AMFBinaryData.as :

if (obj[CLASS_ALIAS] == "flex.messaging.io.ArrayCollection"
|| obj[CLASS_ALIAS] == "flex.messaging.io.ObjectProxy")
return this.readObject();

It's just that it's not in the path this object takes through the code.

Doug



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread Paul Hastings
If you're relying on ColdFusion for automatic serialization and you're
converting queries you might look at your services-config.xml and turn this
option off

serialize-array-to-arraycollection


Re: ArrayCollection Problem in AMFBinaryData.as

2018-05-09 Thread Piotr Zarzycki
Hi Doug,

We simply don't have ArrayCollection in Royale, that's why you are
receiving such issue. Does changing to a simple array will cost you a lot ?
If you receive from AMF simple array - you can get it in Royale and wrap up
it to ArrayList in order to take advantage from Binding.

Piotr

2018-05-09 10:57 GMT+02:00 doug777 :

> My RemoteObject returns a complex Object in part of which CF has specified
> what looks to me like a simple array as an ArrayCollection in the returned
> AMF Data. (Works ok in the old SWF project.)
>
> Stepping through the code in the browser debugger, when the reader reaches
> the n of ArrayCollection in reader.data, it immediately errors with the
> message :
>
> e : "Failed to deserialize: Failed to deserialize: Failed to deserialize:
> ReferenceError: Class flex.messaging.io.ArrayCollection could not be
> found."
>
> Looking into AMFBinaryData.as, I can see that the execution (after reading
> in "ArrayCollection") follows the path to readScriptObject() at line 868
> and
> then goes to line 877.
>
> Unfortunately traits.alias is true and it then fails when trying to get the
> classAlias. It looks to me as though lines 894 - 898 or something like this
> are also needed in the traits.alias section.
>
> Doug
>
>
>
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>



-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
*