hessian
php long int to java long failed when php call java via hessian
I am using hessian between php and java service. In php client: $proxy = new HessianClient($testurl, $options); $result = $proxy->waoo(309000100340); In java server: public Long waoo(long id) { System.out.println(id); return id; } But java printed -237544972 and php got int(4057422324). That means java regard the input as int while it's long. How can I solve this problem?
Perhaps there is no solution for this problem. Java received hessian binary data and deserialize it based on the data's characters. Thus the int from php will be deserialized as java int. Then java transform value to the declared type(long), but in the pervious step the int variable has been already overflown. The alternative solution is to use string to transfer data between different language.
Related Links
php long int to java long failed when php call java via hessian
spring-cloud-sleuth trace hessian client
Hessian Spring configuration
HttpInvoker get choked when trying to return a list with 1000 elements
Record Server Interaction of Hessian based Server Communication for VUGen
Getting started with Hessian