开发者

Calling AMFPHP from Red 5 returns a long double

开发者 https://www.devze.com 2023-02-14 13:13 出处:网络
I\'m running the latest build (I\'m pretty sure it\'s 1.0) on Ubuntu and I am calling a function on an amfphp service on another server.Everything seems to开发者_运维知识库 be in order, but I am getti

I'm running the latest build (I'm pretty sure it's 1.0) on Ubuntu and I am calling a function on an amfphp service on another server. Everything seems to开发者_运维知识库 be in order, but I am getting a strange return value using the following code:

String url = "http://path.to.our.server/gateway.php"; 
RemotingClient client = new RemotingClient(url); 
Object[] args = new Object[]{"Hello world!"}; 
Object result =client.invokeMethod("service.manager.say", args); 
if(debug) System.out.println("return from server: "+result.toString());

All the say() function does is return the phrase "hello from the server" as a string.

function say($what){
  return "hello from the server";
}

What I'm getting, however, is the following result:

return from server: 1.6846524729092E-310

Any ideas on what's going wrong?


Update with the answer. Red5 doesn't work correctly with AMFPHP 1.9. Switching to AMFPHP 1.2 solved the issue. Also, switching to Zend AMF worked as expected.

0

精彩评论

暂无评论...
验证码 换一张
取 消