You can subscribe to this list here.
| 2005 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2007 |
Jan
(1) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Jesse M. <jma...@az...> - 2007-03-27 08:02:36
|
>From looking at Protocol.php:
function readLong(){
// Thanks Radu-Adrian Popescu
$data = unpack('N2', $this->read(8));
$value = $data[1]*256*256*256*256 + $data[2]; // +0.0;
return $value;
}
This looks a little suspicious: It's trying to build essentially a double
from 2 signed integers. It seems extra strange when the long 1174970145000L
comes over the wire as: $data[1] = 273, $data[2] = -1850894104 .
I wrote some pretty longwinded int to double code by unpacking the bytes:
function readLong(){
// Thanks Radu-Adrian Popescu
$data = unpack('N2', $this->read(8));
$h = $data[1];
$l = $data[2];
$b[] = ($h >> 24) & 0xff;
$b[] = ($h >> 16) & 0xff;
$b[] = ($h >> 8) & 0xff;
$b[] = $h & 0xff;
$b[] = ($l >> 24) & 0xff;
$b[] = ($l >> 16) & 0xff;
$b[] = ($l >> 8) & 0xff;
$b[] = $l & 0xff;
$m = 1.0;
$value = 0.0;
for ($i = 0 ; $i != 8 ; $i++) {
$value += $b[7 - $i] * $m;
$m *= 256.0;
}
return $value;
}
It seems pretty longwinded way of putting together a double, but it does
work (at least for my example -- no big testing done yet). There's no doubt
a shorter way of manipulating stuff, but it seems tricky since you need to
go from an int to a double.
--jesse
On 3/26/07, Jesse Macnish <jma...@az...> wrote:
>
> I'm having a problem with sending a Date over the wire from Java to
> PHP using Hessian 1.0.5RC2. From the java side:
>
> millis: 1174970145000 (Mon Mar 26 21:35:45 PDT 2007)
>
> Is getting turned into a DateTime on the PHP side of:
>
> DateTime Object
> (
> [day] => 05
> [month] => 02
> [year] => 2007
> [hour] => 03
> [minute] => 32
> [second] => 57
> [_timestamp] => 1170675177.704
> [weekDay] => 1
> )
>
> Simple test:
>
> public Date testDate() {
> Date d = new Date(1174970145000L);
> logger.info("Date:" + d);
> return d;
> }
>
> Output: Date:Mon Mar 26 21:35:45 PDT 2007
>
> $res = $question_proxy->testDate();
> pre_print($res);
>
> Output: 2007-02-05 03:32:57
>
|
|
From: Jesse M. <jma...@az...> - 2007-03-27 06:32:30
|
I'm having a problem with sending a Date over the wire from Java to
PHP using Hessian 1.0.5RC2. From the java side:
millis: 1174970145000 (Mon Mar 26 21:35:45 PDT 2007)
Is getting turned into a DateTime on the PHP side of:
DateTime Object
(
[day] => 05
[month] => 02
[year] => 2007
[hour] => 03
[minute] => 32
[second] => 57
[_timestamp] => 1170675177.704
[weekDay] => 1
)
Simple test:
public Date testDate() {
Date d = new Date(1174970145000L);
logger.info("Date:" + d);
return d;
}
Output: Date:Mon Mar 26 21:35:45 PDT 2007
$res = $question_proxy->testDate();
pre_print($res);
Output: 2007-02-05 03:32:57
|
|
From: Jesse M. <jma...@az...> - 2007-01-22 07:54:31
|
It appears that PHP 5.2.0 defines a DateTime class (for object oriented
playing around with Dates and Times). This causes a fatal redeclared class
error with 1.0.5RC2's "DateTime" class, I suppose.
I worked around by just renaming DateTime to PDateTime ("portable Date
Time?"), and things are back to working.
--jesse
|
|
From: Jan T. G. <jtg...@al...> - 2006-08-09 04:27:10
|
subscribe |
|
From: Larchet V. <vin...@el...> - 2005-12-08 17:03:57
|
Hello, there are 2 bugs opened in http://sourceforge.net/tracker/?group_id=126933&atid=707220 Can you have a look?? Or is this project not maintained any more? Thx very much vincent -- Vincent LARCHET ELCA / www.elca.ch Av. de la Harpe 22-24 / Case postale 519 / CH - 1001 Lausanne mailto:vin...@el... / Tel: +41 21 613 21 11 / Fax: +41 21 613 21 00 This message may contain confidential and/or privileged information. If you are neither the addressee nor authorized to receive this for the addressee, you must not use, copy, disclose or take any action based on this message or any information herein. If you have received this message in error, please contact the sender and delete this message. Thank you. |
|
From: <veg...@gm...> - 2005-03-15 19:47:11
|
Hi Jonathan Sorry for the delay, and thanks. Now about your questions: -- Curl: Curl by itself does seem to be faster than using php own socket functions, just because the extra effort of parsing HTTP headers that you *have* to do in raw php, altough the performance gain is almost insignificant. Recently I was performing a few tests over CURL to see if it's possible to use it in the data sending mechanism of HessianPHP. After some time messing with curl_setopt I was able to send binary data to both HessianPHP and Hessian Java, but it has some really ugly caveat. The only way I can make a Hessian service understand binary data coming from PHP is to simulate a file upload(!). Curl will accept a file descriptor (resource) for a file upload, but only it it point to a real file. I tried to simulate it using php streams ( stream_wrapper_register() ), that can act as file descriptors without being a real file, but Curl keeps reject it. So the only way was to save a *real* file with the data payload and then upload it to the remote service (think about tmpfile()). Ugly and slow of course. So I for the time being, I have given up in my efforts to use Curl, it just doesn't behave well, maybe I will try again in a later version of php or someone will give me another hint. -- Zlib compression It's a great idea and there was a discussion in Hessian mail list some time ago about how to incorporate it into the protocol. The C++ version of Hessian, HessianCPP, uses it but it does recognize gzip compressed data by looking a the first 2 or 3 of the data itself, not by a protocol standard. People has proposed several options to incorporate in into the protocol, or keep it simple and use HTTP headers to see if data needs to be decompressed. I am working in the new version of HessianPHP and I am planning to incorporate this feature as soon as possible. Check out Hessian's original mailing list for a deeper discussion: http://www.caucho.com/support/hessian-interest/ |
|
From: Jonathan H. <hen...@ya...> - 2005-02-17 05:22:35
|
Manolo, All, Glad to see a binary RPC for PHP - and that you are making efforts in both php4 and 5. I haven't seen any other good binary PHP RPC protocols. I had a couple of questions: - Do you really think using Curl Is faster - or does in just give you finer grained control than having to write all the headers yourself for POST? - What about zlib compression? I guess the problem with zlib compression is that you'd no longer be complying the Hessian protocol? - Jonathan Hendler |
|
From: stoica i. <io...@ya...> - 2005-01-14 17:43:51
|
if i want to return this from a hessian php service:
function getAgents()
{
$qr = "SELECT * FROM _agents ORDER BY _order ASC";
$rs = mysql_query($qr);
$agents = array();
$obj->label = "";
$obj->data = "";
$i = 0;
while($el = mysql_fetch_array($rs))
{
$obj->label = $el["label"];
$obj->data = intval($el["data"]);
$agents[$i] = $obj;
$i++;
}
return $agents;
}
How could i convert the result to a c# array ?
Or to what kind of data strcture ?
The same questions, but for java!
c# client : http://www.hessiancsharp.org/
java client : the one from caucho
PLS HELP!!!!
Regards, iongion!
__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250
|
|
From: stoica i. <io...@ya...> - 2005-01-14 17:37:18
|
__________________________________ Do you Yahoo!? The all-new My Yahoo! - Get yours free! http://my.yahoo.com |