[Red5] Bad Value passed from AS --> Red5

Karyn J karyn at backpocket.com
Wed Mar 26 08:08:55 PST 2008


I have an issue where when I pass a certain int from Flex client to Red5
application that the int is truncated. I am invoking a red5 method passing
an int 36736651, From flex, and sniffing the traffic I see the value passed
correctly. Within red5, the value is corrupted, I think its a truncation
issue or sorts.
In the example I pass int 36736651 and red5 sees it as -117.

If I pass another int 462777626 then it comes across correctly.

Please help any ideas?

Java Method
    public String testInt(int val, String valStr){
        String mesg = "testInt   int("+val+"),  String("+valStr+")";
        System.out.println(mesg);
        return mesg;
    }

Actionscript call

echoService = new RemoteObject( "Red5Echo" );
echoService.testInt.addEventListener(ResultEvent.RESULT, ontestIntResult);
echoService.testInt.addEventListener(FaultEvent.FAULT, ontestIntFault);

Invoking
echoService.testInt(36736651 , "36736651");


Output Java Result
testInt   long(-117),  String(36736651)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/red5_osflash.org/attachments/20080326/eaa87ee4/attachment.html 


More information about the Red5 mailing list