Hi,

I am having some difficulty working with Castor (castor-0.9.9) to
marshal/unmarshal Java collections.
I expected the attached JUnit test-case to pass, it simply marshals and
then unmarshals various Java collection implementations that contain
three Strings. It fails for all collections other than ArrayList.

The ArrayList test produces sensible xml, but for the others it produces
(example is HashMap):
        <hash-map empty="false"/>

I have tried writing my own CollectionHandler which correctly deals with
HashMap. I can see that it is being called by Castor (from debugging
CollectionHandlers.getCollectionType) and I am sure that the
implementation is correct but the same xml is still produced.

Any ideas? What am I missing?

 <<TestCastorCollectionsXml.java>> 
Thanks

Paul Smith



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to