Re: openAMF0 and convertion from Action Script tojava.lang.Integer[Viren geprüft]
Stu Thompson <[email protected]> Thu, 13 Sep 2007 09:52:18 +0200
| Newsgroups | gmane.comp.java.openamf.user |
|---|---|
| Organization | xtendx AG |
| Message-ID | <[email protected]> |
Hi Sebastien, Please post your OpenAMF logs (debug level), openamf-config.xml file and Java API...that will help people spot what your problem is. Java and ActionScript types do not match up 1:1, but that should not prevent you from passing an ID as you mention. I personally am passing an object with a Java int ID property, and the ID as a lone parameter, with out problems. It is a 'Number' in AS and an int in Java. Yes, from what I infer in my own logs, OpenAMF does try to cast it as a double when trying to workout what the target method is, but it figures it out and everything works. With my objects, the classes are explicitly described in the OpenAMF config file and explicitly matched on our client side AS code. Are yours? Stu On Wed, 2007-09-12 at 08:52 +0200, Sébastien LABEY wrote: > 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 ------------------------------------------------------------------------- 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