JAX-WS 2.0 - Migrating from xsd:double to xsd:decimal
I've written an application that relies heavily on data obtained from web开发者_StackOverflow中文版 services for which I have generated JAX-WS clients. The WSDL uses xsd:double types to represent all floating point types, but as they sometimes represent monetary amounts I would like to change them all to xsd:decimal objects. As long as I am using my own copy of the WSDL with all xsd:double occurrences changed to xsd:decimal, and stubs generated from the modified WSDL, am I likely to encounter any issues?
Thanks and kind regards,
Joseph.
As long as you're not dependent on being able to encode any "weird values" / IEEE-754 niceties (depending on your viewpoint) like -0.0, infinity, or NaN, and are careful to avoid an impedance mismatch between what the web services provide and what your application expects, I don't believe that you should encounter any issues.
I assume that these values will be handled as BigDecimal
s in your application?
精彩评论