Hi Anton,

let me ask you a few questions .....

Anton Brass wrote:
> Hey there,
> 
> I want to use castor for simply mapping existing java objects to xml.
> 
> 
> But my problem is, that some objects are adding xsi:type
> automatically and others not. With others I do not mean the simple
> types directly supported by castor, but own classes, which are not
> much different to the classes, which are working correctly.
Are those classes by any chance part of a class hierarchy ?

> I don't really understand how I can switch on/off the xsi:type or can
> impact the output for this attribute, even after reading the
> ReferenceGuide chapter many times.
Well, your options are limited in some way, but there are options.

a) Turn it off completely (option on the Marshaller).
b) Read

http://castor.org/reference/html/XML%20data%20binding.html#xml.mapping.mappingfile.xsitype

again, and try to play with the options defined (and explained) therein.

c) Showcase a small (self-sufficient) problem that allows us to answer
your questions more specifically.

> I want that every element which is a field of a class A and type of
> class B adds my defined map-to type in form of the xsi:type
> attribute.
Why would you want that just at this very location ? Why not let Castor
decide if it's needed ? Again, a short example might be helpful.

> I added all my classes and the mapping files I use as attachment in
> this E-Mail. The class and its extensions that are not working the
> same way like the others is called "es.ehrflex.core.en13606.text.CD".
Sorry, but you will have to break down things so that your questions are
a bit moire specific.

> I'm using Castor 1.3rc1 (and others tested), JDK 1.6, Apache Tomcat
> 6.0.0.20, Maven 2 and GWT 1.6.4.
Why not switch to 1.3 final ?

> 
> Thank you a lot for any helpful suggestions.
> 
> Best regards
> 
> Anton Brass
> 
> 
> ------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
>  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