Hello.
I've been searching on Google and on this forum for an answer without much success.
Introduction
I'm working with c# programmers, I'm doing the presentation layer, the graphics interface, they're doing the code behind.
We communicate Flash and c# through web services.
Data types in Flash are different than those in c#. Talking of numbers, the Flash Number type is big enough to hold any c# long, float, decimal, double or whatever else c# type.
The c# guys wrote a web service with different methods to be consumed for Flash. Each method on this web service return a given c# type for Flash to handle, methods like GetFloat, GetDouble, GetDecimal, GetLong, GetInt.
Once I get the value, which is not problem at all, I send it back using methods like ValidateFloat, ValidateDouble, ValidateDecimal, ValidateLong, ValidateInt.
And there is what the problem comes, very intrigue, I'll explain...
The problem
As I said, I haven’t any problem when getting the different values; they’re all converted to the Number type, which can hold really big numbers.
But when I send back those numbers to the web service to be validated, the long and decimal values fail, and it doesn’t fail outside of Flash, it fail before leaving Flash, since the error I get says…
…” Unable to connect to endpoint:
http://pathToWebService/WebServiceName.asmx”…
My findings
And here is the curious part. Experimenting with different numbers, we found that if the number that is being sends to the web services is longer that 15 digits, then it fails. It seems to me that Flash is not able to wrap that number into the SOAP object and send it out to the web service to process it.
So that is the problem, Flash cannot send out numbers longer that 15 digits, not matter the value, it could be 1000000000000000 (16 digits) or 9999999999999999 (16 digits) that it fails.
Let me add that not matter what is on the server side, the web service is correct, the validate function is correct, the problem isn't on the server side, it is within Flash, we've been debugging on the server and Flash never get to the server side when dealing with those number larger than 15 digits.
What should I do if I want to send a number with more than 15 digits to a web service to process?
Any idea, comment or link will be much appreciated.
Thanks a lot for reading.