Page 1 of 1
XMLRPC for iOS?
Posted: Tue Sep 10, 2013 4:49 pm
by mkalkbrenner
I just noticed that the revXMLRPC library is not available when building standalone apps for iOS.
Does anyone know a substitution or a workaround to do XMLRPC on iOS using livecode?
Re: XMLRPC for iOS?
Posted: Tue Sep 10, 2013 5:07 pm
by bangkok
mkalkbrenner wrote:I just noticed that the revXMLRPC library is not available when building standalone apps for iOS.
Does anyone know a substitution or a workaround to do XMLRPC on iOS using livecode?
I know nothing about the IOS platform... But it should be easy to "mimick" the revXMLRPC library.. just compose the text of your XML query, with all the proper tags... set your http headers and do a POST to the server.
Official specs :
http://xmlrpc.scripting.com/spec.html
Re: XMLRPC for iOS?
Posted: Tue Sep 10, 2013 5:21 pm
by mkalkbrenner
bangkok wrote:But it should be easy to "mimick" the revXMLRPC library
Yes, sending a request this way is possible. But you also have to deal with headers, deal with entities, parse the result and handle xmlrpc error codes by yourself ... something I want to avoid.
Using revXMLRPC for desktop apps is straight forward. Does anyone know why it's not available for iOS?
Re: XMLRPC for iOS?
Posted: Wed Oct 02, 2013 11:02 am
by bangkok
Well... i face now the same question... but for Android !
I forgot to check... and it seems that XMLRPC is not available for Android.
And it bother me to "emulate" with a POST...
Someone has information on the avaibility of XMLRPC for mobile ?
I've tried to bypass the problem by using a JSON query...
Bam another library not available for Android : libURLLastRHHeaders (to catch a cookie set by the server).
A real unlucky day...
Re: XMLRPC for iOS?
Posted: Thu Oct 03, 2013 4:12 pm
by bangkok
Well... I've installed Fiddler... A very good proxy traffic analyser.
On desktop, i launch the XMLRPC queries from LiveCode. And Fiddler gives the header, the query in XML, and the result (in several format, raw text, XML etc.)
Then after on Android it's easy to use those items and to :
-set the httpheaders (only the "Content-Length:" will change for each query, easy to calculate)
-and post the raw XML to the server
Actually, for a few "static" queries, or with a only few small changes, it's pretty straightforward.
After, to parse the result, and to inject it for instance in Datagrid with DGData there is the excellent ConvertXMLToArray set of functions from Trevor DeVore, or the XML library (more difficult to use).