openAMF0 and convertion from ActionScript to java.lang.Integer

"Sébastien LABEY" <[email protected]> Wed, 12 Sep 2007 08:52:32 +0200
Newsgroups gmane.comp.java.openamf.user
Message-ID <[email protected]>
Hi,

I'm new to Flex and openAMF0 (from www.renaun.com), and I'm experiencing the
following problem :
In my mxml file, I call a remote java service in the server side (under
Tomcat). I pass the parameters inside an Object in the mxml file and the
parameters are converted into a java.util.Map in the java side. This works
nicely.
I need to pass an int to this remote service (let's imagine this int is the
'id' of a user...), but this int is converted into a java.lang.Double!
Because the java service is waiting for an int, I receive a
ClassCastException.
I do it this way in the mxml file :
var params:Object = new Object();
params.id=1;

In the java server side, the 'id' value is 1.0 under a java.lang.Double.

Under which type may I transfer this 'id' param to get it under an int or
Integer in the java server?

Tell me if I'm not clear...

Thanks for your answers.

Sebastien

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________
Openamf-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openamf-user