Hi Sebastian,
There's a rounding bug in that JavaRPC rounds a long to an integer. In
org.openlaszlo.remote.LZReturnObject, line 309, changing
pushInteger(((Long)object).intValue());
to
pushDouble(((Long)object).doubleValue());
should fix your problem. Can you file a bug? I'll make sure this change is
applied to the platform if you let me know if this works for you.
Thanks,
pablo
On Sat, 22 Jul 2006, Sebastian Wagner wrote:
> hi,
>
> We got a problem with passing large numbers to JavaRPC and returning
> Java-Values of type long.
>
> Here is a simple test case for passing Numbers to a LaszloClient:
>
> public List getTestNumbers()
> {
> List aList = new ArrayList();
> aList.add(new Long(9000000L));
> aList.add(new Long(90000000L));
> aList.add(new Long(900000000L));
> aList.add(new Long(9000000000L));
> aList.add(new Long(90000000000L));
> aList.add(new Long(900000000000L));
> aList.add(new Long(9000000000000L));
> aList.add(new Long(90000000000000L));
> aList.add(new Long(900000000000000L));
> aList.add(new Long(9000000000000000L));
>
> aList.add(new Double(9000000L));
> aList.add(new Double(90000000L));
> aList.add(new Double(900000000L));
> aList.add(new Double(9000000000L));
> aList.add(new Double(90000000000L));
> aList.add(new Double(900000000000L));
> aList.add(new Double(9000000000000L));
> aList.add(new Double(90000000000000L));
> aList.add(new Double(900000000000000L));
> aList.add(new Double(9000000000000000L));
>
>
> return aList;
> }
>
> The Double-Values are mapped correctly, the Long values are mapped wrong,
> they are destroyed.
> Is this a bug or can it be changed in the Mapping-Layer sothat all numbers
> are mapped to Double
> The docs say that *all numbers are floating-point numbers* but i expect some
> don't ..
> http://www.openlaszlo.org/lps-latest/docs/guide/rpc-soap.html#d0e26813
>
> The other case is passing a Integer-Value to JavaRPC to a function which is
> expecting a long-param.
>
> Test-Case:
> public List getTitelsPartners(long titlesId){
> return new LinkedList()
> }
>
> This doesn't work either. The remotecall throws an error in the Client
> saying that there is no method getTitelsPartners(int)
> How can we send back large numbers to javaRPC?
>
>
>
> Please let me know what you think about possibilties to solve that.
>
> thx & regards
> sebastian wagner
>
> --
> Sebastian Wagner
> http://www.webbase-design.de
> http://www.laszlo-forum.de
> Bleichstra?e 92
> 75173 Pforzheim
> Tel.: 0177-7341829
> Home: 07231-417456
> [EMAIL PROTECTED]
>
_______________________________________________
Laszlo-dev mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-dev