Hi again! Back again with an old issue (but it is still not solved...) I have continued to try and get this to work, but without any luck. I am also starting to doubt that it is possible when using the SourceGenerator since the Introspector isn't involved. (see http://www.mail-archive.com/[email protected]/msg01491.html)
So it seems that the only solution to have a customhandler/wrapper that deals with all occurances of a certain type is to specify it at item-level in a mappig-file or in the binding-file. Setting a global handler/wrapper can only be done if using introspection. Correct? If not, please post an example of how it can be done! Regards Daniel > -----Ursprungligt meddelande----- > Från: Werner Guttmann [mailto:[EMAIL PROTECTED] > Skickat: den 21 april 2006 15:43 > Till: [email protected] > Ämne: Re: [castor-user] Serializing of double results in > scientific expressionin XML-output > > And if this truly valuable piece of information one day > finally makes into either the F.A.Q. or an HOW-TO, I think > everybody would be really happy ... ;-). Keith, feel like > adding this (incl. a short sample?) to Confluence, so that it > can be moved to a HOW-TO at a later time ? > > Werner > > Keith Visco wrote: > > Daniel, > > > > If you search the archives a bit you'll find out that you can set a > > FieldHandler "globally" programmatically by implementing a > > FieldHandlerFactory and specifying this on the > > ClassDescriptorResolverImpl's Introspector instance. > > > > --Keith > > > > Daniel Nilsson wrote: > >> Hi! > >> I have a problem with marshalling of double values. Ie if a have a > >> value, lets say 0.000001, the marshalled XML contains the > Scientific > >> representation, ie 1E-5, not 0.000001 as I want. > >> > >> Is there a way to globally handle this ? Ie set some kind > of global > >> wrapper for the double-type? My wrapper could then handle the > >> serializing of the double-type-elements, instead of the default > >> built-in handler. > >> > >> I have read the documentation about the FieldHandlers but if I > >> understand that part correct I have to specify if I want > to use the > >> "my-double-FieldHandler" for each element I want to use it for in > >> either a mapping-file (which I don't use at the moment) or in the > >> bindings-file when generating my java-sources. But I can't seem to > >> find a way to set a handler globally for an entire class. > >> > >> > >> Best regards > >> Daniel Nilsson > >> > >> > >> ------------------------------------------------- > >> If you wish to unsubscribe from this list, please send an empty > >> message to the following address: > >> > >> [EMAIL PROTECTED] > >> ------------------------------------------------- > >> > >> > > > > > > ------------------------------------------------- > > If you wish to unsubscribe from this list, please send an empty > > message to the following address: > > > > [EMAIL PROTECTED] > > ------------------------------------------------- > > > > > > > ------------------------------------------------- > If you wish to unsubscribe from this list, please send an > empty message to the following address: > > [EMAIL PROTECTED] > ------------------------------------------------- > > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

