BlazeDS serialization with complex types
I recently came into a situation when sending a nested object from Java to Flex via a HashMap the Objects were null. More precisely:
final Map<Integer, List<String>> tempMap = new HashMap<Integer, List<String>>();
would send the keys as integers but the values were all null.
But when sending the same with String keys:
final Map<String, Lis开发者_高级运维t<String>> tempMap = new HashMap<String, List<String>>();
the objects came thru.
Are there any restrictions in BlazeDS serialization when using complex types as keys?
Turn on property errors in your services.config.xml:
<channels> <channel-definition id="YourChannel" class="mx.messaging.channels.AMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint" /> <properties> <polling-enabled>false</polling-enabled> <serialization> <ignore-property-errors>false</ignore-property-errors> <log-property-errors>true</log-property-errors> </serialization> </properties> </channel-definition> </channels>
Try to remove final keyword and try it without it. I had problems serializing final fields with blazeds
精彩评论