Paul,

If you have not done so already, can I please ask you to open a new
issue at http://jira.codehaus.org/browse/CASTOR, and attach all relevent
information. If this has been done already, please ignore this email.

Regards
Werner

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Dienstag, 25. Oktober 2005 10:30
> To: [email protected]
> Subject: RE: [castor-user] Xml Marshal/Unmarshal for Java 
> Collections Fails
> 
> As a temporary fix that allows me to keep working I have 
> hacked CoreDescriptors and added XMLClassDescriptor 
> implementations for java.util.Set and java.util.Map. This is 
> obviously less than ideal but I haven't found an easy way to 
> register these custom XMLClassDescriptors this morning. If 
> someone could point me in the right direction I would appreciate it.
> 
> I have attached my version of CoreDescriptors and 
> implementations of SetClassDescriptor and MapClassDescriptor. 
> 
>  <<org.exolab.castor.xml.descriptors.zip>>
> Thanks
> 
> Paul Smith
> 
> >  -----Original Message-----
> > From:       Smith, Paul: IT (LDN)  
> > Sent:       25 October 2005 07:56
> > To: Castor User
> > Subject:    Xml Marshal/Unmarshal for Java Collections Fails
> > 
> > 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?
> > 
> >  << File: 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