Done and done. With a patch. https://issues.apache.org/jira/browse/CXF-2847
-Bryan Stopp Software Engineer Web Application Development Extension: 51753 Commercial: 816-435-1753 -----Original Message----- From: Benson Margulies [mailto:[email protected]] Sent: Tuesday, June 15, 2010 4:30 PM To: [email protected] Subject: Re: Override Aegis Default Mapping A JIRA with a test case, please? On Tue, Jun 15, 2010 at 2:46 PM, Stopp, Bryan <[email protected]> wrote: > Ok, I'm trying to override the default BigDecimalType in the Aegis > mapping; there's a bug, as it uses the toString() method on the > BigDecimal class, which by default prints any values in Scientific > Notation. According to the XSD & XML spec, decimal fields (which > BigDecimal maps to) are not supposed to use any notations other than the > decimal. > > > > Basically, 0.0000000 is being printed as 0E-8. > > > > I created my own type class: > > > > public class BigDecimalOverriedType extends BigDecimalType { > > > > > > �...@override > > public void writeObject(Object object, MessageWriter writer, > Context context) { > > > > writer.writeValue(((BigDecimal) object).toPlainString()); > > } > > } > > > > > > But, when I registered it: > > > > �...@postconstruct > > public void init() { > > TypeMapping typeMapping = > aegisDatabinding.getAegisContext().getTypeMapping(); > > // Type oldType = typeMapping.getType(BigDecimal.class); > > // typeMapping.removeType(oldType); > > typeMapping.register(BigDecimal.class, > XMLSchemaQNames.XSD_DECIMAL, new BigDecimalOverriedType()); > > } > > > > The BigDecimalType is still being used of a lot of BigDecimal instances. > I want my type to be used for all of them. > > > > Yes, I have read the source, and that's why I thought this would work, > but it's intermittent. Does anyone have any idea how to fix this issue > until I submit a bug/patch for the underlying problem? > > > > Thanks. > > > > -B > > > > > PRIVILEGED AND CONFIDENTIAL > This email transmission contains privileged and confidential information > intended only for the use of the individual or entity named above. If the > reader of the email is not the intended recipient or the employee or agent > responsible for delivering it to the intended recipient, you are hereby > notified that any use, dissemination or copying of this email transmission is > strictly prohibited by the sender. If you have received this transmission in > error, please delete the email and immediately notify the sender via the > email return address or mailto:[email protected]. Thank you. > > > > PRIVILEGED AND CONFIDENTIAL This email transmission contains privileged and confidential information intended only for the use of the individual or entity named above. If the reader of the email is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any use, dissemination or copying of this email transmission is strictly prohibited by the sender. If you have received this transmission in error, please delete the email and immediately notify the sender via the email return address or mailto:[email protected]. Thank you.
