actionscript-3blazeds

BlazeDS return DSK instead of AcknowledgeMessage


Hi I am trying to use a JS library to send and receive AS3 Objects. The library is this one: https://github.com/emilkm/amfjs. It works well but only when BlazeDS (3.5) returns AcknowledgeMessage messages that it can deserialize, if Blaze returns the Object as a DSK it chokes. The problem is BlazeDS is not being consistent on the type it returns for any given method, sometimes DSK sometimes AcknowledgeMessage (for the same method call, at some point during its up time it decides to return AcknowledgeMessage). The flex application handles this no problem, but how can I force Blaze to respond correctly?


Solution

  • To permanently turn off small messages add this following to the required channel in the services-config.xml. The properties node needs the following entry added for every channel you want to connect to using amf.js if you are going to have both Flex and HTML clientes from the same browser:

    <properties>   
        <serialization>
           <enable-small-messages>false</enable-small-messages>
        </serialization>
    </properties>