Your suggested solution worked after I put quotes around my numeric
parameter -- the BigInteger constructor doesn't take Longs, but it does
take Strings!
$docRef->setVersion(new java("java.lang.BigInteger","1"));
Thanks for your help,
--Jon
-----Original Message-----
From: Jost Boekemeier [mailto:jos...@ya...]=20
Sent: Thursday, November 10, 2005 2:25 PM
To: Abbett, Jonathan; php...@li...
Subject: Ant: [Php-java-bridge-users] Bridge turns BigInteger into a
double?
Hi Jonathan,
please always create a java value explicitly instead
of relying on auto-conversions for php values[1]:
Instead of
$obj->method($phpVal);
use
$obj->method(new java("<param-class>", $phpVal));
So your example would read:
$docRef->setVersion(new java("java.lang.BigInteger",
1));
> It looks like the PHP-Java Bridge is transforming my
> BigInteger=20
When possible a java value is represented as a php
value. "Possible" means: All sub-types of
java.lang.Number are represented as a php exact or
inexact number and all java strings are represented as
a UTF-8 encoded[2] php string. Everything else is
represented as a opaque object handle.
To create an object handle for such a php value one
has to invoke the constructor as shown above.
Regards,
Jost Boekemeier
[1] all instances of java.lang.Number and all
instances of java.lang.String
[2] encoding can be changed with e.g.: java_set_file_encoding("ASCII").
=09
=09
=09
___________________________________________________________=20
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de
|