Hi,

before looking into this, can I ask you to marshal some Object instance
to XML to make sure whether that side of things work.

Regards
Werner Guttmann

[email protected] wrote:
> Yes, I'm using a mapping based approach. Just a simple enum:
> 
> public enum Type {
> 
>       ABC, VDR, ICZ;
> 
> }
> 
> And here's the relevant part of my mapping:
> 
> <field name="type" type="com.mycompany.Type">
>       <bind-xml name="cv:type" node="element"
> xmlns:cv="http://www.mycompany.com/Type"; />
> </field>
> 
> Thanks for your help.
> 
> 
> 
>                                                                            
>              Werner Guttmann                                               
>              <werner.guttmann@                                             
>              gmx.net>                                                   To 
>                                        [email protected]            
>              12/17/2008 03:15                                           cc 
>              PM                                                            
>                                                                    Subject 
>                                        Re: [castor-user] Java 5 Enums and  
>              Please respond to         xsi:type                            
>              [email protected]                                             
>                   aus.org                                                  
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> Hi,
> 
> yes, this could be an issue, as it all depends how you've developed your
> enum to which this XML should be mapped (assuming that you are using a
> mapping-based approach).
> 
> How does your enum look like ?
> 
> Regards
> Werner
> 
> [email protected] wrote:
> 
> I'm having an issue with marshalling java 5 enums.
> 
> The generated xml has the following declaration:
> xsi:type="java:java.lang.String", as in:
> 
> <cv:type xsi:type="java:java.lang.String"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:c="http://www.mycompany.com/Type";>ABC</cv:type>
> 
> ... which obviously doesn't validate. How can this be prevented?
> 
> I've seen this issue posted several times against previous versions of
> Castor but with no solutions. I'm using Castor version 1.3rc1. Is this
> still an issue?
> 
> Thanks.
> 
> 
> -----------------------------------------
> CONFIDENTIALITY STATEMENT:
> This e-mail transmission contains information that is intended to
> be confidential.  It is intended only for the addressee named
> above.  If you receive this e-mail in error, please do not read,
> copy, or disseminate it.  If you are not the intended recipient,
> any disclosure, copying, distribution or use of the contents of
> this information is prohibited.   Please reply to the message
> immediately by informing the sender that the message was
> misdirected.  After replying, please erase it from your computer
> system.  Your assistance in correcting this error is appreciated.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to