DECIMAL vs. double

Dec 19, 2009 at 3:23 AM
Edited Dec 19, 2009 at 3:24 AM
One very annoying thing I discovered in buildng this was even though WeatherBug defines it’s SOAP APIs using doubles like this:

<s:element name="GetUSWorldCityByLatLong">
           <s:element minOccurs="1" maxOccurs="1" name="latitude" type="s:double" />
           <s:element minOccurs="1" maxOccurs="1" name="longitude" type="s:double" />
           <s:element minOccurs="0" maxOccurs="1" name="ACode" type="s:string" />

The proxy’s generated by wsdlutil made them of type DECIMAL which are very hard to deal with in C/C++.  So I had to manually modify the to use doubles instead.  This works fine in the end but means that if your regenerate the proxys for this app the app will no longer compile.

Not sure if I did something wrong in generating them but saw nothing obvious.  This was the first time I’d used those tools so who knows…