I am currently migrating a large project from Flex 3 to Flex 4.5. The problem I'm stuck with is network communication: we use our own protocol, which we embed in AMF3, but it seems that messages sent using flash.net.NetConnection are not read.
Our Java database uses some BlazeDS classes to deserialize the message, namely flex.messaging.io.amf.AmfMessageDeserializer.AmfMessageDeserializer, and I can monitor network traffic using Charles Web Proxy, which decrypts AMF3. The simplest code here sends a message that can be decrypted by Charles when compiling in Flex 3.5, but not in Flex 4.5 (I get "Failed to parse data (com.xk72.amf.AMFException: Unsupported package type AMF3 17 to 26").
import mx.controls.Alert;
private function init():void
{
var pdl : Dictionary = new Dictionary();
var connection : NetConnection = new NetConnection();
connection.connect("http://localhost");
var responder : Responder = new Responder(result);
connection.call("net", responder, pdl);
}
private function result(pdl : Object) : void {
Alert.show("coucou", "hello");
}
I installed the apache server on localhost: 80 to verify this.
Has anyone used NetConnection in Flex 4.5 and encountered problems with deserialization? How did you solve them?
Thank,
Daniel
source
share