开发者

pass in a numbers with a maximum size of 2^256 through a wsdl

We have currently a wsdl element that was defined as long since the number that was being passed could have a maximun value of 2^64.But now the client wants to pass in numbers with maximum values of 2^256 .In my view the only way to support this is to change the xsd type to String.Anybody has a better idea about dealing with it .

Also the java code needs to handle this and persist it to the DB. There also i see no alternative but to use S开发者_开发问答tring object. Am i thinking rightly?


What does the value represent ? What do you actually do with it ? What level of accuracy do you require it to be held at ?

While Oracle won't complain about being given a very large number, it only stores up to a precision/scale of 38. Since power(2,256) is about 1.15E+77, an Oracle number won't necessarily preserve that accurately.

Assuming it does need to be retained accurately (eg some sort of cryptographic key), I'd go with a string.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜