On 24 Apr 2009, at 14:17, Charan Seshadri wrote:
Hi All,
I am constructing XmlRpcRequest with proper tags and sending to the
apace
server using objective C language.
It is executing the server side transaction and the response has
getting
returned.
I am using XmlRpc 3.1.1 library in server side,it is returning
XmlRpcResponse to the client.But for int and float it is returning
the type
but for the string it is not returning the type.I have to parse to the
client without knowing what type it is i cant parse it.
Please see before the request and response.
Request:
<?xml version="1.0"?>
<methodCall>
<methodName>Classname.methodname<methodName>
<params>
<param>
<value>
<double>17.451233</double>
</value>
</param>
<param>
<value>
<double>79.381348</double>
</value>
</param>
<param>
<value>
<string>Gamer</string>
</value>
</param>
</params>
</methodCall>
Response:
<?xml version="1.0" encoding="UTF-8"?
<methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespacesextensions
">
<params>
<param>
<value>
<struct>
<member>
<name>*lattitude*</name>
<value>
<*double*>17.4601</*double*>
</value>
</member>
<member>
<name>message</name>
<value>Some Value</value>
</member>
<member>
<name>longitude</name>
<value>
<double>78.3801</double>
</value>
</member>
<member>
<name>*userName*</name>
<value>*Dravid*</value>
</member>
<member>
<name>deviceId</name>
<value>4AB43616-FA69-5887-ADB5-F9A11539A10A</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>
Can you guys please give me suggestions.
For example in the above response:the double type is coming and for
string
the response is not coming.
This is perfectly valid XML-RPC. For string values the <string> tag is
optional. So a <value>stuff</value> element is completely equivalent
to a <value><string>stuff</string></value>. A compliant implementation
must accept both and can emit either.
John Wilson