Hi, I was testing with Red5 Remoting. What I am doing this I am using a NetConnection In Flash9Preview. try to connect to Red5 Remoting by AMF3. Actually, I also tried to use the AMF0 encoding, but it give me the same result. I know the Flex RemoteObject is more complicated. so I leave it aside. No Flex RemoteObject test. you can find the code here:* *http://70.87.146.189/RemotingTest.zip use flash preview9 to open. you need to setup the class path.
The remote call has been made *successfully*.(Although I have another question about how to configure the server handler.) but, the remote method *successfully* invoked and returned value. the problem is that no matter what I send in the argument, it alwasy decode it as a very big number. it can not decode it correctly. Here is what I get from the server cosole.: [java] ( org.red5.server.net.servlet.AMFGatewayServlet.debug ) Remoting request/echo /gateway [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.debug ) Skip headers [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.debug ) Version: 0 [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.debug ) Count: 0 [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.debug ) Decode calls [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.debug ) Calls: 1 [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.debug ) callback: /1 [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.info ) Service: myHandler Method: sayHello [java] ( org.red5.server.net.remoting.codec.RemotingProtocolDecoder.info ) > 7.6264528727297E-311 As you can see, it decode the other part correctly, but the argument is not correcttly decoded. I run a lot of test here, but it seems the *Remoting Codec or the Decoder*has some problem. I tried to dig into the code, but because I am new to the Red5 server code, I can't find out why. Anyone body could spend some time on this issue? By the way, when I use charles(www.xk72.com/*charles*/ ) to debug the AMF information. Look at it herehttp://70.87.146.189/Charles_http_debugger.GIF it clearly show that the argument type is a string. But when it goes to the server, it becames this wired number. For you to quickly view of the flash code, I paste it here import com.dannypatterson.remoting.FaultEvent; import com.dannypatterson.remoting.ResultEvent; import com.dannypatterson.remoting.ServiceProxy; btn.addEventListener("click",RemotingExample); var serviceProxy:ServiceProxy; function RemotingExample(event) { serviceProxy = new ServiceProxy(gateway.text, service.text); serviceProxy.addEventListener(ResultEvent.RESULT, onResult, false, 0, true); serviceProxy.addEventListener(FaultEvent.FAULT, onFault, false, 0, true); serviceProxy.addEventListener(FaultEvent.CONNECTION_ERROR, onConnectionError, false, 0, true); //serviceProxy.sayHello("login"); serviceProxy.call(method.text,[arg.text]); trace("called"); } function onConnectionError(event:FaultEvent):void { trace("onConnectionError: " + event.fault); } function onFault(event:FaultEvent):void { trace("onFault: " + event.fault); } function onResult(event:ResultEvent):void { trace("onResult: " + event.result); }
_______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
