[Red5] ServiceInvoker / ConversionUtils: how to invoke methods with List<CustomClass> params

Victor dreamland_skib2 at mail333.com
Wed Dec 19 11:38:35 PST 2007


I have found a solution for methods with custom classes and collections 
of custom classes.
The solution is to use [Remote] annotation with 'alias' attribute for 
such custom types in Flex (see APPSERVER-229 for details).

Another problem is that Flex does not have Long type (it has Integer) 
and Red5 can not convert List<Integer> to List<Long>, but this is not 
critical for me now...

Victor Novichihin


Victor wrote:
> I have posted several comments to Jira (APPSERVER-229), but I still have 
> a question:
> is it possible to get object type (for example, it was Account object at 
> client side) in Red5 before invoking method?
> We are working with AMF0. Seems AMF3 does not work in Red5 for method 
> invocations.
>
> Victor Novichihin
>
>
> Victor wrote:
>   
>> Hello,
>>
>> seems there is a problem in Red5's ConversionUtils class when trying to 
>> call methods (from Flex client) with a collection of custom 
>> (user-defined) objects. Example:
>>
>> interface MyService {
>>   void test(List<MyClass> param);
>> }
>>
>> When you try to execute this method from Flex client, Red5 tries to pass 
>> List<Map> - that is Red5 does NOT reconstruct MyClass from Map of 
>> attributes. Flex example:
>>
>> connection.call("myService.test", new Responder(onResult), param);
>>
>> Some days ago, we have fixed one bug related to the reconstruction of 
>> any custom object from Map:
>> http://jira.red5.org/browse/APPSERVER-229
>> But seems there is a problem when working with collections (List, Map, 
>> .) of custom objects and even Red5 can not convert List<Integer> to 
>> List<Long> (Flex does not have Long type).
>> I think Red5 should try to convert parameters recursively in 
>> ConversionUtils.convertParams().
>>
>> What do you think about this? Did somebody try to call such methods from 
>> Flex? Maybe there is a workaround for this?
>>
>> Thanks,
>> Victor Novichihin
>>   
>>     
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>
>
>
>   




More information about the Red5 mailing list