SOAP and very very large numbers

B

bmm

Hi reader,

It _seems_ SOAP is eager to parse number only values into number,
however it fails if those numbers are to large. The following code
raises the problem if you have a valid Google WebAPI key:

require 'soap/wsdlDriver'
key = 'YOURVALIDKEY'

soap =
SOAP::WSDLDriverFactory.new('http://api.google.com/GoogleSearch.wsdl').create_rpc_driver

r = soap.doGoogleSearch(key, 'wacky something asdf', 0, 1, false, "",
false, "", "", "" )
puts "No problem: #{r.estimatedTotalResultsCount}"
r = soap.doGoogleSearch(key, 'google', 0, 1, false, "", false, "", "",
"" )
puts "Will never get here"

The result on Debian/Linux ruby1.8 and ruby 1.9 is:
SOAP::FaultError: Exception from service object: For input string:
"2400000000"
from #<SOAP::Mapping::Object:0xb799d29c>

The input string is normal, so what is the problem here? Is ruby trying
to interpret this string and failing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top