Hi,
(I created the same email before that had my codes attached but it seems to require approval to be sent. So here's my message again) I tried the hessian examples. I followed the guide on http://www.caucho.com/resin-3.0/protocols/hessian.xtp . I'm using eclipse and maven. I created a webapp and added the necessary folders. I deployed the war on tomcat and also tried it with mvn jetty:run. I ran the BasicClient as a java application using eclipse just to see if the service is running. Since killing the webserver cause exceptions, I assume that the client is actually getting the data from the service on jetty/tomcat. So I'd assume that my hessian service is good. (please correct me if I am wrong.) But now, I am trying to connect using a php client. I used the client from http://sourceforge.net/projects/hessianphp/files/ (I've also attached the zip file in an earlier message). However when I try it, I get a http response 500 error on the HessianTransport.php. I have no idea what I did wrong. Here's my code in php: <html> <head></head> <body> This is a test <?php require_once('./HessianPHP_v2.0.3/src/HessianClient.php'); //require the librar $testUrl = 'http://localhost:8080/hessianexample/math'; // this is deployed in tomcat $hessianClient = new HessianClient($testUrl); try{ echo("<br/> do add: ".$hessianClient->add(1,2)); }catch(Exception $exception){ echo('OMG there is an exception: ');var_dump($exception); } ?> </body> </html> When the php script runs, I get this error: object(Exception)#12 (7) { ["message":protected]=> string(37) "Server error, returned HTTP code: 500" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(0) ["file":protected]=> string(91) "/home/slee/PROJECT/globe-mds/lib/gs-info/hessian/HessianPHP_v2.0.3/src/HessianTransport.php" ["line":protected]=> int(91) ["trace":"Exception":private]=> array(4) { [0]=> array(6) { ["file"]=> string(88) "/home/slee/PROJECT/globe-mds/lib/gs-info/hessian/HessianPHP_v2.0.3/src/HessianClient.php" ["line"]=> int(66) ["function"]=> string(9) "getStream" ["class"]=> string(20) "HessianCURLTransport" ["type"]=> string(2) "->" ["args"]=> array(3) { [0]=> string(41) "http://localhost:8080/hessianexample/math" [1]=> string(11) "HCadd’‘’" [2]=> object(HessianOptions)#2 (18) { ["version"]=> int(2) ["transport"]=> string(4) "CURL" ["transportOptions"]=> NULL ["detectVersion"]=> bool(false) ["objectFactory"]=> NULL ["typeMap"]=> array(0) { } ["strictTypes"]=> bool(false) ["headers"]=> array(0) { } ["interceptors"]=> array(0) { } ["timeZone"]=> NULL ["saveRaw"]=> bool(false) ["serviceName"]=> string(0) "" ["displayInfo"]=> bool(false) ["ignoreOutput"]=> bool(false) ["parseFilters"]=> array(0) { } ["writeFilters"]=> array(0) { } ["before"]=> array(0) { } ["after"]=> array(0) { } } } } [1]=> array(6) { ["file"]=> string(88) "/home/slee/PROJECT/globe-mds/lib/gs-info/hessian/HessianPHP_v2.0.3/src/HessianClient.php" ["line"]=> int(111) ["function"]=> string(13) "__hessianCall" ["class"]=> string(13) "HessianClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(3) "add" [1]=> array(2) { [0]=> int(1) [1]=> int(2) } } } [2]=> array(4) { ["function"]=> string(6) "__call" ["class"]=> string(13) "HessianClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> string(3) "add" [1]=> array(2) { [0]=> int(1) [1]=> int(2) } } } [3]=> array(6) { ["file"]=> string(58) "/home/slee/PROJECT/globe-mds/lib/gs-info/hessian/test2.php" ["line"]=> int(10) ["function"]=> string(3) "add" ["class"]=> string(13) "HessianClient" ["type"]=> string(2) "->" ["args"]=> array(2) { [0]=> int(1) [1]=> int(2) } } } ["previous":"Exception":private]=> NULL } Please advice. Thanks, Best regards, Stevenson Lee
_______________________________________________ hessian-interest mailing list hessian-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/hessian-interest