BlazeDS treat incoming reuqest from netconnection as AMF0/AMF1


my project fms server talk java server through amf message. (i'm using blazeds 3.2.0.3978)

here ssas code:
blaze_nc = new netconnection();
blaze_nc.objectencoding = 3;
blaze_nc.connect("http://localhost:8080/mywebapp/messagebroker/amf" );
blaze_nc.call( "product.getproductsbyname", new responder(), "66" );

i can see message coming in , got handle right class right method, except message read in via amf0input not amf3input. read version of message "amf1", not "amf3".

does know why that?

thank you,
alex

fms uses 1 instead of 0 version header indicate server-originated request. seems blazeds 3.0.x branch updated in revision 1823 handle special version header. see readmessage() method of amfmessagedeserializer

http://opensource.adobe.com/svn/opensource/blazeds/branches/3.x/modules/core/src/java/flex /messaging/io/amf/amfmessagedeserializer.java
i believe fms, flash player, starts requests using amf 0. switches amf 3 mid stream on first complex object (array, object, ...) - uses special 0x11 (17 in decimal) type marker, amf0input instantiate amf3input if needed. if simple data type sent (say boolean or number) in amf message body stream not switch amf 3.

pete


More discussions in General Discussion


adobe

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code