Mantis - Hessian
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3341 | major | always | 02-13-09 11:45 | 03-01-09 13:47 | |
|
|||||
Reporter: | everflux | Platform: | |||
Assigned To: | OS: | ||||
Priority: | normal | OS Version: | |||
Status: | new | Product Version: | 3.2.1 | ||
Product Build: | Resolution: | open | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | |||
|
|||||
Summary: | 0003341: hessian 3.2.1 does not work with phphessian while hessian 3.1.6 does | ||||
Description: |
Using phphessian to create a hessian service in php and calling from java (groovy) it does not work using hessian-3.2.1.jar If using hessian-3.1.6.jar the very same application works. |
||||
Steps To Reproduce: | |||||
Additional Information: |
using phphessian this is the sample service <?php include_once 'HessianPHP/dist/HessianService.php'; $wrapper = &new HessianService(); //enable method browsing with http get $wrapper->setDisplayInfo(true); $wrapper->registerObject(new Demo()); $wrapper->service(); class Demo { function run($n1,$n2) { $result = ""; $result .= "hello $n1 $n2"; return $result; } function arrayResult($n1, $n2) { $result = array(); $result[0] = $n1; $result[1] = strlen($n1); $result[2] = $n2; $result[3] = strlen($n1); return $result; } function objectResult($n1, $n2) { $result; $result->nameOne = $n1; $result->nameTwo = $n2; return $result; } } ?> this is the call in groovy import com.caucho.hessian.client.HessianProxyFactory; def n1='tkruse' def n2='muenster' url ="http://localhost/~tkruse/hessianRules/server.php" [^] HessianProxyFactory factory = new HessianProxyFactory(); //factory.setDebug(true); factory.setChunkedPost(false); service = factory.create(DemoInterface.class, url); println (service.run(n1, n2)) service.arrayResult(n1, n2).each{println "entry: " + it} When having the debug mode on, it looks like there is something swallowing the first byte containing "r", so hessian does not recognize the response correctly: Exception in thread "main" com.caucho.hessian.client.HessianRuntimeException: com.caucho.hessian.io.HessianProtocolException: expected hessian reply at 0x1 () at com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:258) at $Proxy0.run(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Having a look on a tcpdump everything looks correctly. Since changeing just the hessian jar solves this issue there seems something changed between them. |
||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|