Frederic ,

I did play with AMFPHP a bit with success. I have downloaded AMFPHP from
here [1].

There where following example service [2]. I was able to receive data from
following methods without the problem. My test Royale application was
placed in localhost.

*returnOneParam*(1) - *OK*
*returnSum*(1, 2) - *OK*
*returnNull*() - *OK*
*returnBla() - OK*
*throwException('My Exception') - I did get exception here, but without
sent string.*
*returnTestHeader() - Failed*
*returnArray() - OK*
*returnOpposite() - OK*
*returnBitwiseAnd() - OK*
*staticReturnOneParam() - OK*
*returnLargeTypedDataSet() - OK!! *I did create DummyVO - the was on
server. Code ->
https://paste.apache.org/W3E3

*testArrayCollection - *This fail always and I believe even if we will have
our own ArrayCollection. AMF won't understand it either.

Prashant,
In your example you have to use simple Array and it should work.
I did change code of this service as you can see [1] and it was working for
me without the problem!

If method doesn't have any parameter It is important to send the second
params as empty array service.send("returnNull", []) -> this won't
work service.send("returnNull",
null)

Alex,
what do you think to add to send empty array as default ?

[1]  https://www.silexlabs.org/amfphp/
[2] https://paste.apache.org/L24z

Thanks,
Piotr


2018-02-18 13:50 GMT+01:00 Prashant Kumar <prashaku...@gmail.com>:

> Following cases not working:
>
> service.send("passArrayList",[new ArrayList(["Test1","Test2"])]);
>
> var v1:Vehicle = new Vehicle();
> v1.name = "Nexon";
> v1.brand = "TATA";
> v1.dom = new Date();
> service.send("addVehicle",[v1]);
>
>
> On Sat, Feb 17, 2018 at 4:15 PM, Carlos Rovira <carlosrov...@apache.org>
> wrote:
>
>> Hi, I tested some months ago some scenarios with collections sharing some
>> VOs, and worked, but I think we should try more scenarios since complex
>> object graphs could be problematic.
>>
>> Thanks Prashant for looking into this. If you can help trying to evolve
>> the code I can support you with your pull request to include your changes
>> in Royale.
>>
>>
>> 2018-02-17 5:37 GMT+01:00 Prashant Kumar <prashaku...@gmail.com>:
>>
>>> Carlos,
>>>
>>> If I sends only primary type as int , number , date etc then  all works
>>> fine but if I sends custom types as a Arraylist , VOs, and other inherited
>>> types does not work properly.
>>>
>>> Regards,
>>> Prashant
>>>
>>> On 17-Feb-2018 2:50 AM, "Fréderic Cox" <coxfrede...@gmail.com> wrote:
>>>
>>> Updated https://github.com/apache/royale-asjs/issues/119, think I am
>>> getting closer :-)
>>>
>>> On Fri, Feb 16, 2018 at 9:51 PM, Fréderic Cox <coxfrede...@gmail.com>
>>> wrote:
>>>
>>>> Updated https://github.com/apache/royale-asjs/issues/119, can't get
>>>> the JAVA part to work but changing the AMF endpoint to AMFPHP I get an
>>>> error code when calling, so maybe that can help further research
>>>>
>>>> On Fri, Feb 16, 2018 at 9:21 PM, Fréderic Cox <coxfrede...@gmail.com>
>>>> wrote:
>>>>
>>>>> Any instructions on how to build the example? This is kind of
>>>>> complicated for me as I have 0 experience with JAVA and even less with
>>>>> Maven ;-)
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> Carlos Rovira
>> http://about.me/carlosrovira
>>
>>
>
>
> --
> *Regards,*
> Prashant Kumar* | *Mob.: +91 8408811225 <+91%2084088%2011225>
>



-- 

Piotr Zarzycki

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

Reply via email to