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

Categories

HOME
url-redirection
azure-stream-analytics
scikit-learn
developer-tools
angular2-material
static
nuget
alsa
onclick
spin
pcl-crypto
comsol
zerobrane
atlassian
selectize.js
keytool
linear-algebra
scsi
easyphp
wolframalpha
soci
digital-signature
gmm
symbols
easeljs
comparator
intersystems-cache
android-things
volatile
quickfixj
laravel-eloquent
servicestack-text
engine.io
openerp-7
reason
salesforce-communities
zoomify
reactivekit
google-data-api
resolution
laravel-elixir
datacachefactory
congestion-control
term
facebook-pixel
spring-data-couchbase
opengl-4
arules
bbpress
janus
cronexpression
chromium-os
lrs
iotivity
spring-cloud-feign
burrows-wheeler-transform
windows-azure-queues
ellucian-scribe
nullable
realsense
user-management
linklabel
toolkit
uncompress
sha512
baasbox
umlgraph
phpldapadmin
exceldatareader
theos
android-cookiemanager
post-commit-hook
cbind
encryption-asymmetric
grails-plugin-rabbitmq
wxformbuilder
android-framework
clickbank
openargs
gwt-openlayers
cocoalibspotify-2.0
hidapi
gpars
sqlclr
sentestingkit
promotion-code
diagrams
isapi-extension
lxr
interop-domino
fdf
business-model
online-storage

Resources

Encrypt Message