Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

null values after serialization

Avatar

Level 1
My Java server side, service and resulting Event object:



public class StatsEventRepresentationServiceImpl {

public List<Event> getStats(Date start, Date end)
{...}

}



public class Event {

public Date ts;



public Map<Type, Integer> typeFacts;

...

}



remoting-config.xml:



<service id="remoting-service"

class="flex.messaging.services.RemotingService">



<adapters>

<adapter-definition id="java-object"
class="flex.messaging.services.remoting.adapters.JavaAdapter"
default="true"/>

</adapters>



<default-channels>

<channel ref="my-amf"/>

</default-channels>



<destination id="statsService">

<properties>

<factory>spring</factory>

<source>statsBean</source>

</properties>

</destination>

</service>



Channel definition:



<channels>

<channel-definition id="my-amf"
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>

</properties>

</channel-definition>



At client side I've got null on the place of Event.typeFacts
that in fact are filled with some Integer values in
StatsEventRepresentationServiceImpl.getStats(). I've enabled lcds
logging to find out problematic place and got this:



[Flex] After invoke service: remoting-service

reply: java.util.ArrayList (Collection size:1)

[0] = Event{ts=Mon Aug 27 21:50:05 MSD 2007,
typeFacts={IMPRESSION=
100, USE=
100, ATTACK=
100, CONSUME=
100, MOVE=
100, VISIT=
100, INTERACTION=
100}}



[Flex] Serializing AMF/HTTP response

Version: 3

(Message #0 targetURI=/2/onResult, responseURI=)

(Typed Object #0
'flex.messaging.messages.AcknowledgeMessage')

timestamp = 1.188237005894E12

headers = (Object #1)

body = (Externalizable Object #2
'flex.messaging.io.ArrayCollection')

(Array #3)

[0] = (Typed Object #4 'adplatform.dashboard.Event')

typeFacts = (Object #5)

IMPRESSION =
null

USE =
null

ATTACK =
null

CONSUME =
null

MOVE =
null

VISIT =
null

INTERACTION =
null

ts = Mon Aug 27 21:50:05 MSD 2007

correlationId = "5878F136-92D8-538D-7ABC-A871D37E8EC4"

messageId = "6F3DE73E-E60A-CF8E-68B2-80726A709793"

timeToLive = 0.0

clientId = "6F3DE71A-470B-6FD3-1CFC-500C7306D9FA"

destination = null



Why lcds sterilizes Map<Enum, Integer>’s values
as nulls? Some problem with configuration? Lcds bug?
0 Replies