axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thad Humphries <t...@mindwrap.com>
Subject ArrayDeserializerFactory constructor oversight?
Date Fri, 12 Aug 2005 22:41:51 GMT
I've been playing with a (de)serializer for a class that contains an array 
member.  My serializer worked fine--I registered the serializer for the class 
in the array with 

  TypeMappingRegistry reg = context.getTypeMappingRegistry();
  TypeMapping tm = (TypeMapping)   
       reg.getOrMakeTypeMapping(Constants.URI_SOAP11_ENC);
  tm.register( ACLRec.class, OASQNames.aclRecQName,
       new ArraySerializerFactory(ACLRec.class, OASQNames.aclRecQName),        
       new ArrayDeserializerFactory(OASQNames.aclRecQName));

And TCP Monitor showed a good soapenv:Envelope coming back but my 
deserializer's onStartChild() failed to deserialize.  Eventually, I figured 
out to register deserialization as

  TypeMappingRegistry reg = context.getTypeMappingRegistry();
  TypeMapping tm = (TypeMapping)   
       reg.getOrMakeTypeMapping(Constants.URI_SOAP11_ENC);
  tm.register( ACLRec.class, OASQNames.aclRecQName, 
       new ACLRecSerFactory(), new ACLRecDeserFactory() );
  tm.register( ACLRec[].class, OASQNames.aclRecArrQName,
       new ArraySerializerFactory(ACLRec.class, OASQNames.aclRecQName),        
       new ArrayDeserializerFactory(OASQNames.aclRecQName));

I believe this is because ArrayDeserializerFactory initializes only with a 
QName, not a class and QName.  Why not?  Is that an oversight in the API?

Interstingly, I can use the same registration in my serializer but the 
soapenv:Envelope is the same either way.

In any case, it's something else to add to the write-up for the User's Manual 
that I am planning.



Mime
View raw message