开发者

JAX-WS 2.0 - Migrating from xsd:double to xsd:decimal

开发者 https://www.devze.com 2023-02-15 05:01 出处:网络
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

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 BigDecimals in your application?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号