On 12 Oct 2008, at 08:18, dkf360 wrote:
Hi,
I am writing an XMLRPC client with Objective C, using XCode. On
the server
side, I have a RPC method foo with these parameters:
foo(String name, double lat, double lng);
From the client side, I am making the call through the XMLRPC
library found
on http://divisiblebyzero.com
This is the XML request that is being sent through the wire from
the client
side:
User.setUserLocation: <?xml
version="1.0"?><methodCall><methodName>User.setUserLocation</
methodName><params><value><string>Myself</string></
value><value><i4>37.331689</i4></value><value><i4>-122.030731</i4></
value></params></methodCall>
The values seems legit to me, so I am wondering why I get this
response from
the server:
<?xml version="1.0" encoding="UTF-8"?><methodResponse
xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/
extensions"><fault><value><struct><member><name>faultCode</
name><value><i4>0</i4></value></member><member><name>faultString</
name><value>Failed
to parse XML-RPC request: Failed to parse integer value:
37.331689</value></member></struct></value></fault></methodResponse>
37.331689 is not an integer. That's why you are getting the error.
You need to send that value as a <double>
Here is the spec http://www.xmlrpc.com/spec
John Wilson