users@jax-rpc.java.net

WSDL decimal type and different locales

From: Ryan LeCompte <Ryan.LeCompte_at_pangonetworks.com>
Date: Fri, 11 Aug 2006 08:59:56 -0400

Hello all,
 
I have a question regarding the WSDL "decimal" data type and different locales. I know that JAX-RCP essentially manifests the "decimal" type has a java.math.BigDecimal, and then simply calls BigDecimal.toString() when sending that value over the wire. The BigDecimal class doesn't deal with different locales, it always sends it in scientific notation with "." as the separator. Will this work if either the client or server machine is in a non-US locale, such as French or Spanish where a comma is used instead of a period for the decimal marker? Or does the WSDL specification just pick a format and the web service stack is supposed to handle the details?
 
Also, I noticed that .NET has trouble parsing huge decimal numbers that use scientific notation from the JWSDP. I actually had to create my own subclass of BigDecimal that does NOT use scientific notation in the toString() method, and this made the .NET web service stack able to parse the decimal values appropriately. I'm not sure if this has been fixed in JAX-WS 2.0.
 
Thanks,
Ryan