users@jax-rpc.java.net

Re: WSDL decimal type and different locales

From: Jitendra Kotamraju <Jitendra.Kotamraju_at_Sun.COM>
Date: Mon, 14 Aug 2006 16:00:25 -0700

The wire format should be conformant with schema spec.

http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#decimal

Jitu


Ryan LeCompte wrote:

> 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
>